]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
KVM: VMX: Intercept FS/GS_BASE MSR accesses for 32-bit KVM
authorSean Christopherson <seanjc@google.com>
Thu, 22 Apr 2021 02:38:31 +0000 (19:38 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 26 Apr 2021 09:27:10 +0000 (05:27 -0400)
commitdbdd096a5a74b94f6b786a47baef2085859b0dce
tree4468a4de6fb69bd9d7d5fcb1adbfd57a8764802a
parent844d69c26d836fde97bf6f38a0a69da9fa42e985
KVM: VMX: Intercept FS/GS_BASE MSR accesses for 32-bit KVM

Disable pass-through of the FS and GS base MSRs for 32-bit KVM.  Intel's
SDM unequivocally states that the MSRs exist if and only if the CPU
supports x86-64.  FS_BASE and GS_BASE are mostly a non-issue; a clever
guest could opportunistically use the MSRs without issue.  KERNEL_GS_BASE
is a bigger problem, as a clever guest would subtly be broken if it were
migrated, as KVM disallows software access to the MSRs, and unlike the
direct variants, KERNEL_GS_BASE needs to be explicitly migrated as it's
not captured in the VMCS.

Fixes: 25c5f225beda ("KVM: VMX: Enable MSR Bitmap feature")
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210422023831.3473491-1-seanjc@google.com>
[*NOT* for stable kernels. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c