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>
This commit is contained in:
Tony Luck 2024-05-20 15:45:40 -07:00 committed by Sean Christopherson
parent 8387435beb
commit 0c468a6a02

View File

@ -2525,17 +2525,15 @@ static bool cpu_has_sgx(void)
*/
static bool cpu_has_perf_global_ctrl_bug(void)
{
if (boot_cpu_data.x86 == 0x6) {
switch (boot_cpu_data.x86_model) {
case INTEL_FAM6_NEHALEM_EP: /* AAK155 */
case INTEL_FAM6_NEHALEM: /* AAP115 */
case INTEL_FAM6_WESTMERE: /* AAT100 */
case INTEL_FAM6_WESTMERE_EP: /* BC86,AAY89,BD102 */
case INTEL_FAM6_NEHALEM_EX: /* BA97 */
return true;
default:
break;
}
switch (boot_cpu_data.x86_vfm) {
case INTEL_NEHALEM_EP: /* AAK155 */
case INTEL_NEHALEM: /* AAP115 */
case INTEL_WESTMERE: /* AAT100 */
case INTEL_WESTMERE_EP: /* BC86,AAY89,BD102 */
case INTEL_NEHALEM_EX: /* BA97 */
return true;
default:
break;
}
return false;