Re: [PATCH 13/15] Add NMI injection support to SVM.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 13, 2009 at 12:55:43PM +0300, kvm-owner@xxxxxxxxxxxxxxx wrote:
> 
> Signed-off-by: Gleb Natapov <gleb@xxxxxxxxxx>

The attached patch if applied on the top of the serie fixes the NMI issue on
SVM. I did not refactor it on the top of this patch though, sorry.

-- 
With best wishes
Dmitry

>From 26d7e88c84089abbe871286d54e77ff2922dc33d Mon Sep 17 00:00:00 2001
From: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx>
Date: Fri, 17 Apr 2009 22:53:50 +0400
Subject: [PATCH] KVM: correct NMI injection logic wrt NMI window tracking

inject_pending_irq() calls inject_irq() which disables nmi_pending flag
if the nmi was injected. Thus for tracking we should use nmi_injected
flag. This al fin fixes NMI injection on SVM.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@xxxxxxxxx>
---
 arch/x86/kvm/x86.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index e4cc717..eeed350 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3160,7 +3160,7 @@ static void inject_pending_irq(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
 	inject_irq(vcpu);
 
 	/* enable NMI/IRQ window open exits if needed */
-	if (vcpu->arch.nmi_pending)
+	if (vcpu->arch.nmi_injected)
 		kvm_x86_ops->enable_nmi_window(vcpu);
 	else if (kvm_cpu_has_interrupt(vcpu) || req_int_win)
 		kvm_x86_ops->enable_irq_window(vcpu);
-- 
1.6.2.1


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux