aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2011-03-15 12:26:20 +0100
committerMarcelo Tosatti <mtosatti@redhat.com>2011-03-16 17:11:05 -0300
commitd841b6c4f16c3fc7afe2ce355e7e42813345f053 (patch)
tree49faf4e6dacf7bb7219f63318cd81bf0b7687e0a
parent4601f7b04c63072c73870d4f4db2a5c5ad5ad8d2 (diff)
kvm: Mark VCPU state dirty on creation
This avoids that early cpu_synchronize_state calls try to retrieve an uninitialized state from the kernel. That even causes a deadlock if io-thread is enabled. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
-rw-r--r--kvm-all.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kvm-all.c b/kvm-all.c
index 226843c65f..62b098441d 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -211,6 +211,7 @@ int kvm_init_vcpu(CPUState *env)
env->kvm_fd = ret;
env->kvm_state = s;
+ env->kvm_vcpu_dirty = 1;
mmap_size = kvm_ioctl(s, KVM_GET_VCPU_MMAP_SIZE, 0);
if (mmap_size < 0) {