Commit 0c468a6a authored by Tony Luck's avatar Tony Luck Committed by Sean Christopherson

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: default avatarTony Luck <tony.luck@intel.com>
Link: https://lore.kernel.org/r/20240520224620.9480-10-tony.luck@intel.com
[sean: massage changelog]
Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent 8387435b
...@@ -2525,17 +2525,15 @@ static bool cpu_has_sgx(void) ...@@ -2525,17 +2525,15 @@ static bool cpu_has_sgx(void)
*/ */
static bool cpu_has_perf_global_ctrl_bug(void) static bool cpu_has_perf_global_ctrl_bug(void)
{ {
if (boot_cpu_data.x86 == 0x6) { switch (boot_cpu_data.x86_vfm) {
switch (boot_cpu_data.x86_model) { case INTEL_NEHALEM_EP: /* AAK155 */
case INTEL_FAM6_NEHALEM_EP: /* AAK155 */ case INTEL_NEHALEM: /* AAP115 */
case INTEL_FAM6_NEHALEM: /* AAP115 */ case INTEL_WESTMERE: /* AAT100 */
case INTEL_FAM6_WESTMERE: /* AAT100 */ case INTEL_WESTMERE_EP: /* BC86,AAY89,BD102 */
case INTEL_FAM6_WESTMERE_EP: /* BC86,AAY89,BD102 */ case INTEL_NEHALEM_EX: /* BA97 */
case INTEL_FAM6_NEHALEM_EX: /* BA97 */ return true;
return true; default:
default: break;
break;
}
} }
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment