Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2747581lqo; Mon, 20 May 2024 15:52:09 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX3lhLlVWo/F1doPrPufvPIakos+Cmu6QbsBHszno47Rfzyj/kSwclmh2owxzhJxsbnBn89Cmjd3b98Vk+TRqDd+uC96JzhUaO97WoQsw== X-Google-Smtp-Source: AGHT+IFBwDQ/k99eiuBWkYIhfAeyzif5Q7+WwCPqSgHprGaQO1vd/OMA7dALyoQsjQneMLI5R2nZ X-Received: by 2002:a05:6214:5407:b0:6a0:d404:e964 with SMTP id 6a1803df08f44-6a16837733bmr412444366d6.40.1716245528899; Mon, 20 May 2024 15:52:08 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716245528; cv=pass; d=google.com; s=arc-20160816; b=m4E5HWlZk9MnhYW4tVmI1re/y4Ofp5L6VSuP9lXf9fTRl3Oeu236s1Foy1Tov1NZE4 QXqWa4dkfOiQJmp07dRGoW/agZfjxzJMyfbgk/bxCFkTAc/VwFbnab0oB33KgXhRRtOs 3mW4BAYYDE9+ekcKD+aWn85JhgWugZFTtJ7fO5dpnnrIjvpdQ5XVhj7epLIzsUuKIK7Q Vfbb+KvaMBhKtDqFIrnGbPGTrDuitZg1heKcDvjU6lnrGrxyyLr9xufw1E9AMO+3bPKf DOsUj+CNWr4LO5nMA6k5Izay+bCttod4E33cB5WBOWvMsdNpNyMz2/cFrMeAbUCwyyew TM6w== 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=xODyT7hC/KjRq8GaKhudTcfVR/Ef9iObtkfSRmebqpM=; fh=T26ksdX6UpceKBTmCjnZX4okm/RnV1G8gmRkfePNArg=; b=I67mj/bB2exUAzJ3QFapvKQYEtX8VtRfJ+3e6hgdzgYTBj34WwbDMZ9qf7VV7Tlbva ZoIilGREk1U4Hom61LvtimU2qsNOeP5HepsR6vbcjvX5nT03L+QEgLysTyKKHsJwIkKB tO4v1apVdKSOsBzikRmiC6PaYWa/7doV9GRF9UT/DHUxXwrQfkSqXkgTKOJ5oHbfZNQE JLSnVHCwrM3vf9boOVxCFtLN3PlW7DikBSUPcZbzhR+os+Cb/ulC+ZU//JXhQ0iunGnd TuJ5amPU6Pnnq3iuOmr2mKJmvh5fFJPfEpjH9abG+Yx7NUdC1v9cDf6vnd1TSWsBCZlk AKXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=GIuNz72K; 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-184259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184259-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 6a1803df08f44-6a15f1d77f8si268680746d6.90.2024.05.20.15.52.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 May 2024 15:52:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-184259-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=GIuNz72K; 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-184259-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-184259-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 9C6E51C215B0 for ; Mon, 20 May 2024 22:52:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2DBB24AEF0; Mon, 20 May 2024 22:46:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="GIuNz72K" 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 64BEC13C801 for ; Mon, 20 May 2024 22:46:51 +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=1716245213; cv=none; b=HCaLQmmFdsT9fKM5UPNd7bQTjJ0juGwoVBRFASWLl7W/M1gYQjCr2d6RhPFDcoQErbpZuUbyqPpgD+OnA2sb6jNXDCFf6TsTouNPaqr4+C7LKy6IWwjcLZkAKGa4M0j5Yjf3ETyOLHYI7fCS3yaKKEVs7fG+1b5Cta7hm85y2JA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716245213; c=relaxed/simple; bh=dSW16Z5owqXk0diJ8oqVw/YYkOHbNprsGlWIpUTivak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dpu8Orq/FkiXXwisSimNJfkCARnJnaduh9cOCqdS45GdlsDWLrY7Py2S84Dp/cMe+6VBBTHr58QlHsBAjwYTCpZB8jGMFbysXbmUBl+DUc68bxRnaQ/oVsZAJuiaGm1Q+TmB7WfEE6NOsZ3cR4NGRgAiXfD8GYsUN7egb8JQ+rs= 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=GIuNz72K; 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=1716245211; x=1747781211; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=dSW16Z5owqXk0diJ8oqVw/YYkOHbNprsGlWIpUTivak=; b=GIuNz72K2RcCm7Kc6Au2PBfql2nGe4o8nO98kKOfXBNlSq1prHQypbit pXQ7c/nqQiS9mMx/zfNQPi/OxKvYRnmwaCUr1sZowoTPZ0hwoimAnaiuh 5arzch3P+bAYlsAarwExufc66bQzuwXK5+KFMJVW2x6N0DsmokCvHb/UY 1tKDMhHhsCZWAH5NwfJ9gzlgz73GnKucJkta6Hl8Y9Hx26T6eyN/T03bs RFamzH5dPr/7UAuiHFiCWYPE6UoMH9LCKi7aQZQEkpoWzkbgEWj2CQsWR hxo6VC1BIJF44RADAMuSyX2aRTpWJijXNeGxKWJxBAVvqfDDP0ocppMll A==; X-CSE-ConnectionGUID: pOLs1EyFRBumNLNNMWLbrg== X-CSE-MsgGUID: 5TBdsGz9SxaPL1hXgHDf1A== X-IronPort-AV: E=McAfee;i="6600,9927,11078"; a="12199836" X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="12199836" 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:39 -0700 X-CSE-ConnectionGUID: 10UPfhpOSu27kDmEtACdaw== X-CSE-MsgGUID: 15/3bRvIQzO/o2blYupKog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,176,1712646000"; d="scan'208";a="32593473" 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:38 -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 Subject: [PATCH v6 30/49] x86/virt/tdx: Switch to new Intel CPU model defines Date: Mon, 20 May 2024 15:46:01 -0700 Message-ID: <20240520224620.9480-31-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 --- 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 49a1c6890b55..4e2b2e2ac9f9 100644 --- a/arch/x86/virt/vmx/tdx/tdx.c +++ b/arch/x86/virt/vmx/tdx/tdx.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include "tdx.h" @@ -1426,9 +1426,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.45.0