From mboxrd@z Thu Jan 1 00:00:00 1970 From: Liran Alon Subject: Re: [PATCH] KVM: nVMX: remove unnecessary vmwrite from L2->L1 vmexit Date: Tue, 02 Jan 2018 11:47:10 +0200 Message-ID: <5A4B551E.2020603@ORACLE.COM> References: <1514847495-29681-1-git-send-email-pbonzini@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: jmattson@google.com To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Return-path: In-Reply-To: <1514847495-29681-1-git-send-email-pbonzini@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 02/01/18 00:58, Paolo Bonzini wrote: > The POSTED_INTR_NV field is constant (though it differs between the vmcs01 and > vmcs02), there is no need to reload it on vmexit to L1. > > Signed-off-by: Paolo Bonzini > --- > arch/x86/kvm/vmx.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index e6223fe8faa1..1e184830a295 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -11610,9 +11610,6 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu, > */ > vmx_flush_tlb(vcpu, true); > } > - /* Restore posted intr vector. */ > - if (nested_cpu_has_posted_intr(vmcs12)) > - vmcs_write16(POSTED_INTR_NV, POSTED_INTR_VECTOR); > > vmcs_write32(GUEST_SYSENTER_CS, vmcs12->host_ia32_sysenter_cs); > vmcs_writel(GUEST_SYSENTER_ESP, vmcs12->host_ia32_sysenter_esp); > Reviewed-by: Liran Alon I would also add to commit message: Fixes: 06a5524f091b ("KVM: nVMX: Fix posted intr delivery when vcpu is in guest mode")