aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorRadim Krčmář <rkrcmar@redhat.com>2014-01-17 14:52:42 -0500
committerPaolo Bonzini <pbonzini@redhat.com>2014-02-18 04:14:24 -0500
commitf303b4ce8b386558b2b92aeb0c6af96685fcd4b2 (patch)
treea7659fc58e6cc7d6a05be5c8c685fbed6091046b /arch/x86/kvm/svm.c
parent5befdc385ddb2d5ae8995ad89004529a3acf58fc (diff)
KVM: SVM: fix NMI window after iret
We should open NMI window right after an iret, but SVM exits before it. We wanted to single step using the trap flag and then open it. (or we could emulate the iret instead) We don't do it since commit 3842d135ff2 (likely), because the iret exit handler does not request an event, so NMI window remains closed until the next exit. Fix this by making KVM_REQ_EVENT request in the iret handler. Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index e81df8fce027..64d9bb9590e3 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2842,6 +2842,7 @@ static int iret_interception(struct vcpu_svm *svm)
2842 clr_intercept(svm, INTERCEPT_IRET); 2842 clr_intercept(svm, INTERCEPT_IRET);
2843 svm->vcpu.arch.hflags |= HF_IRET_MASK; 2843 svm->vcpu.arch.hflags |= HF_IRET_MASK;
2844 svm->nmi_iret_rip = kvm_rip_read(&svm->vcpu); 2844 svm->nmi_iret_rip = kvm_rip_read(&svm->vcpu);
2845 kvm_make_request(KVM_REQ_EVENT, &svm->vcpu);
2845 return 1; 2846 return 1;
2846} 2847}
2847 2848