]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Thu, 22 Dec 2011 00:25:13 +0000 (16:25 -0800)
committerMarcelo Vanzin <mvanzin@vmware.com>
Thu, 22 Dec 2011 00:25:13 +0000 (16:25 -0800)
Signed-off-by: Marcelo Vanzin <mvanzin@vmware.com>
open-vm-tools/lib/include/x86cpuid.h

index 1b84e3d178350c64f60e8b18ef984302c8e26bf4..2a95780c5bf5b8191e7390af74e5498fd718f17e 100644 (file)
@@ -1420,4 +1420,23 @@ CPUID_IsValidDSubleaf(uint32 subleaf)  // IN: subleaf to check
 {
    return subleaf <= 63;
 }
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * CPUID_SupportsMsrPlatformInfo --
+ *
+ *    Uses vendor and cpuid.1.0.eax to determine if the processor
+ *    supports MSR_PLATFORM_INFO.
+ *
+ *----------------------------------------------------------------------
+ */
+static INLINE Bool
+CPUID_SupportsMsrPlatformInfo(CpuidVendor vendor, uint32 version)
+{
+   return vendor == CPUID_VENDOR_INTEL &&
+          (CPUID_UARCH_IS_NEHALEM(version) ||
+           CPUID_UARCH_IS_SANDYBRIDGE(version));
+}
+
 #endif