Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2173304lqa; Tue, 30 Apr 2024 09:56:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW8eQAljrtFSaJuMis/cNhPoWK+etXdbEphHmkvI1hvZ7dw7oV8E3E8KSQWTiza346uNa2Bo2vHc3OhF5CSaFR7/qd5NHyHgLJoD+9J3w== X-Google-Smtp-Source: AGHT+IFHs4bI3b2SJAB7VMmffExXdVgWShd1VMuCsdc4zGjb443DZVzb/mCIpoq/QXNmqZk5L83K X-Received: by 2002:ac8:5a0d:0:b0:43a:b16d:a0ca with SMTP id n13-20020ac85a0d000000b0043ab16da0camr3639323qta.60.1714496170472; Tue, 30 Apr 2024 09:56:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714496170; cv=pass; d=google.com; s=arc-20160816; b=AtMCJITNijgyA/hrc5ozD7mvdvmVob+Mb3v9kqvHIXX5UR23/zQaW9KULYAM9/S9gj EM1JerobyxaXwDzIA7n+gGJF6GA1YFh8jyUDcNYScuGyszuSoUZa08uVxGHqmtKrBcy3 BNoiLuBfzZDXR9YQhj7unBI/tiLjaZlF3oAWi6/LaLAoY2MCtOjz/JML4I9jqcjtMFdr fcWGLrnxHeeuLShNWfws7DlagvitXI52Qx0wg1X+kpbXAVw7fV1+wBLP8DS5/Q5qZyRy dvubQmnL57T0NAMEB0QoT30wETg73fsxc3gnw5nSx640aaApGdBefs7y9iOKptCxXSp4 TfUg== 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=Rq9wVB4xkBCGISZsEhHbQrThqEuv7lrOrjMYtRCpqDs=; fh=fCCNFvJbPqqXo45yXdlgqaDimb/JVSzwDZSVTcpWFog=; b=HEeaOAikc8MBp+Bl0n3rmoMLe8LBml8k5mlBVUvMVxBcwDa+HJUEe1lXOauw7eDW4j un2M5Hlygv9FrmCMy9qatC9picT44ZU3dSgYd2H8oWU3xKQXK1ex8wyHi2A4AwdJQbyF OoroiwrlRvfjhuMGTWCupgaEv2SllZMiCUwPTK0Fi42cf+VhGRHCCFap5V03DhJVS0Bj nhevEaC83l6ON0NuOXEyv7PcBV4cH7g3RQmJDNcVWygaapbsdtcezzBYtIW1JxnMX85f mpUEUVS1uIkRSisOdmgjr94D2khT5eIMayXK0v7Yc2Nip7ERj+RDGzKqjmuoIks5YnRY 2rKw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ahS5KRVC; 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-164454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164454-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id w22-20020ac857d6000000b0043acbc10181si6319404qta.182.2024.04.30.09.56.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 09:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ahS5KRVC; 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-164454-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164454-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 2F2151C23CE2 for ; Tue, 30 Apr 2024 16:56:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9D1DC1C0DCF; Tue, 30 Apr 2024 16:51:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ahS5KRVC" 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 971B6190682 for ; Tue, 30 Apr 2024 16:51:46 +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=1714495908; cv=none; b=s8kjkeMdwnx9rLhFkmQtR43gycZ08mmz4bsxkntB0PXu3DUAL/KXj+dQLRlZ6/cLUrTXsnmkEy7Hs+42u1Vg95YZnaxLNDANfNH2S6Ldzwz7KPjO+Zh7TrtUndpEBWYaai4ujCXav5Vd0buLRT+tIK1XuCvb8Lczu4ARpXgp+2s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714495908; c=relaxed/simple; bh=zpJumNq7u5KsT133nYF8l88fxW5RaBTIKz2lN9diWJs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mPPMNQpYLyH6Y49r4jqi7CReChyNhWawMlq50a7XUIp2klewDVtyWUrvHMw3hunRjqt/FfqP4FjJBKHCt2G9pYkQuzJojs5x18D6l1iqlzZLpjbg/4HCPbrdmFYzycmGLAYScoTZb2N10xC9fvUhSttng1pZSlsyzh/Wtou7jW0= 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=ahS5KRVC; 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=1714495907; x=1746031907; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zpJumNq7u5KsT133nYF8l88fxW5RaBTIKz2lN9diWJs=; b=ahS5KRVCwWdQtSKZGqFATWxornnFrCKSa8h2U4I1ddOP8lML2Qzb+yDA /5vv6Ar9fqCbg8qDKbaQAKNX3JnwnV2FrALz2F/rWdyp4XEkJMj9CuDbq 0LrPifvBQDvndj6mEYzzBzeo8jHxxNn3HYd0TYL2IvRb7aePOJJ8AwPdf uxa/JoaQymOaO2XZG2qqI0y9KkfXuJAve8yO6pIQAwwN/BLWJ8IDSWAzF eDzU9IO9+L7VlMd4tsYygSFZO+NbEkZ2W2y9wbc0bOEreFC/PK4JjbNtN zNOQKNinOXwJTVaNPsdQW3AD9uoZnN6fjBuWUX5AmZoFFaerx0QQVTBW5 g==; X-CSE-ConnectionGUID: ffOdWST8RkWJJY2h5ggBJQ== X-CSE-MsgGUID: CqiKpYyXTsy6wRS3b9Spvw== X-IronPort-AV: E=McAfee;i="6600,9927,11060"; a="10075753" X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="10075753" 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:23 -0700 X-CSE-ConnectionGUID: kHKJNDQVT56RmmYTZONdHg== X-CSE-MsgGUID: 0GWIDDisQhOierrHHt5dwQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,242,1708416000"; d="scan'208";a="26515492" 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:19 -0700 From: Tony Luck To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v5 28/47] x86/virt/tdx: Switch to new Intel CPU model defines Date: Tue, 30 Apr 2024 09:50:41 -0700 Message-ID: <20240430165100.73491-28-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 --- arch/x86/virt/vmx/tdx/tdx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/virt/vmx/tdx/tdx.c b/arch/x86/virt/vmx/tdx/tdx.c index 4d6826a76f78..ee9a9273b75a 100644 --- a/arch/x86/virt/vmx/tdx/tdx.c +++ b/arch/x86/virt/vmx/tdx/tdx.c @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include #include "tdx.h" @@ -1427,9 +1427,9 @@ static void __init check_tdx_erratum(void) * private memory poisons that memory, and a subsequent read of * that memory triggers #MC. */ - switch (boot_cpu_data.x86_model) { - case INTEL_FAM6_SAPPHIRERAPIDS_X: - case INTEL_FAM6_EMERALDRAPIDS_X: + switch (boot_cpu_data.x86_vfm) { + case INTEL_SAPPHIRERAPIDS_X: + case INTEL_EMERALDRAPIDS_X: setup_force_cpu_bug(X86_BUG_TDX_PW_MCE); } } -- 2.44.0