summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.h
diff options
context:
space:
mode:
authorAvi Kivity <avi@qumranet.com>2008-07-03 14:59:22 +0300
committerAvi Kivity <avi@qumranet.com>2008-10-15 10:15:13 +0200
commit26eef70c3e8c76e73dff2579c792fc7355f8a291 (patch)
tree2ec10a2e0f68ca0de77d446fa6d5be9189809e8d /arch/x86/kvm/x86.h
parent668f612fa0d8d4120ec5dc0725d7e1ca3152a954 (diff)
KVM: Clear exception queue before emulating an instruction
If we're emulating an instruction, either it will succeed, in which case any previously queued exception will be spurious, or we will requeue the same exception. Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'arch/x86/kvm/x86.h')
-rw-r--r--arch/x86/kvm/x86.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h
new file mode 100644
index 000000000000..c666649c4bb2
--- /dev/null
+++ b/arch/x86/kvm/x86.h
@@ -0,0 +1,11 @@
+#ifndef ARCH_X86_KVM_X86_H
+#define ARCH_X86_KVM_X86_H
+
+#include <linux/kvm_host.h>
+
+static inline void kvm_clear_exception_queue(struct kvm_vcpu *vcpu)
+{
+ vcpu->arch.exception.pending = false;
+}
+
+#endif