From patchwork Thu Aug 26 20:06:02 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jes Sorensen X-Patchwork-Id: 135861 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o7QK6DF3027701 for ; Thu, 26 Aug 2010 20:06:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754489Ab0HZUGK (ORCPT ); Thu, 26 Aug 2010 16:06:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4147 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752699Ab0HZUGI (ORCPT ); Thu, 26 Aug 2010 16:06:08 -0400 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7QK68if005521 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 26 Aug 2010 16:06:08 -0400 Received: from localhost.localdomain ([10.3.121.6]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o7QK65Sm020862; Thu, 26 Aug 2010 16:06:07 -0400 From: Jes.Sorensen@redhat.com To: kvm@vger.kernel.org Cc: avi@redhat.com, gleb@redhat.com Subject: [PATCH 1/1] Disable GUEST_INTR_STATE_STI flag before injecting NMI to guest on VMX Date: Thu, 26 Aug 2010 22:06:02 +0200 Message-Id: <1282853162-16925-2-git-send-email-Jes.Sorensen@redhat.com> In-Reply-To: <1282853162-16925-1-git-send-email-Jes.Sorensen@redhat.com> References: <1282853162-16925-1-git-send-email-Jes.Sorensen@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.16 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 26 Aug 2010 20:06:17 +0000 (UTC) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index cf56462..8e95371 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2888,6 +2888,8 @@ static void vmx_inject_nmi(struct kvm_vcpu *vcpu) kvm_rip_write(vcpu, vmx->rmode.irq.rip - 1); return; } + vmcs_write32(GUEST_INTERRUPTIBILITY_INFO, + vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & ~GUEST_INTR_STATE_STI); vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, INTR_TYPE_NMI_INTR | INTR_INFO_VALID_MASK | NMI_VECTOR); }