Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp140865rdb; Thu, 25 Jan 2024 10:29:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGupQXOzwYUYbiNT7Og4NV15l6M28H+NTcFkvwmd1m8aC+kxUHt2ikWFkWfBGTYoZhHJktg X-Received: by 2002:a17:90a:6e0f:b0:290:520f:5373 with SMTP id b15-20020a17090a6e0f00b00290520f5373mr15941pjk.81.1706207368483; Thu, 25 Jan 2024 10:29:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706207368; cv=pass; d=google.com; s=arc-20160816; b=vqqh7CS2UBBBSwN4PCmlFUBMGURRyqCxUfTENnTYsXyGf1asqI5Y5kVmhci/1UoQrV TSFLSObaWrFWqy8VTk5LPcYFX5KPHLAU6XFDfkWlq1vSuJrPdON/WVs1b39yj23F2ppp wTDs+OI3QpV8ZX3tpMHErZV5bLj2KDLtuHlOhpDc1EGK7qLtlWdFgyovaZmoOGRCHgZh nnUo0zOMRVjInRqv3iD9wA1J1M9LtZRmdrPceq0BWs1SAB6vap1EcebUNSCtnry1aRyw /BoxojHcnZANNTPnQAuLDWTn7E6Hq4cgyBxpbf9SQNTBXDtLeE+d8jud+iTW3nuTGZSr m1Yw== 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=CjJ09yt8uNcPF3b8qNxyWiN2kLfQdJmilN7ktn4gKpI=; fh=U/Hd0cPmVpmsXI9UC370Q88/l4pozXEkKxB1Pi0MTn0=; b=ICN1pHGji+FpK4vY6NDt9fFDFIWq5oi7ZLtIulquboe3Q7owxC3hO/FhA5QiKwVuAv +3GhWgQYTtn/7qNVfXJpCj/io508gCU4+jvCywKxsDXKgemqWcTLdodQyQCaEzElM7Sz VLC7Ud38rAAmYBNdcgAfSmDEcbcNSmBqVqzuY51hrAtCAUNc/CEchevOiLOE2555gCQH JcdoSpQDEyti2K+r2gZoSuxdY0q1T7MDDAKZUM5pVt9DGn49eE60svaaEkSYVuNBX2I4 O7xHd/kPdJHG5vpPYb6s6fzFMOFTLENPCWcZv3X2vplk/wgWsYXyXhBnvsQIlyL7Gm/m a60Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="iI/Eruei"; 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-39110-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39110-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h7-20020a17090aa88700b0028bc1118b64si1698611pjq.66.2024.01.25.10.29.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 10:29:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39110-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; dkim=pass header.i=@linutronix.de header.s=2020 header.b="iI/Eruei"; 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-39110-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39110-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 20F7928781D for ; Thu, 25 Jan 2024 18:28:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6362140796; Thu, 25 Jan 2024 18:21:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="iI/Eruei"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="T1W++Nn3" 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 4EC7413D519; Thu, 25 Jan 2024 18:21:38 +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=1706206901; cv=none; b=UfOcZJOtzBXg/kcz50xUn0vfcm7Q95E4Q0Sp3kpmQrcix8qhEYP+IjthGe+OK9HK4tmemGuKKXS3bndmKxloizRcKYMxkN6qgzakpqBeKucU7UnC2yLmg7yxPuN7/L/SJdpf7uzX3dQnY8rFWlT+wtJtKDVBZjqr3oVLD7VQjWY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706206901; c=relaxed/simple; bh=9HNbCqXqfwUs7zSRBHZbKSyO5jyHiLF+EI2wqtSx5xM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=nLUCsqBMjXMGy5SdlxC7Zjha2/NLskFVz5i5SYDsuAD4vBBg87oO4Vbn+hATk68odsRxkpjWOkAlvYVzUjClJudyuYpwJZxXJzBp4iRwqWVOPVzauBoCCgryRna3FTF/RvUR1vb62ZR5N7SQtYzcxzthtgSxGOM8llJcshWTm9M= 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=iI/Eruei; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=T1W++Nn3; 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:36 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706206897; 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=CjJ09yt8uNcPF3b8qNxyWiN2kLfQdJmilN7ktn4gKpI=; b=iI/Eruei7Bthf3wpnXx8/S2GYa2vx/704U4EJC6cr07lfkhLeEcYOscWuI8t2mTGOFXdh2 qEog+QqInwkM+dX8AZJCpQQu/0VmGVVY66yQhhIXgpcJH6arS5IpSs1dksYz5LQ29LNYDv k5srGpdHYUr21c+ihJyZuVNbuIbOU20MdSzTd+qwTKDDcLk9+8XzPcQix13knNC/ppVzFr 1RH0ydITj8p0E0raJui78cv6ppDfnX0O/Uk3H55gmqG8rgUuYAN8t1BWU/Bb2ADVEBEGMA Eip4YGSLUcgUqG/xUF4aUESp17UVxRmUGsOBMhCw6TJkdbQ6ngL0Gw/xGGdkug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706206897; 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=CjJ09yt8uNcPF3b8qNxyWiN2kLfQdJmilN7ktn4gKpI=; b=T1W++Nn3O6qlO8RJiwAYJMqbsZ4uHdZLBmolrd2wK6sdgQ5fKSB+1spm6GJBfpnUei7qD9 jmL78LdSebQdM0Ag== 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/cpufeatures: Add the CPU feature bit for FRED Cc: "H. Peter Anvin (Intel)" , Xin Li , Thomas Gleixner , Shan Kang , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231205105030.8698-7-xin3.li@intel.com> References: <20231205105030.8698-7-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: <170620689669.398.1849686617170032778.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/fred branch of tip: Commit-ID: 51c158f7aaccc6f6423a61a1df4a0d4c0d9d22a9 Gitweb: https://git.kernel.org/tip/51c158f7aaccc6f6423a61a1df4a0d4c0d9= d22a9 Author: H. Peter Anvin (Intel) AuthorDate: Tue, 05 Dec 2023 02:49:55 -08:00 Committer: Thomas Gleixner CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00 x86/cpufeatures: Add the CPU feature bit for FRED Any FRED enabled CPU will always have the following features as its baseline: 1) LKGS, load attributes of the GS segment but the base address into the IA32_KERNEL_GS_BASE MSR instead of the GS segment=E2=80=99s descript= or cache. 2) WRMSRNS, non-serializing WRMSR for faster MSR writes. 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-7-xin3.li@intel.com --- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/kernel/cpu/cpuid-deps.c | 2 ++ tools/arch/x86/include/asm/cpufeatures.h | 1 + 3 files changed, 4 insertions(+) diff --git a/arch/x86/include/asm/cpufeatures.h b/arch/x86/include/asm/cpufea= tures.h index bd05c75..ccbf914 100644 --- a/arch/x86/include/asm/cpufeatures.h +++ b/arch/x86/include/asm/cpufeatures.h @@ -326,6 +326,7 @@ #define X86_FEATURE_FZRM (12*32+10) /* "" Fast zero-length REP MOVSB */ #define X86_FEATURE_FSRS (12*32+11) /* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */ +#define X86_FEATURE_FRED (12*32+17) /* Flexible Return and Event Delivery */ #define X86_FEATURE_LKGS (12*32+18) /* "" Load "kernel" (userspace) GS */ #define X86_FEATURE_WRMSRNS (12*32+19) /* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */ diff --git a/arch/x86/kernel/cpu/cpuid-deps.c b/arch/x86/kernel/cpu/cpuid-dep= s.c index e462c1d..b717420 100644 --- a/arch/x86/kernel/cpu/cpuid-deps.c +++ b/arch/x86/kernel/cpu/cpuid-deps.c @@ -82,6 +82,8 @@ static const struct cpuid_dep cpuid_deps[] =3D { { X86_FEATURE_XFD, X86_FEATURE_XGETBV1 }, { X86_FEATURE_AMX_TILE, X86_FEATURE_XFD }, { X86_FEATURE_SHSTK, X86_FEATURE_XSAVES }, + { X86_FEATURE_FRED, X86_FEATURE_LKGS }, + { X86_FEATURE_FRED, X86_FEATURE_WRMSRNS }, {} }; =20 diff --git a/tools/arch/x86/include/asm/cpufeatures.h b/tools/arch/x86/includ= e/asm/cpufeatures.h index 8792841..953e6ef 100644 --- a/tools/arch/x86/include/asm/cpufeatures.h +++ b/tools/arch/x86/include/asm/cpufeatures.h @@ -321,6 +321,7 @@ #define X86_FEATURE_FZRM (12*32+10) /* "" Fast zero-length REP MOVSB */ #define X86_FEATURE_FSRS (12*32+11) /* "" Fast short REP STOSB */ #define X86_FEATURE_FSRC (12*32+12) /* "" Fast short REP {CMPSB,SCASB} */ +#define X86_FEATURE_FRED (12*32+17) /* Flexible Return and Event Delivery */ #define X86_FEATURE_LKGS (12*32+18) /* "" Load "kernel" (userspace) GS */ #define X86_FEATURE_WRMSRNS (12*32+19) /* "" Non-serializing WRMSR */ #define X86_FEATURE_AMX_FP16 (12*32+21) /* "" AMX fp16 Support */