Message ID | 20230307023946.14516-33-xin3.li@intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp2210784wrd; Mon, 6 Mar 2023 19:10:46 -0800 (PST) X-Google-Smtp-Source: AK7set8ePY3XUYsb+9Ftx/pfzf22KGX3LzxJepWHSFrBMyJI9ElZLbe7wYF7Yzp2VAPGuqF1bgAH X-Received: by 2002:a05:6a00:cd:b0:5a8:cbcc:4b58 with SMTP id e13-20020a056a0000cd00b005a8cbcc4b58mr13032181pfj.12.1678158645869; Mon, 06 Mar 2023 19:10:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678158645; cv=none; d=google.com; s=arc-20160816; b=xdfF2De8dXtheFKFABm8y9lw1dHHI++vkjcbgQ+NK2HHBfzeNT45+o4qq/AUj3a9Dv eshdJscgMhyRiZkSisyNfLaWGQsfP4PC695kn26FBlG1YCjffRPHvwTT9SoX2i5lfsS9 erJAXkeHZNnQCxxK8NqIjhV/xTgUcDIO2sSuy9lNUXhPPUjkhjWjS/WEmggaNFwhhzpf ZhxC1I7dn0pWS9U0w6zs2Cv06v5aH6um4/W3i7TOa0uKIimJ/rEXqTHie+mnmt1Ohx8O YcNiPdx9snajsGDrDC4U6GlVZ1rjflX6B3wsA8I6vsYluXuIFSiNheqZsfROTPeYGdkM /ZCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=kTBcKAMTLKESJNxm3nGpE/vMc0d6+JyySFIu52kBSMM=; b=BiAD/mvcnXAGoJQ4QOhqnfzD3TBLSFKNalWwU7Nn0Hc41Wb1gZev5Hu4W0YsglFPmr bPpmqAGigyFR5MeLrVXSOHjA5ODAm4hOXCu/OlEWX0QJhtUtoP1RwQmKTIEjiW/Sbzjx SUscEgyckeSeZsdcJItANAxRA+ik/Wigg5DTz9NkJu6bdnOE7z1+0HFvUoDMfpU4Bk1T 4a3XGE7aOSLIXhKCEJQU4HdlseuOzlNVXmUUXSZRDEUmHmhEJ8zBzxeB2+nRtGdmF3sr SznK/lAI/qwtvsR8vQ7XVZZ8lgTWjeYj2JGJmDIFUBrpSB1uc1dQ7DZDlSEn23uZCcwG KeiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="b4Ai/EBy"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u125-20020a627983000000b005e37ee6d9c1si11400712pfc.281.2023.03.06.19.10.33; Mon, 06 Mar 2023 19:10:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="b4Ai/EBy"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231174AbjCGDHv (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 6 Mar 2023 22:07:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230410AbjCGDHN (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 6 Mar 2023 22:07:13 -0500 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA95087A08; Mon, 6 Mar 2023 19:05:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678158351; x=1709694351; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nd37h2vxkhLXg5jhh870M6BiFI8TxVn0dDXlR1ukIGo=; b=b4Ai/EByWkbHFsvUt4cPRiQYFu9vTGZubyaPnlAMnlUC+uuRPupnNH6K 6UXIDOmzbJGco5vKz8ZvEpXsQ2OXKHKp3XgFFR5ysUhas+hZ0XDSMfmrC eM3nmvSsCKIruWJ/ZZT2qNW2eHdW2LqgEDR0MOzkd4zTCB1tQckBFlIAO fHPNluuFJziS3STWqqdWKukhiBjAVv4wVcrNCbqkbBnAHUoOJxkyihQ3D XctBh8hk8MwOstI4iq78mdS8KGCCWMh1aqc0F01KZ5+fLJKB5qlYPhLTE s/23IRycAQwKjT/TNombn/Rf+TcOq4XZW1cdd6pwmWWMMpPU/K5cSoraw Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="338072622" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="338072622" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2023 19:05:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10641"; a="676409952" X-IronPort-AV: E=Sophos;i="5.98,238,1673942400"; d="scan'208";a="676409952" Received: from unknown (HELO fred..) ([172.25.112.68]) by orsmga002.jf.intel.com with ESMTP; 06 Mar 2023 19:05:23 -0800 From: Xin Li <xin3.li@intel.com> To: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com, peterz@infradead.org, andrew.cooper3@citrix.com, seanjc@google.com, pbonzini@redhat.com, ravi.v.shankar@intel.com Subject: [PATCH v5 32/34] x86/fred: disable FRED by default in its early stage Date: Mon, 6 Mar 2023 18:39:44 -0800 Message-Id: <20230307023946.14516-33-xin3.li@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230307023946.14516-1-xin3.li@intel.com> References: <20230307023946.14516-1-xin3.li@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759676880350143127?= X-GMAIL-MSGID: =?utf-8?q?1759676880350143127?= |
Series |
x86: enable FRED for x86-64
|
|
Commit Message
Li, Xin3
March 7, 2023, 2:39 a.m. UTC
Disable FRED by default in its early stage. To enable FRED, a new kernel command line option "fred" needs to be added. Tested-by: Shan Kang <shan.kang@intel.com> Signed-off-by: Xin Li <xin3.li@intel.com> --- Documentation/admin-guide/kernel-parameters.txt | 4 ++++ arch/x86/kernel/cpu/common.c | 3 +++ 2 files changed, 7 insertions(+)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index 6221a1d057dd..c55ea60e1a0c 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1498,6 +1498,10 @@ Warning: use of this parameter will taint the kernel and may cause unknown problems. + fred + Forcefully enable flexible return and event delivery, + which is otherwise disabled by default. + ftrace=[tracer] [FTRACE] will set and start the specified tracer as early as possible in order to facilitate early diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c index eea41cb8722e..4db5e619fc97 100644 --- a/arch/x86/kernel/cpu/common.c +++ b/arch/x86/kernel/cpu/common.c @@ -1467,6 +1467,9 @@ static void __init cpu_parse_early_param(void) char *argptr = arg, *opt; int arglen, taint = 0; + if (!cmdline_find_option_bool(boot_command_line, "fred")) + setup_clear_cpu_cap(X86_FEATURE_FRED); + #ifdef CONFIG_X86_32 if (cmdline_find_option_bool(boot_command_line, "no387")) #ifdef CONFIG_MATH_EMULATION