]> git.baikalelectronics.ru Git - 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)
commit726961446985f6d23234f4143529d6e881cbcc7f
tree4468a4de6fb69bd9d7d5fcb1adbfd57a8764802a
parent75a460b7b0efab2941b00443fb0276ebc685b9bc
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: bc58621fef4c ("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