diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-05-11 12:35:52 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 10:48:59 +0200 |
commit | 44c11430b52cbad0a467bc023a802d122dfd285c (patch) | |
tree | 1be73025a2019b6de60836cbaa56bf5c8cb6f9db /arch/x86/include | |
parent | KVM: Always request IRQ/NMI window if an interrupt is pending (diff) | |
download | linux-44c11430b52cbad0a467bc023a802d122dfd285c.tar.xz linux-44c11430b52cbad0a467bc023a802d122dfd285c.zip |
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')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 2 |
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 { unsigned int time_offset; struct page *time_page; + bool singlestep; /* guest is single stepped by KVM */ bool nmi_pending; bool nmi_injected; @@ -771,6 +772,7 @@ enum { #define HF_HIF_MASK (1 << 1) #define HF_VINTR_MASK (1 << 2) #define HF_NMI_MASK (1 << 3) +#define HF_IRET_MASK (1 << 4) /* * Hardware virtualization extension instructions may fault if a |