]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: VMX: Configure list of user return MSRs at module init
authorSean Christopherson <seanjc@google.com>
Tue, 4 May 2021 17:17:27 +0000 (10:17 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 7 May 2021 10:06:17 +0000 (06:06 -0400)
commit2bc07406aa65fc4ac32cbfd99b23d3606fc9535b
treee5c51250dedd32acc79e4e04f0f62e197b2bd38a
parentf1f4844d15947595158966ef213912e391ee66d1
KVM: VMX: Configure list of user return MSRs at module init

Configure the list of user return MSRs that are actually supported at
module init instead of reprobing the list of possible MSRs every time a
vCPU is created.  Curating the list on a per-vCPU basis is pointless; KVM
is completely hosed if the set of supported MSRs changes after module init,
or if the set of MSRs differs per physical PCU.

The per-vCPU lists also increase complexity (see __vmx_find_uret_msr()) and
creates corner cases that _should_ be impossible, but theoretically exist
in KVM, e.g. advertising RDTSCP to userspace without actually being able to
virtualize RDTSCP if probing MSR_TSC_AUX fails.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210504171734.1434054-9-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/vmx.c
arch/x86/kvm/vmx/vmx.h