From: Jan Kiszka Date: Fri, 26 Sep 2008 07:30:48 +0000 (+0200) Subject: KVM: x86: Reset pending/inject NMI state on CPU reset X-Git-Tag: v3.0~11490^2~135 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=448fa4a9c5dbc6941dd19ed09692c588d815bb06;p=platform%2Fkernel%2Flinux-amlogic.git 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 Signed-off-by: Jan Kiszka Signed-off-by: Avi Kivity --- diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f1f8ff2..1a71f67 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) int kvm_arch_vcpu_reset(struct kvm_vcpu *vcpu) { + vcpu->arch.nmi_pending = false; + vcpu->arch.nmi_injected = false; + return kvm_x86_ops->vcpu_reset(vcpu); }