From patchwork Tue Jan 30 16:26:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 194235 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1342075dyb; Tue, 30 Jan 2024 08:31:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IG3LCFEGmrAyXPyKm/Wpe/N5+5okLticXy2+mSDVDdK9isHRQD6wYnlpp4ajTyJ2ZOIes6s X-Received: by 2002:a05:6512:3f1e:b0:511:1b04:a861 with SMTP id y30-20020a0565123f1e00b005111b04a861mr2068437lfa.27.1706632301313; Tue, 30 Jan 2024 08:31:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706632301; cv=pass; d=google.com; s=arc-20160816; b=uy7Yk1sTo4JUm6SNsL1ihP6WAd35C58RKi1840WHJJoS4OdzRJBwpWNqvdawkMMAtX BCzP3snwtSVo2edvf2U5n7+Jplv4RcehO7wfxADj+ZOE9VR16mhNRztPNTo8duY8qKIH has2iugYgtN+Txu/JIP01yON1R2IqrQjadwK+7LYCWowZXqqBjs+ht+lL1zG3FiAbZ9x RzfCABSqU1XtEe16VIfv8XvpDqPev3c2arJuy/fyyCAMqIlRQ3Dn54hcpYXE2P1gVAb2 2/o15RuWSmCl2qIdsrW6MdnbwUABn59x3N+mrsJvxsHUjvQ4ZMAfjV2hGNlbSxonOu2n JAKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=KqzTEgvH64oVRnXYxWwBGRSpE6bGKNbg1Gk+TGTGpV0=; fh=42ush6Jq54nzkhC89YzeZEflzUd7MNFpCQ6YZ+avdeg=; b=iCk4j/OPRegohRtld/zbKNYfYMO9tM4LmqtdbCb2HMshiXI4Czdt/WoZ5TVfvD6Ab6 O3mG7oY9pHp/RtX7EeJR33ZV97O0NGzqBgb0oECtCqYD8PvSwgWcW+gQKUsOGsLjxHS4 HlmaU0pUcRW+EU7738WI89uXq7N/KE6hO93aj9Sq+bdC/UdBQzKAC0CpUVcgFw8TDUSv HEfbTeuRT0ZVIYav7XhNgi7O71btlrMRnkSJpSnt89+nTroAiQzGMPLquro9CBX/I8Pi 97+KpYeW75Zf+6haucyiMe8e0rumw2UniFgPKIrW9yWf/m4SgdOvbYLtw7cTQ13XMJ/g BA/g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MDwEQXcP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-44939-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44939-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id c14-20020a170906694e00b00a316821ce38si4695653ejs.199.2024.01.30.08.31.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 08:31:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44939-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=MDwEQXcP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-44939-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44939-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 851E31F21ED1 for ; Tue, 30 Jan 2024 16:31:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B7E413AA3A; Tue, 30 Jan 2024 16:26:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="MDwEQXcP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="8ZOshKE6" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 80F5812CD83; Tue, 30 Jan 2024 16:26:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706631974; cv=none; b=Z1dYbTp1xmo6WnaJzBbcEqtoHcA6WD0UXLbTbDd59d2aJv8oiSqMSmyFM2UbY8KtUFJlLRFBQsQmABuKNQnbyPHtriNxH0PwJ+utIsl7/34UUfzbezkeomKS2OOjKdh+fOl1bdLhJ5GAYgiuwfPAjLuEHu/MFexN2qFrQ1ymEAc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706631974; c=relaxed/simple; bh=18lDJBL5Xbc+prq+OIpGIW2u67loPhttfD4CTewEB2E=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=br+EBbIyPsL1rL3riakP38VXAPGd2eJdWb06tNFTgDvdebSRw0HNEZR6mFAgQdnBaqyK1OK5d4I4WxP633UZPZ5R9IGchWbji5EeTNiyFNjRxWOGygFhjyUkjOUxsB/UJJp4yBKf0AYGHKyaHCbcw1/VORvnJA5lP+FZDK6hSJA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=MDwEQXcP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=8ZOshKE6; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Date: Tue, 30 Jan 2024 16:26:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706631970; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KqzTEgvH64oVRnXYxWwBGRSpE6bGKNbg1Gk+TGTGpV0=; b=MDwEQXcPCKbOOf+mkuIPSxnIVsj7pMsQ/aMUaz5JdtRQ1qWN255tqQkBmkEStYdUS1dJLW 90AY1+j7D/pql0es9oFXqiOBqr7temsg0qoahB8rOUPqH3ppjnK1kBnHCJDCxCIb3vnv0P rMMYNs4OLhKM5hXuDSOptEo0bqhaBwdtc4R9uQMZhsNb5lSpEPCSha/QoFxI2XEFUU51zU zWM57kJjPe+sDonNLX7xOSeJDE42Sk6H9adWCvAy6lqoy4vFWkxE4nLLC0Hwgp4/9rvt+s SqAEl3NsKJ4SJ0u2MS1yKRRtJnfy2eXJIXCq1nYLgoG7WaKjxCWFvZ8iVYxQRA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706631970; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=KqzTEgvH64oVRnXYxWwBGRSpE6bGKNbg1Gk+TGTGpV0=; b=8ZOshKE6Q4rsBNzbqy2lpIjmuvsH6XpiyuAMgIJkkL2yhAW9bwZqqWGsvmbc6KYlTPfuHz mXbm4/aBlQNeVMDg== From: "tip-bot2 for Ashish Kalra" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/sev] x86/mtrr: Don't print errors if MtrrFixDramModEn is set when SNP enabled Cc: Jeremi Piotrowski , Ashish Kalra , Michael Roth , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240126041126.1927228-6-michael.roth@amd.com> References: <20240126041126.1927228-6-michael.roth@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170663197000.398.7586009633067703455.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789127183698032996 X-GMAIL-MSGID: 1789533671928783275 The following commit has been merged into the x86/sev branch of tip: Commit-ID: e3fd08afb7c350d5612f113eadfb4ebb6ed08deb Gitweb: https://git.kernel.org/tip/e3fd08afb7c350d5612f113eadfb4ebb6ed08deb Author: Ashish Kalra AuthorDate: Thu, 25 Jan 2024 22:11:05 -06:00 Committer: Borislav Petkov (AMD) CommitterDate: Mon, 29 Jan 2024 17:24:27 +01:00 x86/mtrr: Don't print errors if MtrrFixDramModEn is set when SNP enabled SNP enabled platforms require the MtrrFixDramModeEn bit to be set across all CPUs when SNP is enabled. Therefore, don't print error messages when MtrrFixDramModeEn is set when bringing CPUs online. Closes: https://lore.kernel.org/kvm/68b2d6bf-bce7-47f9-bebb-2652cc923ff9@linux.microsoft.com/ Reported-by: Jeremi Piotrowski Signed-off-by: Ashish Kalra Signed-off-by: Michael Roth Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20240126041126.1927228-6-michael.roth@amd.com --- arch/x86/kernel/cpu/mtrr/generic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/cpu/mtrr/generic.c b/arch/x86/kernel/cpu/mtrr/generic.c index d352477..422a4dd 100644 --- a/arch/x86/kernel/cpu/mtrr/generic.c +++ b/arch/x86/kernel/cpu/mtrr/generic.c @@ -108,6 +108,9 @@ static inline void k8_check_syscfg_dram_mod_en(void) (boot_cpu_data.x86 >= 0x0f))) return; + if (cpu_feature_enabled(X86_FEATURE_SEV_SNP)) + return; + rdmsr(MSR_AMD64_SYSCFG, lo, hi); if (lo & K8_MTRRFIXRANGE_DRAM_MODIFY) { pr_err(FW_WARN "MTRR: CPU %u: SYSCFG[MtrrFixDramModEn]"