Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp140707rdb; Thu, 25 Jan 2024 10:29:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFT6kuoUlX4/xIm1LCBtyPFiLEPONXbPgIgqToAKwniJrd7KOHdd3ShyfytZtgg30+qiQcG X-Received: by 2002:a05:6a20:6a9c:b0:19c:6090:9fae with SMTP id bi28-20020a056a206a9c00b0019c60909faemr56908pzb.84.1706207348573; Thu, 25 Jan 2024 10:29:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706207348; cv=pass; d=google.com; s=arc-20160816; b=EdaEMPF4vrPHOGtljY80tvwHZeDnIaxyX6bkGYPgNLXkE2LsXxMx0QI4+RvQF/wP0s fWQ9YkHYQKfD0Z849UHk4z7+vaow2QpJi7xrxwyOHrak77Gt3f4aJtSXJ9j2Bx3ZJHIO oUkdjQKThxWTAfbwaGZQ1yTI3gj8w0LeInFNjBQckxa285A4KB2Z8vssMUxiKuJABNyC vNvKPnYAVaZxTy88WHFYZHKOp5vIAvFExYE4MYlM7o6+qsbhbmxwN4NDfS+gCaMA+Mwp jTHC1N4fsnvBXVv9DwAKB/DsHy/Bc0uceya/hddhIqeS8ZZxBjDIGppkDmbx+Tdz0tMh WYBA== 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=0BtMfiW5Jmaue+jLIiKXGH1dEvlk5SISeSvAE/4TjV4=; fh=Xtt8PgBvMlF/Ge3oIoOoNU8UxEJO15ZF1qyrk+WbNL0=; b=T96gNgpEdubxgSmChfO3KdP5GxCpmZyowEtRGRfMALdBgTIsAQHsZgsdfTQBXUGvJX SK+psTfPfyTwTh9JZdIO89bomYcHVVzMQQ+6cZ/kC2gW3pIuKqZOc+lIbGJQoRDDAaZU TLYRzd1NTKU4msFn3hgCU/cuF8omMHSjQMP3t+AOQlOFzMssQ7sCCNLrwkl0muJ9f1AL /p94xH4p693N3kjAjkqrULnCwIz+X6XAWzBm1+KXGMr3IEkXvWkxwBgWu0lkrucqAtmK w3ounzO3om8G0hgFqUkbAhE35bvd2VokOasB7N7hGKNm8WcKwYcjNYaFndcotlbTRgg7 SldQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xZ6B29b5; 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-39109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39109-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c10-20020a631c4a000000b005cdc2cc9a15si13630458pgm.742.2024.01.25.10.29.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 10:29:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-39109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xZ6B29b5; 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-39109-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-39109-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 24550288A05 for ; Thu, 25 Jan 2024 18:27:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD92F13F018; Thu, 25 Jan 2024 18:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="xZ6B29b5"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="y0o61jjK" 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 5F4B413BEB4; 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=1706206900; cv=none; b=qUj5EdBULtE9mOKL4SxKPs21N7kG4zpy2r2I/3sQ0z2TUpRksWUtBlrUQgwXFd2C6yFh+tnFJESVbk4g3jJrkgGw6zGNDzghON5gzoj9eQ09iW39nfW2f5KFJ9sjYVVUp8kmK/yNN5OYxlkMS7bi6TlyWUlP8QfvL74KAKybOhk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706206900; c=relaxed/simple; bh=0ukaSdLB7QrrDZhuoXZBBuAGXfiReFxv7PEmTV3Xlbc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=E9z5PyT+1KoQ4Su0gXkuf/aKT0XKF6LmTUqGboXHR+D03NCnMVDB7GrDQbVe512OdgsW4I4ZL8OnfFmV3JmUVFnV0eh4CO0TDuGuH/lmYM2yD23xdBEnyWE2EwZ+uPHwqd07mdlse0KctmKrma6TIUsqDoHWhyHdx7adJNqfm+A= 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=xZ6B29b5; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=y0o61jjK; 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=1706206896; 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=0BtMfiW5Jmaue+jLIiKXGH1dEvlk5SISeSvAE/4TjV4=; b=xZ6B29b5UYNErTfXEPCqr9QRKtsFG30czeQ6rSvzHgNkVdVKDAgw+DsqZ3aBijI2+b+wJF FdCF/Ct9wirLlTghVCZxHN3YFx0uBOGaz2QEd1mh/ggRpMHSTAqcfK1UDCf3x5fDoDIYP9 znM1JEl0wxl+jl19KiuR76nvhCu6V+aj9GyCb070QfWZ915mafF0PEdCbvdEjGBsYezCwS vdhzTaCSsjRS2wZ7C7DQQYzCNTvnznDj7lghA+oqfiT1rIWvEy0AFs3MYhyw/ceMpHl/5Q pt/twFVnT4tYvMx0/mnstAejDKtQMhS1Q3P9zwcLXQ5PPtd9RHHpOVI4kYCyaw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706206896; 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=0BtMfiW5Jmaue+jLIiKXGH1dEvlk5SISeSvAE/4TjV4=; b=y0o61jjKWGD4YLbr6GyihBK9pKn14LfTWoYuZqUCOP2hNIGj4tDYpCiIo3WIybaKHJ3UCb gvVWbz7HUTZfPdAQ== 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/fred: Disable FRED support if CONFIG_X86_FRED is disabled 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-8-xin3.li@intel.com> References: <20231205105030.8698-8-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: <170620689604.398.10401404045358407255.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: 7bit The following commit has been merged into the x86/fred branch of tip: Commit-ID: e554a8ca49d6d6d782f546ae4d7f036946e7dd87 Gitweb: https://git.kernel.org/tip/e554a8ca49d6d6d782f546ae4d7f036946e7dd87 Author: H. Peter Anvin (Intel) AuthorDate: Tue, 05 Dec 2023 02:49:56 -08:00 Committer: Thomas Gleixner CommitterDate: Thu, 25 Jan 2024 19:10:30 +01:00 x86/fred: Disable FRED support if CONFIG_X86_FRED is disabled Add CONFIG_X86_FRED to to make cpu_feature_enabled() work correctly with FRED. 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-8-xin3.li@intel.com --- arch/x86/include/asm/disabled-features.h | 8 +++++++- tools/arch/x86/include/asm/disabled-features.h | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/arch/x86/include/asm/disabled-features.h b/arch/x86/include/asm/disabled-features.h index 702d93f..f40b29d 100644 --- a/arch/x86/include/asm/disabled-features.h +++ b/arch/x86/include/asm/disabled-features.h @@ -117,6 +117,12 @@ #define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31)) #endif +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif + /* * Make sure to add features to the correct mask */ @@ -133,7 +139,7 @@ #define DISABLED_MASK10 0 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM) #define DISABLED_MASK13 0 #define DISABLED_MASK14 0 #define DISABLED_MASK15 0 diff --git a/tools/arch/x86/include/asm/disabled-features.h b/tools/arch/x86/include/asm/disabled-features.h index 702d93f..f40b29d 100644 --- a/tools/arch/x86/include/asm/disabled-features.h +++ b/tools/arch/x86/include/asm/disabled-features.h @@ -117,6 +117,12 @@ #define DISABLE_IBT (1 << (X86_FEATURE_IBT & 31)) #endif +#ifdef CONFIG_X86_FRED +# define DISABLE_FRED 0 +#else +# define DISABLE_FRED (1 << (X86_FEATURE_FRED & 31)) +#endif + /* * Make sure to add features to the correct mask */ @@ -133,7 +139,7 @@ #define DISABLED_MASK10 0 #define DISABLED_MASK11 (DISABLE_RETPOLINE|DISABLE_RETHUNK|DISABLE_UNRET| \ DISABLE_CALL_DEPTH_TRACKING|DISABLE_USER_SHSTK) -#define DISABLED_MASK12 (DISABLE_LAM) +#define DISABLED_MASK12 (DISABLE_FRED|DISABLE_LAM) #define DISABLED_MASK13 0 #define DISABLED_MASK14 0 #define DISABLED_MASK15 0