Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 119a9c01 authored by Jan Dakinevich's avatar Jan Dakinevich Committed by Paolo Bonzini
Browse files

KVM: nVMX: pass valid guest linear-address to the L1



If EPT support is exposed to L1 hypervisor, guest linear-address field
of VMCS should contain GVA of L2, the access to which caused EPT violation.

Signed-off-by: default avatarJan Dakinevich <jan.dakinevich@gmail.com>
Reviewed-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 3706feac
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -10500,6 +10500,9 @@ static void prepare_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);

	if (nested_cpu_has_vid(vmcs12))
		vmcs12->guest_intr_status = vmcs_read16(GUEST_INTR_STATUS);