[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] x86/Intel: skip PLATFORM_INFO reads on family 0xf


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 10 Feb 2022 15:55:52 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eUtuGMPyAObdf0J2/GPNj4BgwRzlxjTEV6wyVRInaNs=; b=HlRoy07vaIM5qMBm2TSWgpFCYJ1ewdZGeQjIBzPQk+xnLWUovYCndKjMoukVX+JSVa9zkAkgzFn9299gyKAsEju+zo2VBVP+HDvMt1WBIHd5HjoRunjGL85EWp66lwsJl/ZLh1F1ir+hLJhuF4QeuuJmplLMnpAvEORyrGXneYbKbxDPixhkJGqkzI5zvfhbzc1BQTWffFIZHYWIFrj4Zmq/XHwDSEaH0kSK6t5xDAj18FSPWu1FYHRPRL2q7gZjIZ3dhre55Ce/R2AKggcg/G+QdLRQTpDdEFuCemlax1XPxB5JJY2VzbzVL+sWcs8l3FHSbKX6wkzuoLT2IuOWPg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BJAKDzwgRvv8cJ7D4aRFUNlUpbWv1FTaINtIVn7BHLbTIBK0wixv4c8huL8watjjoIZ3BPXh82v5a5r2/JnQoLthu6Y7o+yfy2leRJOXUAZ8D+FDuje/BEij0L5RbW0eM7nWgfA2t5G/fxrlIXOGI3yIX1eFsiIetDsYjdSrNalun5Q2Gmux3xw4LacQRc4Ve7SCVPbPqhqsr5qqXvpR6Q/AVK5zFzNDijUAHDF1E/zYrxvjUWd6BYjFcvKQCHSs1oXg+/ugLDV4mBiAXgFDfu/ZwB+yBagCj0VWl6mFeI/NXYHWK3x5pkHQ/BX5YpNaHX8887M/a09LOnAwLVzUaA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Thu, 10 Feb 2022 14:55:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

This avoids unnecessary (and always somewhat scary) log messages for the
recovered from #GP(0).

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
Perhaps even use "!= 6" in at least the CPUID-faulting family check?

--- a/xen/arch/x86/cpu/common.c
+++ b/xen/arch/x86/cpu/common.c
@@ -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;
 
--- a/xen/arch/x86/cpu/intel.c
+++ b/xen/arch/x86/cpu/intel.c
@@ -455,7 +455,7 @@ static void intel_log_freq(const struct
         }
     }
 
-    if ( rdmsr_safe(MSR_INTEL_PLATFORM_INFO, msrval) )
+    if ( c->x86 == 0xf || rdmsr_safe(MSR_INTEL_PLATFORM_INFO, msrval) )
         return;
     max_ratio = msrval >> 8;
 




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.