From: Jim Mattson Subject: [PATCH] KVM: nVMX: Update vmcs12->guest_linear_address on nested VM-exit Date: Thu, 1 Jun 2017 12:44:46 -0700 Message-ID: <20170601194446.188113-1-jmattson@google.com> Cc: Jim Mattson To: kvm@vger.kernel.org, Jan Dakinevich Return-path: Received: from mail-pf0-f180.google.com ([209.85.192.180]:34327 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751050AbdFATpB (ORCPT ); Thu, 1 Jun 2017 15:45:01 -0400 Received: by mail-pf0-f180.google.com with SMTP id 9so35878250pfj.1 for ; Thu, 01 Jun 2017 12:45:01 -0700 (PDT) Sender: kvm-owner@vger.kernel.org List-ID: The guest-linear address field is set for VM exits due to attempts to execute LMSW with a memory operand and VM exits due to attempts to execute INS or OUTS for which the relevant segment is usable, regardless of whether or not EPT is in use. Fixes: 119a9c01a5922 ("KVM: nVMX: pass valid guest linear-address to the L1") Signed-off-by: Jim Mattson --- arch/x86/kvm/vmx.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index c12336087850..ae66ebc7fb82 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -10710,8 +10710,7 @@ static void sync_vmcs12(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12) vmcs12->guest_pdptr3 = vmcs_read64(GUEST_PDPTR3); } - if (nested_cpu_has_ept(vmcs12)) - vmcs12->guest_linear_address = vmcs_readl(GUEST_LINEAR_ADDRESS); + vmcs12->guest_linear_address = vmcs_readl(GUEST_LINEAR_ADDRESS); if (nested_cpu_has_vid(vmcs12)) vmcs12->guest_intr_status = vmcs_read16(GUEST_INTR_STATUS); -- 2.13.0.219.gdb65acc882-goog