From patchwork Thu Jan 25 18:21:33 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: 192248 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:e09d:b0:103:945f:af90 with SMTP id gm29csp176138dyb; Thu, 25 Jan 2024 10:36:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IGcI6fD/YdcnwcRyvTFEoWsUJxc3DtSEFDDDEZG6mHM8NehaRHNsKqz1RZBUQqKJdewKwky X-Received: by 2002:a17:90a:de82:b0:290:295:342 with SMTP id n2-20020a17090ade8200b0029002950342mr25825pjv.95.1706207781310; Thu, 25 Jan 2024 10:36:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706207781; cv=pass; d=google.com; s=arc-20160816; b=EBwrscXeSpuiRCZhDpQKAhk0tyJOzwVjmhAcEkpmXQYOOBpXro7rkVGKltzTkbZ5bL Foo7cG2cwxGOwvJgC5haCtC5H2de2vvTh4PIS4fjh0L8Ih3K8AKABhltwT5lTqmYDB8Q +ZrgcKBiQaTrUCw2xVGP8VjDmcitGZj67Ue1tvaqNbxgckkS1ZPl+Cx+ByP8MKfGEjlW AEWGEYCmm8xLGx6b2KuRRhN2EX6yVRLKe7t/7B+hh5dAZ6q1PxYGjFU12mwO3YFEKfKJ 1OLeDbuulV3nXLVY5+NaDbeCI5TvnwccHvyXrh1n2kvMEz2bG+ZQFOroq3C3TKB4JwNk avog== 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=yJW6BhPib2WJgwSlHcd29XLukPixakyXB4kael0mI/c=; fh=Xtt8PgBvMlF/Ge3oIoOoNU8UxEJO15ZF1qyrk+WbNL0=; b=RDydtHzCb5818hbCYFJBnK6FJqZzyeUXbHjQS0K0MlEEU+QAHz1Zc9MHd+8XjIHacO PtXtDrk/Mkr5UNb63JqFKPzTfqbyEpqrA3HasvpA9xYBqt/fZg0bVtW2XWe9eXb5aiNA nFaKhIbUwG1AGlXml5+Sguj4vAIHAiz4FRmT1t5+aHWeQdV7sruYtUeR/KNsINgS2FMh b5FaTtSPp9Mhczsp/HgenNirXhYUMjnygfQmcuPb31tondMtOUMyTapaSQ2egFVLKaVU WBNut6BP95wp4BNxa+qY1bAsRSMG8XZO9aFTmtFXOzHFshKiSBmsqCQMwDD2IUvRS2GC muVA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0oTFtPwv; 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-39104-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39104-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o17-20020a17090aac1100b002905eeccaf4si1691991pjq.187.2024.01.25.10.36.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 10:36:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39104-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0oTFtPwv; 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-39104-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39104-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 03BEEB2785F for ; Thu, 25 Jan 2024 18:28:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A16B14198F; Thu, 25 Jan 2024 18:21:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="0oTFtPwv"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="3wRYN2yQ" 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 A68FC1339B4; Thu, 25 Jan 2024 18:21:35 +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=1706206898; cv=none; b=dyhJeWQFrQ/nL7yKl9S6s1I661Zt0Fb7ozTwUw6H9Qv+0JQrZAs6bE2L0n6sFUbokPALqlK10kM04gNqGIxd+Eb6VtHPaDTeHtWfqbe2WryM5R4V/P0lA7uRY2CFT9pJ8Sye540gfHdjTRxpwHnm526kwC/p3DF28P3Ytss8otA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706206898; c=relaxed/simple; bh=Kd5rZEVHDxAzQi89iKepGmUdUn1yDhK/tRZzlxhQzAs=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=omim7f1POnqk8HjusTJMdaxXLJcd+m7Kx9phUZEX84b63WI2cnrJo7M7EcT0vvUu2QqUb6kcWHHxwIMUk/1HvTkkfknOMEz4R3CFFZIWQzeTI/KJbM0wrcoSVCj9Xh5/5XzC1XQAWPR4eL0fgiR7NWInxCi8HXc4ACvHP4+PH7s= 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=0oTFtPwv; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=3wRYN2yQ; 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: Thu, 25 Jan 2024 18:21:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706206893; 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=yJW6BhPib2WJgwSlHcd29XLukPixakyXB4kael0mI/c=; b=0oTFtPwvIKZXyV6BbEdBqXwvKOJENLlz+P7rCC8DZEVzx7u/BKe+9et3Cv7zSd/Glc8Tkh /i4/wOM4A0klI2UpQgrQvMZtGkCNOyT/5ukwF0thvcCNeKj63EKEd0Ou6qYrITgQ58Ia2P Ck2v1iNrkkjcdfaNblYVIg3t1bRDf8oVusgFGs6UbdcHZWYQBXBRChhmsVaAOJbJikgdJK X/ReqQ8MS/9nItzpUR9fLllcGlo6GiPcEMNLo36OF+qUdsdgCCWSkWkO+CRhWHMSTMHvXu UEm5lQGIrgAvW30eVloHeCK57RyJtkcw7uMpHzKiWwBNmaojjIvr3/XwpGKlvQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706206893; 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=yJW6BhPib2WJgwSlHcd29XLukPixakyXB4kael0mI/c=; b=3wRYN2yQafHdEVrsExQ7Z0y37bAR3FvX4liJs+UMvIOvxuGnVPX486nqHUz4GrzaNiFuK3 WwLk/SzFhtJqCsDg== From: "tip-bot2 for H. Peter Anvin (Intel)" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/fred] x86/cpu: Add MSR numbers for FRED configuration Cc: Megha Dey , "H. Peter Anvin (Intel)" , Xin Li , Thomas Gleixner , Shan Kang , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231205105030.8698-13-xin3.li@intel.com> References: <20231205105030.8698-13-xin3.li@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170620689303.398.14397485081350873453.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: 1784440798651029528 X-GMAIL-MSGID: 1789088530178807816 The following commit has been merged into the x86/fred branch of tip: Commit-ID: ddac193611e57d194328ebb0439ebd5ae4025b9d Gitweb: https://git.kernel.org/tip/ddac193611e57d194328ebb0439ebd5ae4025b9d Author: H. Peter Anvin (Intel) AuthorDate: Tue, 05 Dec 2023 02:50:01 -08:00 Committer: Thomas Gleixner CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00 x86/cpu: Add MSR numbers for FRED configuration Add MSR numbers for the FRED configuration registers per FRED spec 5.0. Originally-by: Megha Dey Signed-off-by: H. Peter Anvin (Intel) Signed-off-by: Xin Li Signed-off-by: Thomas Gleixner Tested-by: Shan Kang Link: https://lore.kernel.org/r/20231205105030.8698-13-xin3.li@intel.com --- arch/x86/include/asm/msr-index.h | 13 ++++++++++++- tools/arch/x86/include/asm/msr-index.h | 13 ++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index f1bd7b9..1f9dc9b 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h @@ -36,8 +36,19 @@ #define EFER_FFXSR (1<<_EFER_FFXSR) #define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc /* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd /* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce /* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf /* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0 /* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP /* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1 /* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2 /* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3 /* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4 /* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033 #define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29 #define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT) diff --git a/tools/arch/x86/include/asm/msr-index.h b/tools/arch/x86/include/asm/msr-index.h index 1d51e18..74f2c63 100644 --- a/tools/arch/x86/include/asm/msr-index.h +++ b/tools/arch/x86/include/asm/msr-index.h @@ -36,8 +36,19 @@ #define EFER_FFXSR (1<<_EFER_FFXSR) #define EFER_AUTOIBRS (1<<_EFER_AUTOIBRS) -/* Intel MSRs. Some also available on other CPUs */ +/* FRED MSRs */ +#define MSR_IA32_FRED_RSP0 0x1cc /* Level 0 stack pointer */ +#define MSR_IA32_FRED_RSP1 0x1cd /* Level 1 stack pointer */ +#define MSR_IA32_FRED_RSP2 0x1ce /* Level 2 stack pointer */ +#define MSR_IA32_FRED_RSP3 0x1cf /* Level 3 stack pointer */ +#define MSR_IA32_FRED_STKLVLS 0x1d0 /* Exception stack levels */ +#define MSR_IA32_FRED_SSP0 MSR_IA32_PL0_SSP /* Level 0 shadow stack pointer */ +#define MSR_IA32_FRED_SSP1 0x1d1 /* Level 1 shadow stack pointer */ +#define MSR_IA32_FRED_SSP2 0x1d2 /* Level 2 shadow stack pointer */ +#define MSR_IA32_FRED_SSP3 0x1d3 /* Level 3 shadow stack pointer */ +#define MSR_IA32_FRED_CONFIG 0x1d4 /* Entrypoint and interrupt stack level */ +/* Intel MSRs. Some also available on other CPUs */ #define MSR_TEST_CTRL 0x00000033 #define MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT 29 #define MSR_TEST_CTRL_SPLIT_LOCK_DETECT BIT(MSR_TEST_CTRL_SPLIT_LOCK_DETECT_BIT)