Skip to contentSkip to conversation

KVM: nVMX: Update vmcs12->guest_linear_address on nested VM-exit

PATCH Applied Jim Mattson 2 participants 2 messages Jun 1, 2017 – Jun 7, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: nVMX: Update vmcs12->guest_linear_address on nested VM-exit

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")
---
 arch/x86/kvm/vmx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/x86/kvm/vmx.c +1 -2
index c12336087850..ae66ebc7fb82 100644
@@ -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);
Signature · 1 line
2.13.0.219.gdb65acc882-goog
#1 lore raw

2017-06-01 12:44-0700, Jim Mattson:

Quoted 8 lines

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")

---

Queued, thanks.