diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2011-03-15 12:26:20 +0100 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2011-03-16 17:11:05 -0300 |
commit | d841b6c4f16c3fc7afe2ce355e7e42813345f053 (patch) | |
tree | 49faf4e6dacf7bb7219f63318cd81bf0b7687e0a /kvm-all.c | |
parent | 4601f7b04c63072c73870d4f4db2a5c5ad5ad8d2 (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>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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) { |