Skip to content

Commit

Permalink
KVM: nVMX: pass valid guest linear-address to the L1
Browse files Browse the repository at this point in the history
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: Jan Dakinevich <jan.dakinevich@gmail.com>
Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Jan Dakinevich authored and Paolo Bonzini committed Sep 7, 2016
1 parent 3706fea commit 119a9c0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 119a9c0

Please sign in to comment.