mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
cpus: Fix pausing TCG CPUs while in vCPU thread
Due to a preceding while loop, no CPU would've been put into stopped state. Reinitialize the variable. This fixes commitd798e97456
(Allow to use pause_all_vcpus from VCPU context) for non-KVM case. While at it, change a 0 to false, amending commit4fdeee7cd4
(cpu: Move stop field to CPUState). Reviewed-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
0514ef2fbb
commit
1085819368
1 changed files with 2 additions and 1 deletions
3
cpus.c
3
cpus.c
|
@ -974,9 +974,10 @@ void pause_all_vcpus(void)
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue