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>
This commit is contained in:
Philippe Mathieu-Daudé
2025-03-04 14:45:34 +01:00
parent 59f4d65584
commit 00ad70b7fb
+3 -1
View File
@@ -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();
}
}