[PATCH] qemu-kvm: Mark VCPU state dirty on creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This avoids that early cpu_synchronize_state calls try to retrieve an
uninitialized state from the kernel, which even causes a deadlock.

Signed-off-by: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
---

Corresponding upstream patch will come with next uq/master series.

 qemu-kvm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/qemu-kvm.c b/qemu-kvm.c
index 15e552a..106f148 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -259,6 +259,7 @@ static void kvm_create_vcpu(CPUState *env, int id)
 
     env->kvm_fd = r;
     env->kvm_state = kvm_state;
+    env->kvm_vcpu_dirty = 1;
 
     mmap_size = kvm_ioctl(kvm_state, KVM_GET_VCPU_MMAP_SIZE, 0);
     if (mmap_size < 0) {
-- 
1.7.1
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux