diff options
author | Avi Kivity <avi@redhat.com> | 2009-07-28 16:32:21 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-07-28 16:32:21 +0300 |
commit | 8628be1580a93d0d7ed8a462a6bd7dc6e1fe0e2d (patch) | |
tree | ec39a2d72bf6ccf079f74f3981d6778bab5d711a /cpu-defs.h | |
parent | Fix build with -disable-kvm due to recent upstream compatibility work (diff) | |
download | qemu-kvm-8628be1580a93d0d7ed8a462a6bd7dc6e1fe0e2d.tar.gz qemu-kvm-8628be1580a93d0d7ed8a462a6bd7dc6e1fe0e2d.tar.bz2 qemu-kvm-8628be1580a93d0d7ed8a462a6bd7dc6e1fe0e2d.zip |
Fix latent bug exposed by using cpu_env->stopped
cpu_env->stopped is part of the cpu state that is implicitly cleared by reset.
kvm runs reset with all vcpus stopped, but the implicit clearing causes this
to fail.
Fix by moving ->stopped out of the implicit clear area. Testcase is reboots
under smp.
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'cpu-defs.h')
-rw-r--r-- | cpu-defs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu-defs.h b/cpu-defs.h index ce9f96ab7..c1a0f8e30 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -158,8 +158,6 @@ struct KVMCPUState { target_ulong mem_io_vaddr; /* target virtual addr at which the \ memory was accessed */ \ uint32_t halted; /* Nonzero if the CPU is in suspend state */ \ - uint32_t stop; /* Stop request */ \ - uint32_t stopped; /* Artificially stopped */ \ uint32_t interrupt_request; \ volatile sig_atomic_t exit_request; \ /* The meaning of the MMU modes is defined in the target code. */ \ @@ -209,6 +207,8 @@ struct KVMCPUState { struct KVMState *kvm_state; \ struct kvm_run *kvm_run; \ int kvm_fd; \ + uint32_t stop; /* Stop request */ \ + uint32_t stopped; /* Artificially stopped */ \ struct KVMCPUState kvm_cpu_state; #endif |