Received: by 2002:a05:7412:da14:b0:e2:908c:2ebd with SMTP id fe20csp2012482rdb; Mon, 9 Oct 2023 09:41:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG2rg2H1Ec4a8s3LI/xp0NnOhxMJ4RYj8TYVUikRdrJcKIq8ub+ZlphIVpD7oCrL4ptwR78 X-Received: by 2002:a05:6a20:1612:b0:149:9b2f:a79d with SMTP id l18-20020a056a20161200b001499b2fa79dmr16611302pzj.6.1696869700643; Mon, 09 Oct 2023 09:41:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696869700; cv=none; d=google.com; s=arc-20160816; b=anklaWIbGzCSA73BMZsvahw4uasUPwpAmNrW1Xf91D06JTkdMn/xUbai0fbcUjWB3F GhByoIzlipYhUVl1KyEDp4z8K4E4rcAM9gMaOhKoit1R529b36bGJQ/4eJSeQVpkO8MD 9AS1WewcV8d1BiZO/30avfrG7NONDwVRsSpNj9wHF3KNasOmv4yJ//aCkUKe915FY38B 3FAzuy/RJO+JetoK/RKOZsRjZ7jg/Zhq0psqt/ph5C9V8bXln9LQbnV55FVeHGjKfIq6 3lKNNsCIT8C5sjXPbXUPNn4cw/DwLo+gMaQUvyjQzV8p9zR538bhPkmn7f8zuQer7hfo lbPA== 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 :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=+YpXHXo6RBy8CnTiTObZdU28mMjUq9Z4XmoNn8CdwOg=; fh=bEpyZ3orywRzCZCjpHiIHAgVcL5hT84u5ZQiDrYDpT4=; b=lu2mPTdgIo6gUyU9aZbwdyGb2+s6CYXyoCLXeeX/rmXN7x3hrQZ6Z5JBlHWDYYGc16 zcBeJfFEwZaebdXYmvFGAzlBdbUo5Ldvzuef9ilxPy5bHnQUOjBssizSBcGODfQMFAkP Z2bC3BkbuTeSq67/3XW14Uqg66u1jruEucAzwWLLz6K5PJ3u6j3F+vNTVg46RrLoMOvh Pc0gTmmL8/dZD2WqHLXjZ5FcC5Qtv10yWfL17R327tMXsOqds9xGchMP8JoOQE100BWM wSrar6uRPpN+KKlRcV2I7Lwb81R3lMwmYueHUIxRGNiHIxFiHo4foEKD5qNLTjk6DjM1 BMyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M5wXaGZp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id v10-20020a63610a000000b00589fcc39ef1si7200632pgb.365.2023.10.09.09.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:41:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=M5wXaGZp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id D492E80C2568; Mon, 9 Oct 2023 09:41:37 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377325AbjJIQla (ORCPT + 99 others); Mon, 9 Oct 2023 12:41:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377328AbjJIQl2 (ORCPT ); Mon, 9 Oct 2023 12:41:28 -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 4253EB7 for ; Mon, 9 Oct 2023 09:40:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1696869643; h=from:from: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=+YpXHXo6RBy8CnTiTObZdU28mMjUq9Z4XmoNn8CdwOg=; b=M5wXaGZpjXkD/OdeFEb27qAuAhxegOeUCLSB/ie1jz1/1DULeE07SJG/cFwpVgJtNdH1jn VunY2wwQ19bV9L3FAC7XL5fmwrvrdLOgJypRZD0bvg1vrB6nWQ5JeguyRJl7qPL3TgJ7NR qHTHgc125Xk9HM8+EwQgIak9k6Ps2fY= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-9-Ls3o9I_mPv2QANSqzzuDeg-1; Mon, 09 Oct 2023 12:40:39 -0400 X-MC-Unique: Ls3o9I_mPv2QANSqzzuDeg-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-4067f186094so30413405e9.1 for ; Mon, 09 Oct 2023 09:40:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696869638; x=1697474438; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=+YpXHXo6RBy8CnTiTObZdU28mMjUq9Z4XmoNn8CdwOg=; b=rCFMB+M8iwTYYCcVMUb2cb/9BFoKqidWnIzmfGtRyfeg5ZGqncHPWpz1uvHK/To6Zr qLO4LM5NAY5LtYlxz/ViyBkq9OWIU8+BSostnUdZOcP6uSkeu1YBLD8GDrqITQkO7hIa +TXUM2C8pn6vkWvsBwExpEn3J2KaODP5RsPkBcTMXgHtyH6Q03ZBD4dDZnG99g9NzO3s E13ln1jFIjf6vthl26NRh1vFNJSX+KPzZ5yd8bQn1S9mq90ME01lWaRbVB7MZ2fZ3M8W Ha9t/mMcNVqklU1GGKVl4FdnQcYhhqOZ2XagnEPJEQlZBIDr18zzrQ9xG3O77+BT1O/u pVbA== X-Gm-Message-State: AOJu0YyJmO9twtZSdph97PnkdKOZajpfOrNbBZ1jws3d1ahAr0nBjBUQ FZHc/KCPy5JU74ekMzwfX9D2hpoBSKKcigpuJsRzmJWA9rxv74rlNrI4NNHaa35m685JVJxsaTn Ws/3GBvScnyViGUfy3f6NB2SO X-Received: by 2002:a05:600c:2949:b0:405:82c0:d9d9 with SMTP id n9-20020a05600c294900b0040582c0d9d9mr14896233wmd.41.1696869638583; Mon, 09 Oct 2023 09:40:38 -0700 (PDT) X-Received: by 2002:a05:600c:2949:b0:405:82c0:d9d9 with SMTP id n9-20020a05600c294900b0040582c0d9d9mr14896162wmd.41.1696869638060; Mon, 09 Oct 2023 09:40:38 -0700 (PDT) Received: from starship ([89.237.100.246]) by smtp.gmail.com with ESMTPSA id bd5-20020a05600c1f0500b004030e8ff964sm14033430wmb.34.2023.10.09.09.40.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Oct 2023 09:40:37 -0700 (PDT) Message-ID: <907b351fee183609891a4d0cfb0a79bad85577a0.camel@redhat.com> Subject: Re: [RFC PATCH v2 14/20] x86/kvm: Make kvm_async_pf_enabled __ro_after_init From: Maxim Levitsky To: Valentin Schneider , 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, rcu@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Steven Rostedt , Masami Hiramatsu , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Andy Lutomirski , Peter Zijlstra , Frederic Weisbecker , "Paul E. McKenney" , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Mathieu Desnoyers , Lai Jiangshan , Zqiang , Andrew Morton , Uladzislau Rezki , Christoph Hellwig , Lorenzo Stoakes , Josh Poimboeuf , Jason Baron , Kees Cook , Sami Tolvanen , Ard Biesheuvel , Nicholas Piggin , Juerg Haefliger , Nicolas Saenz Julienne , "Kirill A. Shutemov" , Nadav Amit , Dan Carpenter , Chuang Wang , Yang Jihong , Petr Mladek , "Jason A. Donenfeld" , Song Liu , Julian Pidancet , Tom Lendacky , Dionna Glaze , Thomas =?ISO-8859-1?Q?Wei=DFschuh?= , Juri Lelli , Daniel Bristot de Oliveira , Marcelo Tosatti , Yair Podemsky Date: Mon, 09 Oct 2023 19:40:31 +0300 In-Reply-To: <20230720163056.2564824-15-vschneid@redhat.com> References: <20230720163056.2564824-1-vschneid@redhat.com> <20230720163056.2564824-15-vschneid@redhat.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 09 Oct 2023 09:41:38 -0700 (PDT) X-Spam-Level: ** У чт, 2023-07-20 у 17:30 +0100, Valentin Schneider пише: > 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 > --- > 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 > #include > > -DEFINE_STATIC_KEY_FALSE(kvm_async_pf_enabled); > +DEFINE_STATIC_KEY_FALSE_RO(kvm_async_pf_enabled); > > static int kvmapf = 1; > Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky