Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp610504lqd; Wed, 24 Apr 2024 11:21:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWPGmWXh8xoEwR1dP+NeaaB1cl5AzSpatq6lZA+7PkWrdm01eKwTQHZHCBhGyNLGxPIDtapvCgcrePExGZVlWNRATPhSc34C9Owxp4eJw== X-Google-Smtp-Source: AGHT+IEWibt3bgBDUs5Jf2X9INoLCcEEXiKUWiXRGqj5WD3bzQiX7Hv2HO3/07xcRM6kOVux/JRj X-Received: by 2002:a05:620a:5dd5:b0:790:8837:c0ab with SMTP id xy21-20020a05620a5dd500b007908837c0abmr3353850qkn.28.1713982904450; Wed, 24 Apr 2024 11:21:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713982904; cv=pass; d=google.com; s=arc-20160816; b=DuZhTPP/ZtPWcGaepaVFMYUBHwAn+cePrCrbCmev77yDPSLKtIgaMrmPzyQYzR5l2+ pn/G6IuH0oV0na0ep1UE2QASIQZi541lmI8XOStSmICmKX5T5XuRLSYN9qait8deCHVK NQ0z4VsmnIhgNxOCRpDhX4DXPbB2poKs4vAlFdMF26H09dLL4rp5foc0N9HIrdIixdTs ipGLV3Rxs6YMbLbD2739IjBnsKAsEy5p7HQGUnR1si3nU6YLfakdiJHKx3q+TgEO9qoy PimF7BWGNcy9ol05K8diYMGjexxbrKtRQEzobycF/7C9voYKinB/K5ki0stGx+7zgGJW BSwQ== 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=duVRMWsTn2CuTXrkefp2rgmKKdhPYiCIRax7sVSMQdw=; b=v7PmNr5wyE3dhcnL/RIcmYzNb4my0z5rAPaITaKuT1n8l73bu0xsyEkrBFXebwRM9X VxHU773omGBW1mHT7MqjrNQfsVosaKVvRahvoVAmLjTZgbtoW3rFkkoj1SVGUaf5cgRK 2znkiyNNBXDigo4OFQBEQsafAwySVjaqfr0yCKmRJxZF3AyNmewr8+aN15qClqX9NrmC Bi0oIwNp7AstGjrCV54n78Os1UJThpUNxGoVgf+sR68NwU5Duz7E6gVAJLhgg9BDoCMl RAkQzYuaoa++9a4AlVJaX9x18Jel5Mf0Nvt8g9ohF48y6UvOUynRUQ9cHgzVQfqtq/NW je8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=ZPaGAXpF; 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-157483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157483-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 bj9-20020a05620a190900b0078efb7b7750si17985609qkb.82.2024.04.24.11.21.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 11:21:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157483-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=ZPaGAXpF; 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-157483-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157483-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 113BC1C20C88 for ; Wed, 24 Apr 2024 18:21:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C401F184110; Wed, 24 Apr 2024 18:15:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ZPaGAXpF" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.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 B0EAC181CF4 for ; Wed, 24 Apr 2024 18:15:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982525; cv=none; b=EWnh2kuAtO1cTAB4WSLQGbBux6a7zAtGG9Fg/Oa6MYWQw83d9bCz3Q2tvOMkxTwIC8LbFowLLZ8MAE/0W83r/79dismpod20qb1klOosg4fMczB28x+hHrx5X5yprRjFTI+munVwks/K5L+CHPhSwnNGo84gmJAhfH0CF4c2aAI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713982525; c=relaxed/simple; bh=zpJumNq7u5KsT133nYF8l88fxW5RaBTIKz2lN9diWJs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KXRQwmV6n8RjKeTsWMqLTt3gX2MwatGsO6Vw8WqIPKQrXxZquovOiSBee/Voq7xFLH4A0xTGBE0bTYHA23/TLRyeA+ez5UAXLo6Y/9nWEpNHrjFvzvfAmcUBNkbGKsn21xAT9xyihOEf9AfDGkhOnbuz1sfdDsxbuTD+yUtmTKc= 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=ZPaGAXpF; arc=none smtp.client-ip=192.198.163.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=1713982523; x=1745518523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=zpJumNq7u5KsT133nYF8l88fxW5RaBTIKz2lN9diWJs=; b=ZPaGAXpFmrF7pCjwqM5CM6QYg5G4ValsGB9sjuvrsfG6bj18GW5VFx4r t98F8NMcEYIvU88SJN/WXS6EBM8GMBcBcFNvlTTNA7CoYxKrhM+TXhpCX 1hSIMaOHmS+NoE6KQ5ZGDsBxq88FU9YH4657xViqdo8YGoIFJf4Gvgn+I QT8QWR1b9Z1+jGBtSvETjmDcj4SeCCrnk92CNk1HfYRGO5dcDnD3GaWRq yuHQBe7QZsCm6f6FO+gnZRSggxjeckiZxV+2kY2T+x53ruqecju373V0N uXEo9TTa2YdUC79mQUB4o2Gvp7ORwBs5kOghne9Cw2Mys1FFO9gKOB96g w==; X-CSE-ConnectionGUID: d7vRFbxDSm+AfrGF0iab1g== X-CSE-MsgGUID: X46MGLF3Qc+BEm96NSWkgA== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="9503545" X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="9503545" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa113.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:21 -0700 X-CSE-ConnectionGUID: yLYbQYPRRbq++zx8rXyWIQ== X-CSE-MsgGUID: QcLdNXhVRx29TbGdnJqhFA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,226,1708416000"; d="scan'208";a="55750135" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Apr 2024 11:15:21 -0700 From: Tony Luck To: Borislav Petkov , Thomas Gleixner , Ingo Molnar , x86@kernel.org Cc: "Kirill A. Shutemov" , Dave Hansen , "H. Peter Anvin" , linux-coco@lists.linux.dev, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v4 43/71] x86/virt/tdx: Switch to new Intel CPU model defines Date: Wed, 24 Apr 2024 11:15:21 -0700 Message-ID: <20240424181521.41984-1-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240424181245.41141-1-tony.luck@intel.com> References: <20240424181245.41141-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