summaryrefslogtreecommitdiffstats
path: root/include/linux/kvm_host.h
diff options
context:
space:
mode:
authorAvi Kivity2011-09-20 12:43:14 +0200
committerAvi Kivity2011-09-25 18:52:59 +0200
commit7460fb4a340033107530df19e7e125bd0969bfb2 (patch)
tree02f2aedd48af0a2e316b28d6a5b21a7a96442ac6 /include/linux/kvm_host.h
parentKVM: x86 emulator: convert push %sreg/pop %sreg to direct decode (diff)
downloadkernel-qcow2-linux-7460fb4a340033107530df19e7e125bd0969bfb2.tar.gz
kernel-qcow2-linux-7460fb4a340033107530df19e7e125bd0969bfb2.tar.xz
kernel-qcow2-linux-7460fb4a340033107530df19e7e125bd0969bfb2.zip
KVM: Fix simultaneous NMIs
If simultaneous NMIs happen, we're supposed to queue the second and next (collapsing them), but currently we sometimes collapse the second into the first. Fix by using a counter for pending NMIs instead of a bool; since the counter limit depends on whether the processor is currently in an NMI handler, which can only be checked in vcpu context (via the NMI mask), we add a new KVM_REQ_NMI to request recalculation of the counter. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r--include/linux/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index 2a414f66af28..d52623199978 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -49,6 +49,7 @@
#define KVM_REQ_EVENT 11
#define KVM_REQ_APF_HALT 12
#define KVM_REQ_STEAL_UPDATE 13
+#define KVM_REQ_NMI 14
#define KVM_USERSPACE_IRQ_SOURCE_ID 0