From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/1] Disable GUEST_INTR_STATE_STI flag before injecting NMI to guest on VMX Date: Fri, 27 Aug 2010 12:47:33 +0300 Message-ID: <4C7789B5.8040707@redhat.com> References: <1282853162-16925-1-git-send-email-Jes.Sorensen@redhat.com> <1282853162-16925-2-git-send-email-Jes.Sorensen@redhat.com> <4C778386.8090902@redhat.com> <4C77882D.7000308@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, gleb@redhat.com To: Jes Sorensen Return-path: Received: from mx1.redhat.com ([209.132.183.28]:2548 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754807Ab0H0Jrh (ORCPT ); Fri, 27 Aug 2010 05:47:37 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o7R9laEW028583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 27 Aug 2010 05:47:37 -0400 In-Reply-To: <4C77882D.7000308@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/27/2010 12:41 PM, Jes Sorensen wrote: > On 08/27/10 11:21, Avi Kivity wrote: >>> 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_clear_bits() is a nicer way of doing this. >> > Ok, try v2 that I just posted - and forgot to add v2 in the Subject line > to - sorry. > Well, in light of Jan's comment re sti; hlt being clobbered by this, we should think about requesting an interrupt window instead... -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.