aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJan Kiszka <jan.kiszka@siemens.com>2008-09-26 03:30:48 -0400
committerAvi Kivity <avi@redhat.com>2008-12-31 09:51:40 -0500
commit448fa4a9c5dbc6941dd19ed09692c588d815bb06 (patch)
treea1f3c6bb0027d047649dd6aefcad493c2f975be7 /arch/x86
parent60637aacfd95c368e1fbc2157275d1b621b5dcdd (diff)
KVM: x86: Reset pending/inject NMI state on CPU reset
CPU reset invalidates pending or already injected NMIs, therefore reset the related state variables. Based on original patch by Gleb Natapov. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/x86.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f1f8ff2f1fa2..1a71f6735593 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3925,6 +3925,9 @@ void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)
3925 3925
3926int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu) 3926int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu)
3927{ 3927{
3928 vcpu->arch.nmi_pending = false;
3929 vcpu->arch.nmi_injected = false;
3930
3928 return kvm_x86_ops->vcpu_reset(vcpu); 3931 return kvm_x86_ops->vcpu_reset(vcpu);
3929} 3932}
3930 3933