Skip to contentSkip to conversation

qemu-kvm: Mark VCPU state dirty on creation

PATCH Applied Jan Kiszka 2 participants 3 messages Feb 21, 2011 – Feb 28, 2011 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 qemu-kvm: Mark VCPU state dirty on creation

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

---

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

 qemu-kvm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
qemu-kvm.c +1 -0
index 15e552a..106f148 100644
@@ -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) {
Signature · 1 line
1.7.1
Applied
#1 lore raw
Quoted 2 lines · Jan Kiszka

This avoids that early cpu_synchronize_state calls try to retrieve an uninitialized state from the kernel,

Thanks, applied.

Quoted 2 lines

which even causes a deadlock.

How?

Signature · 1 line
error compiling committee.c: too many arguments to function
author
#2 lore raw
Quoted 10 lines · Avi Kivity
Quoted 2 lines · Jan Kiszka

This avoids that early cpu_synchronize_state calls try to retrieve an uninitialized state from the kernel,

Thanks, applied.

Quoted 2 lines

which even causes a deadlock.

How?

Early hw_error. It collects the CPU states, also during initial device setup, ie. before the VCPUs have been started.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux