[PATCH 1/4] cpus: Only resume halted CPUs

Philippe Mathieu-Daudé posted 4 patches 3 days, 11 hours ago
Maintainers: Richard Henderson <richard.henderson@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Alexander Graf <agraf@csgraf.de>, Mads Ynddal <mads@ynddal.dk>, Peter Maydell <peter.maydell@linaro.org>, Cameron Esfahani <dirty@apple.com>, Roman Bolshakov <rbolshakov@ddn.com>, Phil Dennis-Jordan <phil@philjordan.eu>
[PATCH 1/4] cpus: Only resume halted CPUs
Posted by Philippe Mathieu-Daudé 3 days, 11 hours ago
Avoid kicking running CPUs, trying to resume them.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 system/cpus.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/system/cpus.c b/system/cpus.c
index aa7bfcf56e5..6062226d4ac 100644
--- a/system/cpus.c
+++ b/system/cpus.c
@@ -666,7 +666,9 @@ void resume_all_vcpus(void)
 
     qemu_clock_enable(QEMU_CLOCK_VIRTUAL, true);
     CPU_FOREACH(cpu) {
-        cpu_resume(cpu);
+        if (cpu->halted) {
+            cpu_resume(cpu);
+        }
     }
 }
 
-- 
2.51.0


Re: [PATCH 1/4] cpus: Only resume halted CPUs
Posted by Philippe Mathieu-Daudé 3 days, 6 hours ago
On 25/9/25 04:55, Philippe Mathieu-Daudé wrote:
> Avoid kicking running CPUs, trying to resume them.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   system/cpus.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/system/cpus.c b/system/cpus.c
> index aa7bfcf56e5..6062226d4ac 100644
> --- a/system/cpus.c
> +++ b/system/cpus.c
> @@ -666,7 +666,9 @@ void resume_all_vcpus(void)
>   
>       qemu_clock_enable(QEMU_CLOCK_VIRTUAL, true);
>       CPU_FOREACH(cpu) {
> -        cpu_resume(cpu);
> +        if (cpu->halted) {
> +            cpu_resume(cpu);
> +        }
>       }
>   }
>   

Please disregard this patch for now, as other changes (non
included in this series) are required before this change is
correct.