Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2171138lqa; Tue, 30 Apr 2024 09:52:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXdTsG7H8pyN2t8U7ilWqAxz5YtCMTREkKzpmLlrW62xaQpyjn+lRtJFvC4gIu55ZWdW3E8QJYNnMT1wTUfgWfMuYrrWXZNu6EULNNLtg== X-Google-Smtp-Source: AGHT+IHiXot+7ov2KLRjjRYP13wpRVXlAtAfGSKgZjI01SkCVVxRdt43X/hpi8z4c6R1/HDHV94m X-Received: by 2002:a67:b34a:0:b0:47c:2408:6203 with SMTP id b10-20020a67b34a000000b0047c24086203mr390208vsm.25.1714495949506; Tue, 30 Apr 2024 09:52:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714495949; cv=pass; d=google.com; s=arc-20160816; b=uVujt5kqgFz8Cct6s8Yw99+qPpxrXS/1h9oLc9w10Sj6M7/dmBLdvxmiurviji3gJg HOrBcGPocQJTKtpHzARxhwEhPraiFPGO1OL7fbLmbJrpdW6Wwe2KSwq7q+pOhxSO4R4D 2hp8/3L6p4z8Y0sov7+jAhe8YeSIlmXdbrr/2a07dZ6xgX3VpQTTIuqyvaHDNLNLQXsV WCvsk270L72cTHebihYxt+ydItBQd2IymGcrTGzV2w4qC1+uw/oYEqjz9wDmUM4y6oaO +wqQJTslcpjiJD2CAFwMOTZoT5Ey3TWAVcXa80W8fa35HSwUgz1Watq/dFVWZug6jo1+ shhA== 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=hre+1qfo7EqK6qdwIKLlxAe6OwHNU1VOtJPICRgFWag=; fh=8hISmOf1Vf7FafJp+lML+onWFG/LEzD1mOFPp1kHNps=; b=kshrBTtME8C8AZ4m5UkbVDwR3S8XKbteWWM3q81BV4CqVf1CZwTjE7wwEylBr6Pt5V QvjUmwo7CKNuqJjNzdM9pUOefSmdrxqsPYCXgol5gIDuq0fgNBHATnMNeqo16qds8uty bZ0TNduz/EHwfSdqJOD+woogOjFiBUgSCf+2uWZb42SLBeWEVrsTI1Wc1GUSmt/FYAx/ 0TImJNZqljcwYmOE9PbTNlOXqrFVDbHvRqghDNHWbcV+it7DE0aL2QrYEzNaMaa+T0g4 wcDNblLAf4QRy3Hv/ndB9E3fBrUFvIA36tVuMHXnJxgAgBqUJ6TPe5MTAtJc7Yt2Lq+1 FtbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="DL/F6gz3"; 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-164434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164434-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id x27-20020a056102323b00b0047a29e123d2si4472496vsf.181.2024.04.30.09.52.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 09:52:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="DL/F6gz3"; 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-164434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164434-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id D6E0F1C23DFA for ; Tue, 30 Apr 2024 16:52:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F602181B82; Tue, 30 Apr 2024 16:51:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="DL/F6gz3" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 9520E17BB10 for ; Tue, 30 Apr 2024 16:51:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714495896; cv=none; b=BhYkMmPWh6Ww33EDJJ3qihK+eCkZiU75P+MQORqqwqihufaMkZk2SxYwwAzugVdgE2bGmR0FTWAP4TVg4ns6JqRIkuKyrB6qDz3B/xjb2sMqB4rda/IufCzzxhb0m7jVWdLkvkt/DyiokOP5eDx6J7ZV8Gd1E7GzX0M1c0+Ws+0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714495896; c=relaxed/simple; bh=DTmj/yYZ5S3zG9s0UR1lWeqfV7XL+xXwEY+aB15HzFA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Hb04UBKJKwE9IbKnm1t4pyE6Xm/0+uo6egaFitcKGvsuVOc/y2SMvnmT4VrSyq07S5QyKhUpw6Exd7Sk6Na958CthIZPoKFWR/BfXKK2+stebPMSX+bI8xe2Aux2wUBpziZpXkaWxDlIauFsituxn8+OpHb5fcN4zezU8c2FZ7k= 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=DL/F6gz3; arc=none smtp.client-ip=198.175.65.19 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=1714495895; x=1746031895; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=DTmj/yYZ5S3zG9s0UR1lWeqfV7XL+xXwEY+aB15HzFA=; b=DL/F6gz3oZVlclKVMVCrLMZ4SaivuQ975UGhqVnZJcv6AYWTRDTEKlmv gyhSf5sHeFrJS0kFcbjE3+yDO30rSwCnFexEt33UoquqmIz13p8jLwKPj uQmolRaE13xoMNvzaapwpG8ObgEB7Nw0pAW7nX2H3NOitzhG+RYrmqoL6 l6eXbdN98+8Y6CCNN/nMrRBZqCgGGVR69RI4HUWA5trWUlr/jSi9lcPGT RWQWu8PRC9b0vQ0jqsYI1uF16KN+4aq4MrNXM/jguEQtyQt4+CE7N9++w e7Chf9fZLIYprih1xP2VUMJtG8mYCgxlnJdzwVDtBQXF4JRkVOtMRLn4c w==; X-CSE-ConnectionGUID: VVwmuPpOSHeQ+wjPBXt8DQ== X-CSE-MsgGUID: xRyVPob8T0OGgh7kanDYNw== X-IronPort-AV: E=McAfee;i="6600,9927,11060"; a="10075624" X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="10075624" Received: from fmviesa007.fm.intel.com ([10.60.135.147]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 09:51:21 -0700 X-CSE-ConnectionGUID: anfkp59/Qg6H7QpFiAyMdQ== X-CSE-MsgGUID: 6BisjhuYQrekitoFHVbG5w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="26515421" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by fmviesa007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Apr 2024 09:51:12 -0700 From: Tony Luck To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck , Sean Christopherson Subject: [PATCH v5 07/47] KVM: VMX: Switch to new Intel CPU model defines Date: Tue, 30 Apr 2024 09:50:20 -0700 Message-ID: <20240430165100.73491-7-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240430165100.73491-1-tony.luck@intel.com> References: <20240430164913.73473-1-tony.luck@intel.com> <20240430165100.73491-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 c37a89eda90f..2c747f2642c6 100644 --- a/arch/x86/kvm/vmx/vmx.c +++ b/arch/x86/kvm/vmx/vmx.c @@ -2518,17 +2518,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.44.0