diff options
author | Ladi Prosek <lprosek@redhat.com> | 2017-10-11 16:54:42 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-11-30 08:40:53 +0000 |
commit | 0b09ee40aae7ca0c4a7956dcbc5361c5ef7ccf2e (patch) | |
tree | 136fa7a393adbc4a93064c1d7be903cc062924b9 /arch | |
parent | f5073bc7c18358d08bc9dd39458bc469dc9e978d (diff) | |
download | linux-stable-0b09ee40aae7ca0c4a7956dcbc5361c5ef7ccf2e.tar.gz linux-stable-0b09ee40aae7ca0c4a7956dcbc5361c5ef7ccf2e.tar.bz2 linux-stable-0b09ee40aae7ca0c4a7956dcbc5361c5ef7ccf2e.zip |
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>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kvm/vmx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index a6f4f095f8f4..41794e287f41 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -11325,6 +11325,8 @@ static void load_vmcs12_host_state(struct kvm_vcpu *vcpu, vmcs_writel(GUEST_SYSENTER_EIP, vmcs12->host_ia32_sysenter_eip); vmcs_writel(GUEST_IDTR_BASE, vmcs12->host_idtr_base); vmcs_writel(GUEST_GDTR_BASE, vmcs12->host_gdtr_base); + vmcs_write32(GUEST_IDTR_LIMIT, 0xFFFF); + vmcs_write32(GUEST_GDTR_LIMIT, 0xFFFF); /* If not VM_EXIT_CLEAR_BNDCFGS, the L2 value propagates to L1. */ if (vmcs12->vm_exit_controls & VM_EXIT_CLEAR_BNDCFGS) |