qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 02/15] hw/ppc/spapr: Restrict part of PAGE_INIT hypercall


From: Harsh Prateek Bora
Subject: Re: [PATCH v2 02/15] hw/ppc/spapr: Restrict part of PAGE_INIT hypercall to TCG
Date: Tue, 28 Jan 2025 10:32:02 +0530
User-agent: Mozilla Thunderbird



On 1/27/25 15:56, Philippe Mathieu-Daudé wrote:
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>

---
  hw/ppc/spapr_hcall.c | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index dbf30358a1a..4f1933b8da6 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();
          }
      }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]