From: VMware, Inc <> Date: Thu, 22 Dec 2011 00:25:13 +0000 (-0800) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.12.20-562307~34 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5962a38cb67e4925779202e80a6731bdf619baec;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/include/x86cpuid.h b/open-vm-tools/lib/include/x86cpuid.h index 1b84e3d17..2a95780c5 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -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