x86/Intel: skip PLATFORM_INFO reads on family 0xf
authorJan Beulich <jbeulich@suse.com>
Mon, 14 Feb 2022 09:04:35 +0000 (10:04 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 14 Feb 2022 09:04:35 +0000 (10:04 +0100)
This avoids unnecessary (and always somewhat scary) log messages for the
recovered from #GP(0).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Roger Pau Monné <roger.pau@citrix.com>
xen/arch/x86/cpu/common.c
xen/arch/x86/cpu/intel.c

index c4f07f2d1da4dc8690ad5fe7f33563c5b23a974e..3d61d95386858b1d5fbd4a92e4d31d56bf8cd327 100644 (file)
@@ -127,9 +127,12 @@ bool __init probe_cpuid_faulting(void)
 
        /*
         * Don't bother looking for CPUID faulting if we aren't virtualised on
-        * AMD or Hygon hardware - it won't be present.
+        * AMD or Hygon hardware - it won't be present.  Likewise for Fam0F
+        * Intel hardware.
         */
-       if ((boot_cpu_data.x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) &&
+       if (((boot_cpu_data.x86_vendor & (X86_VENDOR_AMD | X86_VENDOR_HYGON)) ||
+            ((boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) &&
+             boot_cpu_data.x86 == 0xf)) &&
            !cpu_has_hypervisor)
                return false;
 
index 06b0e552cc8f55b917d4272594c791070357e56d..5ec67cf9e07ff71af2dd4664e7b9b0dcaf5f9a46 100644 (file)
@@ -455,7 +455,7 @@ static void intel_log_freq(const struct cpuinfo_x86 *c)
         }
     }
 
-    if ( rdmsr_safe(MSR_INTEL_PLATFORM_INFO, msrval) )
+    if ( c->x86 == 0xf || rdmsr_safe(MSR_INTEL_PLATFORM_INFO, msrval) )
         return;
     max_ratio = msrval >> 8;