Revert "KVM: x86: expose MSR_TSC_AUX to userspace"
authorBen Hutchings <ben@decadent.org.uk>
Mon, 6 Mar 2017 19:07:35 +0000 (19:07 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 16 Mar 2017 02:18:58 +0000 (02:18 +0000)
This reverts commit bc48f6f5a8c6d628a1af649306eaf906493bb986, which was
commit 9dbe6cf941a6fe82933aef565e4095fb10f65023 upstream.  It depends on
several other large commits to work, and without them causes a regression.

References: https://bugzilla.redhat.com/show_bug.cgi?id=1408333
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Eric Wheeler <kvm@lists.ewheeler.net>
arch/x86/kvm/x86.c

index 4408aee..d0284b4 100644 (file)
@@ -843,8 +843,7 @@ static u32 msrs_to_save[] = {
 #ifdef CONFIG_X86_64
        MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
 #endif
 #ifdef CONFIG_X86_64
        MSR_CSTAR, MSR_KERNEL_GS_BASE, MSR_SYSCALL_MASK, MSR_LSTAR,
 #endif
-       MSR_IA32_TSC, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA,
-       MSR_TSC_AUX,
+       MSR_IA32_TSC, MSR_IA32_CR_PAT, MSR_VM_HSAVE_PA
 };
 
 static unsigned num_msrs_to_save;
 };
 
 static unsigned num_msrs_to_save;
@@ -3882,20 +3881,6 @@ static void kvm_init_msr_list(void)
        for (i = j = KVM_SAVE_MSRS_BEGIN; i < ARRAY_SIZE(msrs_to_save); i++) {
                if (rdmsr_safe(msrs_to_save[i], &dummy[0], &dummy[1]) < 0)
                        continue;
        for (i = j = KVM_SAVE_MSRS_BEGIN; i < ARRAY_SIZE(msrs_to_save); i++) {
                if (rdmsr_safe(msrs_to_save[i], &dummy[0], &dummy[1]) < 0)
                        continue;
-
-               /*
-                * Even MSRs that are valid in the host may not be exposed
-                * to the guests in some cases.
-                */
-               switch (msrs_to_save[i]) {
-               case MSR_TSC_AUX:
-                       if (!kvm_x86_ops->rdtscp_supported())
-                               continue;
-                       break;
-               default:
-                       break;
-               }
-
                if (j < i)
                        msrs_to_save[j] = msrs_to_save[i];
                j++;
                if (j < i)
                        msrs_to_save[j] = msrs_to_save[i];
                j++;