Skip to contentSkip to conversation

uq/master: KVM: Request setting of nmi_pending and sipi_vector

PATCH Applied Jan Kiszka 2 participants 2 messages Jan 28, 2010 KVM

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 uq/master: KVM: Request setting of nmi_pending and sipi_vector

The final version of VCPU events in 2.6.33 will allow to skip nmi_pending and sipi_vector on KVM_SET_VCPU_EVENTS. For now let's write them unconditionally, which is unproblematic for upstream due to missing SMP support. Future version which enable SMP will write them only on reset.

---

The same patch can be used by qemu-kvm as it will only trigger on init/reset unlike upstream.

 target-i386/kvm.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
target-i386/kvm.c +3 -0
index 5b093ce..b457b96 100644
@@ -794,6 +794,9 @@ static int kvm_put_vcpu_events(CPUState *env)
 
     events.sipi_vector = env->sipi_vector;
 
+    events.flags =
+        KVM_VCPUEVENT_VALID_NMI_PENDING | KVM_VCPUEVENT_VALID_SIPI_VECTOR;
+
     return kvm_vcpu_ioctl(env, KVM_SET_VCPU_EVENTS, &events);
 #else
     return 0;
Signature · 1 line
1.6.0.2
#1 lore raw
Quoted 7 lines · Jan Kiszka

The final version of VCPU events in 2.6.33 will allow to skip nmi_pending and sipi_vector on KVM_SET_VCPU_EVENTS. For now let's write them unconditionally, which is unproblematic for upstream due to missing SMP support. Future version which enable SMP will write them only on reset.

Applied, thanks.