From: VMware, Inc <> Date: Sat, 28 May 2011 19:55:10 +0000 (-0700) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2011.05.27-420096~36 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=44c2e43562e0abc43efae8a47dcee66165b43db3;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 3f68c63d0..5018cffb9 100644 --- a/open-vm-tools/lib/include/x86cpuid.h +++ b/open-vm-tools/lib/include/x86cpuid.h @@ -695,8 +695,8 @@ FIELD(81E, ECX, AMD, 8, 3, NODES_PER_PKG, NA, FALSE) CPUID_INTERNAL_SHIFT_##name = bitpos, \ CPUID_INTERNAL_MASK_##name = VMW_BIT_MASK(size) << bitpos, \ CPUID_INTERNAL_REG_##name = CPUID_REG_##reg, \ - CPUID_INTERNAL_EAXIN_##name = CPUID_LEVEL_VAL_##lvl, - + CPUID_INTERNAL_EAXIN_##name = CPUID_LEVEL_VAL_##lvl, \ + CPUID_INTERNAL_ECXIN_##name = 0, #define FLAG FIELD @@ -1258,5 +1258,19 @@ CPUID_IsHypervisorLevel(uint32 level) return (level & 0xffffff00) == 0x40000000; } +/* + *---------------------------------------------------------------------- + * + * CPUID_LevelUsesEcx -- + * + * Returns TRUE for leaves that support input ECX != 0 (subleaves). + * + *---------------------------------------------------------------------- + */ + +static INLINE Bool +CPUID_LevelUsesEcx(uint32 level) { + return level == 4 || level == 7 || level == 0xb || level == 0xd; +} #endif