From: VMware, Inc <> Date: Thu, 27 Oct 2011 18:42:37 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.10.26-514583~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f5ff1d421c43202f0493f28a3e0e8a81bd07a07e;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 c0e15bce7..97aa2023c 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -1123,6 +1123,18 @@ CPUID_MODEL_IS_WESTMERE(uint32 v) // IN: %eax from CPUID with %eax=1. } +static INLINE Bool +CPUID_MODEL_IS_SANDYBRIDGE(uint32 v) // IN: %eax from CPUID with %eax=1. +{ + /* Assumes the CPU manufacturer is Intel. */ + uint32 effectiveModel = CPUID_EFFECTIVE_MODEL(v); + + return CPUID_FAMILY_IS_P6(v) && + (effectiveModel == CPUID_MODEL_SANDYBRIDGE_2A || + effectiveModel == CPUID_MODEL_SANDYBRIDGE_2D); +} + + static INLINE Bool