Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp516081lqc; Fri, 8 Mar 2024 04:38:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVNzfR+8qgCXZxYP6CJHjo2YxXqFl2w/FBxgGMByYZMrQU0SS6zJX0j9lKW6Af+OANsuzsNAb5PLkjEzbBpNI/UMRtkEQIbYlOODhK7dA== X-Google-Smtp-Source: AGHT+IFO8EKx1aoypUpwS/HYN+k0IlxE/EOBiD+4Fstvue3zBGquGh+W4W4RmSjyO307DFXZRgsL X-Received: by 2002:aa7:8889:0:b0:6e5:5cc4:3fef with SMTP id z9-20020aa78889000000b006e55cc43fefmr23859878pfe.11.1709901501933; Fri, 08 Mar 2024 04:38:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709901501; cv=pass; d=google.com; s=arc-20160816; b=iuEtnIvypEg0YyihPXsfAfOATPwobIqdOvMQu8kAfrnSvuOwSk2DK6rciRlH+063GU OnZu46ocjnx3dFmzENr7YWW/iQIFzGfmxEXDOoWQLeasSscZ6bsTa1mKb33C8s4DKDZ3 IMhez3xOoGm3pHQSvKtI61SVX1qsr7bFXADeZxqANyyG5mXf06UWpYGallFctE9s+YrA BCr1eAFoKPPdWvL5Ic4vaURfpsCFfhP5P6gc5kaQ/GMNtwnzNoLeiy1QJfviMNxsWw9T JiRPkKhF9aFLtfGC5PxOrDcUhr15CeRRlyHsUrpxTZA6NtdpdlddVZ4pyY4FfFFuKxDb Gwng== 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:message-id:date:subject:cc:to :from:sender:hmm_source_type:hmm_attache_num:hmm_source_ip; bh=dESiCAiKMFX9PGSnmAM63x7lmOXNwTufORno3vfeAVA=; fh=gHT0PtV5fTB8iSLeg8B45uW5BYl8FaAxGeJZM1F6mlo=; b=ZwSZ6fxSsnmqUFq0kcDgpJ/09ZDGAutrhXR1/jwQAnW6UKBDXY4Q2SEMM+4l02X+Y3 3pWNCLRC29VT7g6+Xr5a3t/nTSGMwSCeOEivH/USmY+OHDW2nsZ6evY69a2cV1KZU1U1 8uQrCptk0TzxMm+73pOhItlL0Rgoqxjf5ab/vhvc1uf/8AVwLTWoHVGa7FLWJqAqLcmF zFLYN6iVI4UqC95hEkY9PgDH+C3uaMquETmF/Ty2Y5EcQfGfebf3MrHRawNxLJEboL2Y qSNitn3g9FQ+fAALHB7j/RYU39CfZ2d4p8xKP/7tfz9aCBjmE57dmfJYfdCMvqGL9SZH JJyg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=chinatelecom.cn); spf=pass (google.com: domain of linux-kernel+bounces-97011-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97011-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id n26-20020a635c5a000000b005ceca1094c3si15683936pgm.853.2024.03.08.04.38.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Mar 2024 04:38:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-97011-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=chinatelecom.cn); spf=pass (google.com: domain of linux-kernel+bounces-97011-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-97011-linux.lists.archive=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 9CE4E282B37 for ; Fri, 8 Mar 2024 12:38:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3EB214AA0; Fri, 8 Mar 2024 12:38:14 +0000 (UTC) Received: from chinatelecom.cn (smtpnm6-09.21cn.com [182.42.152.55]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 65B0581F for ; Fri, 8 Mar 2024 12:38:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=182.42.152.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709901494; cv=none; b=M1QuVYhbfHCfhABrjLZUJTRNzsVLjh4peqgTBuBtMEnTb/ZNJ9Bc2QtT+HjMR9XkKs8PrNRiMsGgdjdd73A4fvwv75sVMi8JJn4DACNLP7G75fTQB+xagWNnBD51+DUnwGNDICenCBAc3F5vLL9XwaPvFhwG79bHSnrHk5I3k6E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709901494; c=relaxed/simple; bh=pvx+gCC6jI5B6hoAV10utHkbSF0byqV7a/fUtmag/aU=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=QZ6pPhCG+uVlmFc7pJeRVl3FWcPvDZ5Yr+383f5xlx6sV0tVpm/d2/qxlZfohd4PtKt7MfmMD8Tu7ajQVp53Ts8SfgPhI1Z8ENJYfN2oXAHXEIg8FCq7gYdb0PGYlvD6iG4YZRt/0aJUYafV3Y4zN6Y5ChejDA6AiXsBvUsSFNo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chinatelecom.cn; spf=pass smtp.mailfrom=chinatelecom.cn; arc=none smtp.client-ip=182.42.152.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=chinatelecom.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chinatelecom.cn HMM_SOURCE_IP:192.168.138.117:1741.1211802803 HMM_ATTACHE_NUM:0000 HMM_SOURCE_TYPE:SMTP Received: from clientip-10.133.8.31 (unknown [192.168.138.117]) by chinatelecom.cn (HERMES) with SMTP id F158E111064AF; Fri, 8 Mar 2024 20:27:59 +0800 (CST) X-189-SAVE-TO-SEND: +sibs@chinatelecom.cn Received: from ([10.133.8.31]) by gateway-ssl-dep-77bc75f6c8-sfvft with ESMTP id 9439230eb9e0458b890b8d3a43501b50 for tglx@linutronix.de; Fri, 08 Mar 2024 20:28:11 CST X-Transaction-ID: 9439230eb9e0458b890b8d3a43501b50 X-Real-From: sibs@chinatelecom.cn X-Receive-IP: 10.133.8.31 X-MEDUSA-Status: 0 Sender: sibs@chinatelecom.cn From: Bingsong Si To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Cc: Bingsong Si , linux-kernel@vger.kernel.org Subject: [PATCH] x86/cpu: Clear TME feature flag if TME is not enabled by BIOS Date: Fri, 8 Mar 2024 20:27:52 +0800 Message-Id: <20240308122752.3342-1-sibs@chinatelecom.cn> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Signed-off-by: Bingsong Si --- arch/x86/kernel/cpu/intel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index a927a8fc9624..22f0c829784d 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c @@ -526,6 +526,7 @@ static void detect_tme(struct cpuinfo_x86 *c) if (!TME_ACTIVATE_LOCKED(tme_activate) || !TME_ACTIVATE_ENABLED(tme_activate)) { pr_info_once("x86/tme: not enabled by BIOS\n"); mktme_status = MKTME_DISABLED; + clear_cpu_cap(c, X86_FEATURE_TME); return; } -- 2.34.1