Message ID | 20230705181256.3539027-10-vschneid@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2056265vqx; Wed, 5 Jul 2023 11:26:08 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ53C0p5+7UoFS2z9UXrtoDaC8WJcJtF5wbRHbk6Gn+EmyvtE7nCSYu1gmdwdFxNyWXdpLbi X-Received: by 2002:a05:6870:ee14:b0:1b0:7661:dd18 with SMTP id ga20-20020a056870ee1400b001b07661dd18mr22158952oab.23.1688581568477; Wed, 05 Jul 2023 11:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688581568; cv=none; d=google.com; s=arc-20160816; b=ZvXhpgCcwXmT4TaNqci1u92eJD7UqZuLGiE7G7hyGK8BMgXNSHB44xPmyJbY5CLm1B KqORdN5omXJX/eBmDxWICtsUhdFuIyF5LJGupLQK9jGyo0eY0BEz368ou6iWI7plnyhS 2uEhzGHeu+Xt+ZwT4p1PfPW9XkU0PKNDpmnMXjr8I2uD50MnOxws4DYQv2k12m0u0Mbo Rufs6Ws0WG0XDpMP9HEHszjCTf2u09VM205O+SAJISStkl1sftB+zYwjX75wdiWLXXM6 IFaB8R5Aq6twhy+2VS5yz0EbdEb91c4oA+JXX7ZxSp3lamo0pxDRk+6vpRQ7UMI664K9 SYtg== 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=izi9UHkrSeZ4AHa49u6aA8W9HneeYs8L2V/Y70LmMpM=; fh=dVCMRuKhK2aqTEuWethYlqkP4G2sINJQEE+rq5xoO1c=; b=i+7LUGPK4r0tzKfeUASlzz/TwJGUMvQ5jvcacfU2Ntyvdak7yznYELNAAtfvJxYYSI xcgP4fkv2iM8FmdlXv0RFreF3wZlKFnlP0+qcfovtJylj7grZyWTlQSi7J+Dn0oCqIKu mTyO1xFaEPmL/2+I3Hu9+i/kFwEzRDrKbkF/A+WLLdPNkvOl4ciCcPRZkLaaKO4KaVH+ BHYQ0m4QlJHD8PZ0X+H2rfNUar4YiG/E1tq58ebnDqSGn8kPtfuQNs4yB5t8XpDIRKbb tGIufYQIfCg2xEe8wszc/mQPU5x4Zm2t3G/vLZqSyBc2AyaRPKq7Ye/3Eh1PXGf3KuWF N8GA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aK8mmgOZ; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h190-20020a636cc7000000b0055792e57c89si22334258pgc.450.2023.07.05.11.25.53; Wed, 05 Jul 2023 11:26:08 -0700 (PDT) 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=@redhat.com header.s=mimecast20190719 header.b=aK8mmgOZ; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231975AbjGESSO (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Wed, 5 Jul 2023 14:18:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233434AbjGESSD (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 5 Jul 2023 14:18:03 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F20F1BF4 for <linux-kernel@vger.kernel.org>; Wed, 5 Jul 2023 11:16:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688581018; 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=izi9UHkrSeZ4AHa49u6aA8W9HneeYs8L2V/Y70LmMpM=; b=aK8mmgOZbP2nnH9iHE0N2/mOuS2xZWRC8g4jlmqb4m4D+Jm60Or+2a2FTt5HTB+imuEQvh zAso7CV3piJEPUqBnZVjP1Yzuxw2y6tAp0TUv0xyB3Q4IKzPOXvzb74tPX2kCeEcZ4H4pQ 0vHl5ZNTdoTSW0/xVjV8I2J44mYVuoU= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-197-m-BHSRQXMT2rSYl1-eA5hQ-1; Wed, 05 Jul 2023 14:16:54 -0400 X-MC-Unique: m-BHSRQXMT2rSYl1-eA5hQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B7B9F3815EF2; Wed, 5 Jul 2023 18:16:52 +0000 (UTC) Received: from vschneid.remote.csb (unknown [10.42.28.164]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D1D60F5CFA; Wed, 5 Jul 2023 18:16:46 +0000 (UTC) From: Valentin Schneider <vschneid@redhat.com> To: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, bpf@vger.kernel.org, x86@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>, 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>, 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>, Daniel Bristot de Oliveira <bristot@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>, Yair Podemsky <ypodemsk@redhat.com> Subject: [RFC PATCH 09/14] x86/kvm: Make kvm_async_pf_enabled __ro_after_init Date: Wed, 5 Jul 2023 19:12:51 +0100 Message-Id: <20230705181256.3539027-10-vschneid@redhat.com> In-Reply-To: <20230705181256.3539027-1-vschneid@redhat.com> References: <20230705181256.3539027-1-vschneid@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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?1770606106429422894?= X-GMAIL-MSGID: =?utf-8?q?1770606106429422894?= |
Series |
context_tracking,x86: Defer some IPIs until a user->kernel transition
|
|
Commit Message
Valentin Schneider
July 5, 2023, 6:12 p.m. UTC
objtool now warns about it:
vmlinux.o: warning: objtool: exc_page_fault+0x2a: Non __ro_after_init static key "kvm_async_pf_enabled" in .noinstr section
The key can only be enabled (and not disabled) in the __init function
kvm_guest_init(), so mark it as __ro_after_init.
Signed-off-by: Valentin Schneider <vschneid@redhat.com>
---
arch/x86/kernel/kvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/kvm.c b/arch/x86/kernel/kvm.c index 1cceac5984daa..319460090a836 100644 --- a/arch/x86/kernel/kvm.c +++ b/arch/x86/kernel/kvm.c @@ -44,7 +44,7 @@ #include <asm/svm.h> #include <asm/e820/api.h> -DEFINE_STATIC_KEY_FALSE(kvm_async_pf_enabled); +DEFINE_STATIC_KEY_FALSE_RO(kvm_async_pf_enabled); static int kvmapf = 1;