aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/svm
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-05-04 10:17:32 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2021-05-07 06:06:19 -0400
commite5fda4bbadb053e3b5164476146cf43092785c0b (patch)
tree7ef0f3493989addc52baa9b6a04bd40881376bd0 /arch/x86/kvm/svm
parent9cc39a5a43c05f8eda206bf9e144119820ecf5c8 (diff)
KVM: x86: Move uret MSR slot management to common x86
Now that SVM and VMX both probe MSRs before "defining" user return slots for them, consolidate the code for probe+define into common x86 and eliminate the odd behavior of having the vendor code define the slot for a given MSR. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210504171734.1434054-14-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm')
-rw-r--r--arch/x86/kvm/svm/svm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 0ba0a00f8dc6..d13b72bfb736 100644
--- a/arch/x86/kvm/svm/svm.c
+++ b/arch/x86/kvm/svm/svm.c
@@ -959,10 +959,7 @@ static __init int svm_hardware_setup(void)
kvm_tsc_scaling_ratio_frac_bits = 32;
}
- if (!kvm_probe_user_return_msr(MSR_TSC_AUX)) {
- tsc_aux_uret_slot = 0;
- kvm_define_user_return_msr(tsc_aux_uret_slot, MSR_TSC_AUX);
- }
+ tsc_aux_uret_slot = kvm_add_user_return_msr(MSR_TSC_AUX);
/* Check for pause filtering support */
if (!boot_cpu_has(X86_FEATURE_PAUSEFILTER)) {