diff mbox series

[v2,01/15] hw/ppc/spapr: Restrict CONFER hypercall to TCG

Message ID 20250127102620.39159-2-philmd@linaro.org
State New
Headers show
Series target/ppc: Move TCG code from excp_helper.c to tcg-excp_helper.c | expand

Commit Message

Philippe Mathieu-Daudé Jan. 27, 2025, 10:26 a.m. UTC
TODO: Add PPC folks why :)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/ppc/spapr_hcall.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Harsh Prateek Bora Jan. 28, 2025, 4:59 a.m. UTC | #1
Hi Philippe,

On 1/27/25 15:56, Philippe Mathieu-Daudé wrote:
> TODO: Add PPC folks why :)

While this appear be TCG specific, may I know what caused you to bring 
this change? Usually we have blanks stubs for hcalls in KVM mode which 
are only TCG specific. That helps in avoiding building TCG specific code 
when building with TCG disabled.

Nick, thoughts?

regards,
Harsh

> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/ppc/spapr_hcall.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
> index f8ab7670630..dbf30358a1a 100644
> --- a/hw/ppc/spapr_hcall.c
> +++ b/hw/ppc/spapr_hcall.c
> @@ -578,6 +578,8 @@ static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr,
>       CPUState *cs = CPU(cpu);
>       SpaprCpuState *spapr_cpu;
>   
> +    assert(tcg_enabled()); /* KVM will have handled this */
> +
>       /*
>        * -1 means confer to all other CPUs without dispatch counter check,
>        *  otherwise it's a targeted confer.
diff mbox series

Patch

diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index f8ab7670630..dbf30358a1a 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -578,6 +578,8 @@  static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr,
     CPUState *cs = CPU(cpu);
     SpaprCpuState *spapr_cpu;
 
+    assert(tcg_enabled()); /* KVM will have handled this */
+
     /*
      * -1 means confer to all other CPUs without dispatch counter check,
      *  otherwise it's a targeted confer.