Skip to content

Commit 8293dc7

Browse files
ladiprogregkh
authored andcommitted
KVM: nVMX: set IDTR and GDTR limits when loading L1 host state
commit 21f2d551183847bc7fbe8d866151d00cdad18752 upstream. Intel SDM 27.5.2 Loading Host Segment and Descriptor-Table Registers: "The GDTR and IDTR limits are each set to FFFFH." Signed-off-by: Ladi Prosek <lprosek@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4e426ed commit 8293dc7

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

arch/x86/kvm/vmx.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10394,6 +10394,8 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu,
1039410394
vmcs_writel(GUEST_SYSENTER_EIP, vmcs12->host_ia32_sysenter_eip);
1039510395
vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base);
1039610396
vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base);
10397+
vmcs_write32(GUEST_IDTR_LIMIT, 0xFFFF);
10398+
vmcs_write32(GUEST_GDTR_LIMIT, 0xFFFF);
1039710399

1039810400
/* If not VM_EXIT_CLEAR_BNDCFGS, the L2 value propagates to L1. */
1039910401
if (vmcs12->vm_exit_controls & VM_EXIT_CLEAR_BNDCFGS)

0 commit comments

Comments
 (0)