Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2746439lqo; Mon, 20 May 2024 15:48:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXdq4AR1bZfvS32sf7n/lqrkrvQXB4JPuGsHgU7KUONzv3P929/7u6nY0ylTnMtdNj3TeF9tmy9VGS6fU6ZZV0yziUQYdoupd3N0FGUXQ== X-Google-Smtp-Source: AGHT+IFZAyGGcM559ye8YZAyQ/VX/cnBQQ18jIBPwLHNXDAe0ywLEAc6MUhQVXLXW7+0X+G0+5rM X-Received: by 2002:a17:906:c111:b0:a5a:889c:1e38 with SMTP id a640c23a62f3a-a5a889c1ebbmr1466670366b.39.1716245287244; Mon, 20 May 2024 15:48:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716245287; cv=pass; d=google.com; s=arc-20160816; b=TsyNZ4lp2O1cNLECWHNWe4in044fDIGXd9iCvbzBxEm4bI/Os3ZnE7hPXV3q7uzp4t tVSonJH/piqBVx3crfxdZIj1PjnWJpyJJ1uWQyZejpGXjqGb3mtFkLrLwLcxowZFFyLB hrWBHMX8O4la/6Gn7YNj+wICCaivOm3PlpR7HFBwshgvXxYX9dNX0/FPwaTRu3jZdSmp osD93jrJi4r8EdE2S+gsh0GGY9BspYoDwm36eADrYbDe1UA2qQeUUMb1eJ6x79nZg0Cm 4lrPTgSx7JXG3lK3gQ4kz6T5u4AXqKy3nYd1Vn1Tqb8Yus0oMJl38InlSnt42VhznT8A AJVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Uz28ZknB0Z55FWqzGoNoeHQm8qY+kJ0FB8sAv1muXUk=; fh=DhUj25ihWaU1NJFr1npS1xJMFpKZWtUyNg+137ifISQ=; b=Ebd3f+nW9B7MG7V3Fu4u6ij6Z3yTVEGxG3NiVWjFNhgykLuI0DVX/mab8imMjIof65 1kmpa2jZh3UsSnqqVVsOH/qNjlifXjVKIJOqDxdYYsyHIB3efRKxoB7pJC5QVPOxKXzg QyKkj1qrSGnfbQGsYG+I4aq+XsRF9AcrbGWr3N1BXBFE36BXeGla/bxFezx/9dqBqabw isywgKv07V/iyj2SpWZ+ZyekXwh38RgxOVvheXKXfQQCeGWiRsCgevkcYSD4txX5seU4 agsUU40Kbl2RQPYMnwxA1tZJ1gtC06qBq2n0/gbTA13Ib0H1SCuvdOfctLCbRNHYFIjn td1A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B5qjDzrA; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-184237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184237-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17bfd341si1303706666b.867.2024.05.20.15.48.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 15:48:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=B5qjDzrA; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-184237-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184237-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 900971F2112E for ; Mon, 20 May 2024 22:48:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E635A13AA3C; Mon, 20 May 2024 22:46:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="B5qjDzrA" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 41BFB13A250 for ; Mon, 20 May 2024 22:46:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716245202; cv=none; b=kxwsoUPzWu9zUf+LaiwHrKxe7fq8GHjArtQr56iT8BMfoyRMgqIs838XW6sATQuznUeotHQBr08WR9+lMoVMrF8aAofvytZtFLacXoJu3/ygCF14hvyJvsl69Q3DtIiAdrDEwWNG36EPvUDKBVf1jtCY34X8iLfl9fRaqZe6Cqw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716245202; c=relaxed/simple; bh=SrCUXI/oM/RyfJid2zkIs4n9nvj5uW7YKEMoo1adejA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KNH7iD0MXJOLHMBVKKiaefSUyiOwkgSCfPMbmllTVaKXnebf4TznwvlAM4Xj/kLniZmJYRQ6LZ5fNuVJZDNkEawjapzRtpInc8yububfbRNRi8FSAg7IGNRwtM9jUfsI1+HPJG9Qvqurw003leK0dnhIIlfwdNmUuvvqtsguCXA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=B5qjDzrA; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1716245201; x=1747781201; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=SrCUXI/oM/RyfJid2zkIs4n9nvj5uW7YKEMoo1adejA=; b=B5qjDzrAHfcgnWGUKHf3mFXs82WZ8/U3NhADcmEmWx46FBdncdvzmt2o y0KRknvMjNbYNlxCHLsCRbzBd1twLnJF7K/ISAIb5tjJ6RRX7OaPdp/mM UWjL5QQoQUo9JRxQ2KvFXrAzP3b8f1eRokJtJNNLTwqQGPcLL9ncpAJRr irpzil3d+uaCVm1Il3C3U9tuEjDklIBWdoAANytmhFnyEFOH6VUJrKVa3 0XCYs1cebFAgyyE/4SVTjvMb1MJ6o+YB76Ld5e/XlKwjeu5NU0Hyfqx8z xA4Go46oqV5A0eLLIrw91dVIf3YzrCgLiFk07v6nPgJh9S95nM63W4uCG w==; X-CSE-ConnectionGUID: v/OiVYVGTMWiUuP8J+F8EQ== X-CSE-MsgGUID: QfxRmTJAQkSnniAdy8DKdA== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12199599" X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="12199599" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 15:46:36 -0700 X-CSE-ConnectionGUID: hUI/PFvgSy+kdlt5jv+Wtw== X-CSE-MsgGUID: rEtX2mjpRy677qKZA6Yolg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="32593409" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2024 15:46:36 -0700 From: Tony Luck To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H. Peter Anvin" , "Peter Zijlstra (Intel)" , Uros Bizjak , Rick Edgecombe , Arnd Bergmann , Tony Luck , Mateusz Guzik , Thomas Renninger , Andi Kleen , linux-kernel@vger.kernel.org, patches@lists.linux.dev, Sean Christopherson Subject: [PATCH v6 09/49] KVM: VMX: Switch to new Intel CPU model defines Date: Mon, 20 May 2024 15:45:40 -0700 Message-ID: <20240520224620.9480-10-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240520224620.9480-1-tony.luck@intel.com> References: <20240520224620.9480-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit New CPU #defines encode vendor and family as well as model. Signed-off-by: Tony Luck Acked-by: Sean Christopherson --- arch/x86/kvm/vmx/vmx.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c index 6051fad5945f..ceb0c1e6275a 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -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; -- 2.45.0