Skip to content

Commit 0c468a6

Browse files
aeglsean-jc
authored andcommitted
KVM: VMX: Switch to new Intel CPU model infrastructure
Use x86_vfm (vendor, family, module) to detect CPUs that are affected by PERF_GLOBAL_CTRL bugs instead of manually checking the family and model. The new VFM infrastructure encodes all information in one handy location. No functional change intended. Signed-off-by: Tony Luck <tony.luck@intel.com> Link: https://lore.kernel.org/r/20240520224620.9480-10-tony.luck@intel.com [sean: massage changelog] Signed-off-by: Sean Christopherson <seanjc@google.com>
1 parent 8387435 commit 0c468a6

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

arch/x86/kvm/vmx/vmx.c

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2525,17 +2525,15 @@ static bool cpu_has_sgx(void)
25252525
*/
25262526
static bool cpu_has_perf_global_ctrl_bug(void)
25272527
{
2528-
if (boot_cpu_data.x86 == 0x6) {
2529-
switch (boot_cpu_data.x86_model) {
2530-
case INTEL_FAM6_NEHALEM_EP: /* AAK155 */
2531-
case INTEL_FAM6_NEHALEM: /* AAP115 */
2532-
case INTEL_FAM6_WESTMERE: /* AAT100 */
2533-
case INTEL_FAM6_WESTMERE_EP: /* BC86,AAY89,BD102 */
2534-
case INTEL_FAM6_NEHALEM_EX: /* BA97 */
2535-
return true;
2536-
default:
2537-
break;
2538-
}
2528+
switch (boot_cpu_data.x86_vfm) {
2529+
case INTEL_NEHALEM_EP: /* AAK155 */
2530+
case INTEL_NEHALEM: /* AAP115 */
2531+
case INTEL_WESTMERE: /* AAT100 */
2532+
case INTEL_WESTMERE_EP: /* BC86,AAY89,BD102 */
2533+
case INTEL_NEHALEM_EX: /* BA97 */
2534+
return true;
2535+
default:
2536+
break;
25392537
}
25402538

25412539
return false;

0 commit comments

Comments
 (0)