aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-05-11 06:35:52 -0400
committerAvi Kivity <avi@redhat.com>2009-06-10 04:48:59 -0400
commit44c11430b52cbad0a467bc023a802d122dfd285c (patch)
tree1be73025a2019b6de60836cbaa56bf5c8cb6f9db /arch/x86/include/asm/kvm_host.h
parent6a8b1d13121f8226783987dc7ddd861ee2245410 (diff)
KVM: inject NMI after IRET from a previous NMI, not before.
If NMI is received during handling of another NMI it should be injected immediately after IRET from previous NMI handler, but SVM intercept IRET before instruction execution so we can't inject pending NMI at this point and there is not way to request exit when NMI window opens. This patch fix SVM code to open NMI window after IRET by single stepping over IRET instruction. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/kvm_host.h')
-rw-r--r--arch/x86/include/asm/kvm_host.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
index 1d6c3f757cb6..82129437e873 100644
--- a/arch/x86/include/asm/kvm_host.h
+++ b/arch/x86/include/asm/kvm_host.h
@@ -358,6 +358,7 @@ struct kvm_vcpu_arch {
358 unsigned int time_offset; 358 unsigned int time_offset;
359 struct page *time_page; 359 struct page *time_page;
360 360
361 bool singlestep; /* guest is single stepped by KVM */
361 bool nmi_pending; 362 bool nmi_pending;
362 bool nmi_injected; 363 bool nmi_injected;
363 364
@@ -771,6 +772,7 @@ enum {
771#define HF_HIF_MASK (1 << 1) 772#define HF_HIF_MASK (1 << 1)
772#define HF_VINTR_MASK (1 << 2) 773#define HF_VINTR_MASK (1 << 2)
773#define HF_NMI_MASK (1 << 3) 774#define HF_NMI_MASK (1 << 3)
775#define HF_IRET_MASK (1 << 4)
774 776
775/* 777/*
776 * Hardware virtualization extension instructions may fault if a 778 * Hardware virtualization extension instructions may fault if a