Message ID | 20241119153502.41361-8-vschneid@redhat.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0C4DD44174 for <linux-mm@archiver.kernel.org>; Tue, 19 Nov 2024 15:37:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 68ACA6B0085; Tue, 19 Nov 2024 10:37:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 616616B00BA; Tue, 19 Nov 2024 10:37:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 440256B00BB; Tue, 19 Nov 2024 10:37:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 2100E6B0085 for <linux-mm@kvack.org>; Tue, 19 Nov 2024 10:37:54 -0500 (EST) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id D2A32160592 for <linux-mm@kvack.org>; Tue, 19 Nov 2024 15:37:53 +0000 (UTC) X-FDA: 82803249018.16.F639EAD Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf21.hostedemail.com (Postfix) with ESMTP id 79D801C0007 for <linux-mm@kvack.org>; Tue, 19 Nov 2024 15:36:16 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WxYnmFsT; spf=pass (imf21.hostedemail.com: domain of vschneid@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=vschneid@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1732030522; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=UFFvFWWnWyZvXw5qfQp0QkusU/cmiYrMNoaijrYT6Zw=; b=LBLgmPO/9D+65sCS5F8eLX/ag83lnvNFkY1o8S0Uzw8rTJl4G8DeD80h1bMeHTmroTyNwY JJxTIUhG/+JQC7X+CQEkB5jkxiqYoS3XRlsjlTdF0rdmFyp+5U0eS7p8TcD5kUsi6zKBpr 2+rEkvxo9G6/7bZ+Oa4gp5rzj/G7vDA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1732030522; a=rsa-sha256; cv=none; b=G2DrEETb2BVB54CzOFOZsGGewk0kYWUc6kB6q/2gmaLpM9lKglODpOc+iErTZHuMrvhS6E XeIfO1t2zxulh3/MVKyrKfthTbhNWxXXTHnHsj4WAlw8wQQoTBrej7zYCeycFe23uH3PEL oxxlxl+7FCXz4lkITkvCk3c9/JhsDjA= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=WxYnmFsT; spf=pass (imf21.hostedemail.com: domain of vschneid@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=vschneid@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732030671; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UFFvFWWnWyZvXw5qfQp0QkusU/cmiYrMNoaijrYT6Zw=; b=WxYnmFsTh1VKnOyjeivpXhvhNB8Z2uuwFr6HuiWlB6+/dz81FTDXTl+JCsCaeKhuX/vyNO pDCP68CXG+h9CtY+QjaEYg02XYwBWoSAdOJgD4og2cDMbD+TkIH8sIeKq464jgq5Vwnbev E8UZsu6EApDTAx3laFJJwMst0HA1SK8= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-594-8NjzI6AZPs6iJgNCQczRug-1; Tue, 19 Nov 2024 10:37:49 -0500 X-MC-Unique: 8NjzI6AZPs6iJgNCQczRug-1 X-Mimecast-MFC-AGG-ID: 8NjzI6AZPs6iJgNCQczRug Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF4C91979052; Tue, 19 Nov 2024 15:37:43 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.194.94]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B133F30001A0; Tue, 19 Nov 2024 15:37:27 +0000 (UTC) From: Valentin Schneider <vschneid@redhat.com> To: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@kernel.org, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Steven Rostedt <rostedt@goodmis.org>, Masami Hiramatsu <mhiramat@kernel.org>, Jonathan Corbet <corbet@lwn.net>, Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, Wanpeng Li <wanpengli@tencent.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Andy Lutomirski <luto@kernel.org>, Peter Zijlstra <peterz@infradead.org>, Frederic Weisbecker <frederic@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>, Neeraj Upadhyay <quic_neeraju@quicinc.com>, Joel Fernandes <joel@joelfernandes.org>, Josh Triplett <josh@joshtriplett.org>, Boqun Feng <boqun.feng@gmail.com>, Mathieu Desnoyers <mathieu.desnoyers@efficios.com>, Lai Jiangshan <jiangshanlai@gmail.com>, Zqiang <qiang.zhang1211@gmail.com>, Andrew Morton <akpm@linux-foundation.org>, Uladzislau Rezki <urezki@gmail.com>, Christoph Hellwig <hch@infradead.org>, Lorenzo Stoakes <lstoakes@gmail.com>, Josh Poimboeuf <jpoimboe@kernel.org>, Jason Baron <jbaron@akamai.com>, Kees Cook <keescook@chromium.org>, Sami Tolvanen <samitolvanen@google.com>, Ard Biesheuvel <ardb@kernel.org>, Nicholas Piggin <npiggin@gmail.com>, Juerg Haefliger <juerg.haefliger@canonical.com>, Nicolas Saenz Julienne <nsaenz@kernel.org>, "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>, Nadav Amit <namit@vmware.com>, Dan Carpenter <error27@gmail.com>, Chuang Wang <nashuiliang@gmail.com>, Yang Jihong <yangjihong1@huawei.com>, Petr Mladek <pmladek@suse.com>, "Jason A. Donenfeld" <Jason@zx2c4.com>, Song Liu <song@kernel.org>, Julian Pidancet <julian.pidancet@oracle.com>, Tom Lendacky <thomas.lendacky@amd.com>, Dionna Glaze <dionnaglaze@google.com>, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= <linux@weissschuh.net>, Juri Lelli <juri.lelli@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Yair Podemsky <ypodemsk@redhat.com>, Daniel Wagner <dwagner@suse.de>, Petr Tesarik <ptesarik@suse.com> Subject: [RFC PATCH v3 07/15] x86/speculation/mds: Make mds_idle_clear forceful Date: Tue, 19 Nov 2024 16:34:54 +0100 Message-ID: <20241119153502.41361-8-vschneid@redhat.com> In-Reply-To: <20241119153502.41361-1-vschneid@redhat.com> References: <20241119153502.41361-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 79D801C0007 X-Stat-Signature: 4e7sid5u83415d8wrm1j6xh8wuabagqn X-HE-Tag: 1732030576-695202 X-HE-Meta: U2FsdGVkX19GL/Py8Tzn+tnCOPbv82d+EnjK7Yw0n+hAuuZQ08Jj7wsTDA5IOhLgu8t16GwUC3pK4S+nuukRK4TQAgbEzWGJmVLvix3QKTDGTFcsgehx8MscqJ4r5tS0Dju4b6OJkTZSCrVMbTOGvcmJn7tPacMzPxSw4Ke5dbXCXHyzmc6HtLefga2A8m9HvrtAXyg2FnvA4C9T/KQz+U8dtVCbDNpmXaaTxcV33sue/ntPZpA9E7JYHZrFMIO7Oh9aRGRDN1VbV52Rjk+jUUWuCNZ9Md2xXv1YN8ROOWhNDDIxLXBDPkwAv5tnIZOhlfN+W1LHbXXLYpcDCfPIebesXs2A9WxjSiKBEZNxtlP1RHL36cTZZYzRYsRSxVAspOeTXULiWnsI2n+oFbeEWlx/aT490FgAqyv4NFTPQJx7FNt/dy/GOjYhzMbQC3PCenpkaTgJOikXIOuU03Eg/JOwPpQar79f77itgiPRM/UQZtiwIm0cwtIg+ihMxkh66PWoKdUDsrKp+ErYtFdEKvWT5FpDcHy4df9HKJJ0W7UPTjvF6gVSz+oVmBvPJSzR9C9FAm/uhZFv5QRUacpbbJ5eOq5hIcB8o3d/CBVOFcq+0vy91RGDSCC4gyu5e53shotsFCVgM2m2Q6P9kga2OxqS9jOCIquJrFT1EcFlS6NIswmPu/vloyDTygLrji9/tYCrKNhJaSa7HaV459V4XlAtvEY9cuWqOSHlkCu1J+lv8Cul+azzDQJhgmqsyAMJSRE7hIC60w5rwd1q0Qzc1t27Kp6DN1dutzI1UuH40Ltimc5lnEylprvyffAySVi8Rc/58fXqyP8GUTKK3yF6qtWww2t+etvr/vwFtxPyMjjr3mdH8Lat/rwuo8JB8vKlJveBCL7W7zY42b7w4DpLPbtNTIBtFqE0jTqIu6O34jqOWnepzStQwEWBwg2crJ9tnCFeeXK2RETRme2Fu/J 1n+LCKwA bn7jE/6pJemgSgmLZ9webLFe7JdcTFu12bBWU7AD5MAVwYw6Kvaz3hIi2nVGUOwPtemfW47R5VsE05IfvwapO8o0WvLHVke5aNHIaC8AQ1HvbRQDDEbmDZCYyeNClQUOHB7eRF6zEvo+jykLkZLnvPcnGVGx0ocGWk9EXICr8wnzN8IpfnhI5JffWRkkBpKTk7gZ24ke5KlmDLRvOFsEISKmyDORSx+RvnubX87y2FnGPrCm+uaEl8pQ5Wqo9Oay9SI9OERYUa6KNNSB55iY+12xV6M0achgJUNdNkQOl7ADV5tlqL1HJKhkDRgecOht5OIBzB9Ng2fftf9tggVoz/cT4Om90b+q83LSG9BKRecA8XQtgLEXw1yUaHLg2GfvCHAnUHcs7dh+qVLOqHqc5H1g72FX0IeQb7ioQm5lmty85L+AA15D+JE/GadeQ9/z9CCMllozCeYMlI1U7zddfyuJ49Q== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
context_tracking,x86: Defer some IPIs until a user->kernel transition
|
expand
|
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 47a01d4028f60..dcc4d5d6e3b95 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -114,7 +114,7 @@ DEFINE_STATIC_KEY_FALSE(switch_mm_cond_ibpb); DEFINE_STATIC_KEY_FALSE(switch_mm_always_ibpb); /* Control MDS CPU buffer clear before idling (halt, mwait) */ -DEFINE_STATIC_KEY_FALSE(mds_idle_clear); +DEFINE_STATIC_KEY_FALSE_FORCE(mds_idle_clear); EXPORT_SYMBOL_GPL(mds_idle_clear); /*
Later commits will cause objtool to warn about non __ro_after_init static keys being used in .noinstr sections in order to safely defer instruction patching IPIs targeted at NOHZ_FULL CPUs. mds_idle_clear is used in .noinstr code, and can be modified at runtime (SMT hotplug). Suppressing the text_poke_sync() IPI has little benefits for this key, as hotplug implies eventually going through takedown_cpu() -> stop_machine_cpuslocked() which is going to cause interference on all online CPUs anyway. Mark it as forceful to let the kernel know to always send the text_poke_sync() IPI for it, and to let objtool know not to warn about it. Signed-off-by: Valentin Schneider <vschneid@redhat.com> --- arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)