Due to a preceding while loop, no CPU would've been put into stopped
state. Reinitialize the variable.
This fixes commit
d798e97456658ea7605303b7c69b04ec7df95c10 (Allow to use
pause_all_vcpus from VCPU context) for non-KVM case.
While at it, change a 0 to false, amending commit
4fdeee7cd4c8f90ef765537b9346a195d9483ab5 (cpu: Move stop field to
CPUState).
Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
if (qemu_in_vcpu_thread()) {
cpu_stop_current();
if (!kvm_enabled()) {
+ penv = first_cpu;
while (penv) {
CPUState *pcpu = ENV_GET_CPU(penv);
- pcpu->stop = 0;
+ pcpu->stop = false;
pcpu->stopped = true;
penv = penv->next_cpu;
}