aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@linaro.org>2025-01-23 17:28:39 +0100
committerPhilippe Mathieu-Daudé <philmd@linaro.org>2025-03-04 14:45:34 +0100
commit00ad70b7fb527a80b31c8b6b1a0e7a66b0d08498 (patch)
tree43d34b389ec03b1b9d2da8e428fc9dcf9334f79e
parent59f4d65584bd3372070e2484876436c8d02505e4 (diff)
downloadqemu-00ad70b7fb527a80b31c8b6b1a0e7a66b0d08498.zip
qemu-00ad70b7fb527a80b31c8b6b1a0e7a66b0d08498.tar.gz
qemu-00ad70b7fb527a80b31c8b6b1a0e7a66b0d08498.tar.bz2
hw/ppc/spapr: Restrict part of PAGE_INIT hypercall to TCG
Restrict the tb_flush() call to TCG. Assert we are using KVM or TCG. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com> Message-Id: <20250127102620.39159-3-philmd@linaro.org>
-rw-r--r--hw/ppc/spapr_hcall.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index f8ab767..f987ff3 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -299,8 +299,10 @@ static target_ulong h_page_init(PowerPCCPU *cpu, SpaprMachineState *spapr,
if (flags & (H_ICACHE_SYNCHRONIZE | H_ICACHE_INVALIDATE)) {
if (kvm_enabled()) {
kvmppc_icbi_range(cpu, pdst, len);
- } else {
+ } else if (tcg_enabled()) {
tb_flush(CPU(cpu));
+ } else {
+ g_assert_not_reached();
}
}