From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH 10/11] VMX: work around lacking VNMI support Date: Wed, 24 Sep 2008 15:39:48 +0200 Message-ID: <48DA4324.1070105@siemens.com> References: <48D74CE6.5060008@siemens.com> <200809231742.03316.sheng.yang@intel.com> <20080923094544.GE3072@minantech.com> <200809231750.49882.sheng.yang@intel.com> <48DA3532.9040306@siemens.com> <20080924125057.GF3072@minantech.com> <48DA3908.2000204@siemens.com> <20080924130236.GG3072@minantech.com> <48DA3C88.1050906@siemens.com> <20080924131700.GH3072@minantech.com> <20080924132047.GI3072@minantech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Yang, Sheng" , kvm-devel , Avi Kivity To: Gleb Natapov Return-path: Received: from gecko.sbs.de ([194.138.37.40]:17988 "EHLO gecko.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbYIXNkE (ORCPT ); Wed, 24 Sep 2008 09:40:04 -0400 In-Reply-To: <20080924132047.GI3072@minantech.com> Sender: kvm-owner@vger.kernel.org List-ID: Gleb Natapov wrote: > On Wed, Sep 24, 2008 at 04:17:00PM +0300, Gleb Natapov wrote: >> On Wed, Sep 24, 2008 at 03:11:36PM +0200, Jan Kiszka wrote: >>>>> OK, I just think we are not supposed to set GUEST_INTR_STATE_NMI without >>>>> cpu_has_virtual_nmis(). Otherwise looks reasonable. Have you tested >>>>> this? Does it make your 2003 power-off? >>>>> >>>> It does power-off, but hands during reboot. Looking at it right now. >>> Yeah, with your patch I'm getting a totally different Blue Screen on >>> spurious manual NMI injection: >>> >>> "Hardware Malfunction >>> >>> Call your hardware vendor for support" >>> >>> 8) >>> >> Cool! >> > BTW I have this is also needed in case CPU was reseted before it had a > chance to handle NMI: > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 5927b79..106e16d 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2234,6 +2234,8 @@ static int vmx_vcpu_reset(struct kvm_vcpu *vcpu) > } > > vmx->vcpu.arch.rmode.active = 0; > + vcpu->arch.nmi_pending = false; > + vcpu->arch.nmi_injected = false; > > vmx->vcpu.arch.regs[VCPU_REGS_RDX] = get_rdx_init_val(); > kvm_set_cr8(&vmx->vcpu, 0); Good point. Same will be required for soft_vnmi_blocked. Will include this as well as your other patch in an update of my NMI series. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux