diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-08-01 13:50:04 +0200 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2025-09-17 19:00:55 +0200 |
| commit | f8217ae54e4c44a7f0d20d56a5368ec1818f1cc2 (patch) | |
| tree | ee2fe1ada00d338c8f5de57263ed0aa03debdeee /hw/ppc | |
| parent | dcb46ecb2e90d532fcdc04702c92e732a0ef77e8 (diff) | |
| download | focaccia-qemu-f8217ae54e4c44a7f0d20d56a5368ec1818f1cc2.tar.gz focaccia-qemu-f8217ae54e4c44a7f0d20d56a5368ec1818f1cc2.zip | |
cpus: properly kick CPUs out of inner execution loop
Now that cpu_exit() actually kicks all accelerators, use it whenever the message to another thread is processed in qemu_wait_io_event(). Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/ppc')
| -rw-r--r-- | hw/ppc/ppc.c | 2 | ||||
| -rw-r--r-- | hw/ppc/spapr_hcall.c | 7 | ||||
| -rw-r--r-- | hw/ppc/spapr_rtas.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c index 43d0d0e755..3e436c7041 100644 --- a/hw/ppc/ppc.c +++ b/hw/ppc/ppc.c @@ -190,6 +190,7 @@ static void ppc970_set_irq(void *opaque, int pin, int level) if (level) { trace_ppc_irq_cpu("stop"); cs->halted = 1; + cpu_exit(cs); } else { trace_ppc_irq_cpu("restart"); cs->halted = 0; @@ -386,6 +387,7 @@ static void ppc40x_set_irq(void *opaque, int pin, int level) if (level) { trace_ppc_irq_cpu("stop"); cs->halted = 1; + cpu_exit(cs); } else { trace_ppc_irq_cpu("restart"); cs->halted = 0; diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index 51875e32a0..c594d4b916 100644 --- a/hw/ppc/spapr_hcall.c +++ b/hw/ppc/spapr_hcall.c @@ -509,8 +509,8 @@ static target_ulong h_cede(PowerPCCPU *cpu, SpaprMachineState *spapr, if (!cpu_has_work(cs)) { cs->halted = 1; cs->exception_index = EXCP_HLT; - qatomic_set(&cs->exit_request, true); ppc_maybe_interrupt(env); + cpu_exit(cs); } return H_SUCCESS; @@ -531,8 +531,8 @@ static target_ulong h_confer_self(PowerPCCPU *cpu) } cs->halted = 1; cs->exception_index = EXCP_HALTED; - qatomic_set(&cs->exit_request, true); ppc_maybe_interrupt(&cpu->env); + cpu_exit(cs); return H_SUCCESS; } @@ -624,8 +624,7 @@ static target_ulong h_confer(PowerPCCPU *cpu, SpaprMachineState *spapr, } cs->exception_index = EXCP_YIELD; - qatomic_set(&cs->exit_request, true); - cpu_loop_exit(cs); + cpu_exit(cs); return H_SUCCESS; } diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc/spapr_rtas.c index 78309dbb09..143bc8c379 100644 --- a/hw/ppc/spapr_rtas.c +++ b/hw/ppc/spapr_rtas.c @@ -221,7 +221,7 @@ static void rtas_stop_self(PowerPCCPU *cpu, SpaprMachineState *spapr, cs->halted = 1; ppc_store_lpcr(cpu, env->spr[SPR_LPCR] & ~pcc->lpcr_pm); kvmppc_set_reg_ppc_online(cpu, 0); - qemu_cpu_kick(cs); + cpu_exit(cs); } static void rtas_ibm_suspend_me(PowerPCCPU *cpu, SpaprMachineState *spapr, |