From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH 13/15] Add NMI injection support to SVM. Date: Tue, 21 Apr 2009 17:07:33 +0300 Message-ID: <20090421140733.GA29292@redhat.com> References: <1239616545-25199-1-git-send-email-gleb@redhat.com> <1239616545-25199-14-git-send-email-gleb@redhat.com> <20090419131155.GF10126@redhat.com> <49EC99A9.4040500@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dmitry Eremin-Solenikov , kvm@vger.kernel.org To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:35436 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753991AbZDUOHl (ORCPT ); Tue, 21 Apr 2009 10:07:41 -0400 Content-Disposition: inline In-Reply-To: <49EC99A9.4040500@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Apr 20, 2009 at 05:50:01PM +0200, Jan Kiszka wrote: > > +static int iret_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) > > +{ > > + svm->vmcb->control.intercept &= ~(1UL << INTERCEPT_IRET); > > + svm->vcpu.arch.hflags &= ~HF_NMI_MASK; > > Two minor issues: > > ++vcpu->stat.nmi_window_exits; > [...] > > +static void svm_inject_nmi(struct vcpu_svm *svm) > > +{ > > + svm->vmcb->control.event_inj = SVM_EVTINJ_VALID | SVM_EVTINJ_TYPE_NMI; > > + svm->vcpu.arch.hflags |= HF_NMI_MASK; > > + svm->vmcb->control.intercept |= (1UL << INTERCEPT_IRET); > > and: > > ++svm->vcpu.stat.nmi_injections; > Added both. Thanks. -- Gleb.