From patchwork Mon Nov 20 10:55:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 167051 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9910:0:b0:403:3b70:6f57 with SMTP id i16csp2114548vqn; Mon, 20 Nov 2023 02:57:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IE/+cIG7DVcyOGv5SuB68rCsAQupUjMXNHEvkxGJz30ghwB/6pXvGq9XZ3NSsBaWvSzx3wY X-Received: by 2002:a05:6870:7d89:b0:1eb:4805:30d9 with SMTP id oq9-20020a0568707d8900b001eb480530d9mr8975431oab.49.1700477849381; Mon, 20 Nov 2023 02:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700477849; cv=none; d=google.com; s=arc-20160816; b=YAiUrdCe8O0VB9/C15ifGrEcSCPU3yOWtUUKYIcnRAtv2jXSVqtEKT+vVsjWDCIdCY vBKyoHFIYzMEtv3oc7wa8eHu26Ip5qeGf2h6ntVCzLO4k4NsPwifIawl9fiHa/QW9Nlr TzeZd8N3+CfRdT0MX6LPYJNcV0N1eJKtGscCqYnzexURwNOqzqGSYTFfl2hQxigR3JEM abjAiX0r6VrBEU42VGRwBsAwri6PjmZrD8BJPR//QrVT1DQMdbofK2w85yWX4adlXg73 MzetCOatp9yVLelvw4xpLqRo/D/z4LIizqF3MPWW+hqZibtTHwDNzdAkldFKhxlLwlxL GUoA== 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=k68HwnJwcz4zoShTsfUk757+WGBllw5A6qnajgwYuQI=; fh=bEaXtmS8lzRItYrE/RfaVyKNdc9i8y6GHBEJVBz/DUE=; b=XHKMdtxKBtNvfRQ97o5l6rNDtEjo+PduFtCLWEDYlQEH/AIy/CrEyMt4rW7idUdMwD bexXVssIlCVb30gyE9y0lHHbctRDuDP2q8kphVoBlH7jBZkc9M7FWXalzNYpDl2caogS 6XBk6mmXZ0R7nyUzT8cI/r2Qr+G5ERFnYZIrT4pGJbXoWk9oMXrpUu8dmCyMwt34/J4F yLbAp2Qsn//p9SYnGcQWqOq+uhDNZxFTmJD0YfAvuOLXqdSFh8KtEQu7E4GGc7pPldLk iNH05zQo4XGSv8PUFSKYGGHrTonO6VwgEOxT7OyQZDg9F6fDikpvU9lgxtAB8jPwo03i Whcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T1e0LFnt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id bq3-20020a056a02044300b005b95fbd816esi7956258pgb.677.2023.11.20.02.57.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 02:57:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T1e0LFnt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id DC38780A439F; Mon, 20 Nov 2023 02:57:20 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233162AbjKTK4c (ORCPT + 27 others); Mon, 20 Nov 2023 05:56:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233204AbjKTK4S (ORCPT ); Mon, 20 Nov 2023 05:56:18 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D4FE9C for ; Mon, 20 Nov 2023 02:56:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1700477770; 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=k68HwnJwcz4zoShTsfUk757+WGBllw5A6qnajgwYuQI=; b=T1e0LFntgh+O0GGeCaNDvGWW/LYc4C9ZWhOKVlWGGSKLXGzGoulSixZnfUGTkLjJadn0dS 6YSoar/qqugUQC91crIrWX3ATmLYQY2PsaVuwuiJA4IKg2nMjO4QlcWTmcibeGHnIaIlGR 2tzYr+vNFTGFMdQfsRbmL6HKq1UNU+Y= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-130-HElFptZqNS-CKEUV_FXkew-1; Mon, 20 Nov 2023 05:56:03 -0500 X-MC-Unique: HElFptZqNS-CKEUV_FXkew-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.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 mimecast-mx02.redhat.com (Postfix) with ESMTPS id EE7183C0E203; Mon, 20 Nov 2023 10:56:01 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.195.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FE2F2026D4C; Mon, 20 Nov 2023 10:55:57 +0000 (UTC) From: Valentin Schneider To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Josh Poimboeuf , Pawan Gupta , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Arnd Bergmann , Jason Baron , Steven Rostedt , Ard Biesheuvel , Frederic Weisbecker , "Paul E. McKenney" , Feng Tang , Andrew Morton , "Mike Rapoport (IBM)" , Vlastimil Babka , David Hildenbrand , "ndesaulniers@google.com" , Michael Kelley , "Masami Hiramatsu (Google)" Subject: [PATCH 3/5] x86/kvm: Make kvm_async_pf_enabled __ro_after_init Date: Mon, 20 Nov 2023 11:55:26 +0100 Message-ID: <20231120105528.760306-4-vschneid@redhat.com> In-Reply-To: <20231120105528.760306-1-vschneid@redhat.com> References: <20231120105528.760306-1-vschneid@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Mon, 20 Nov 2023 02:57:20 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783080261375757534 X-GMAIL-MSGID: 1783080261375757534 kvm_async_pf_enabled is only ever enabled in __init kvm_guest_init(), so mark it as __ro_after_init. Signed-off-by: Valentin Schneider Reviewed-by: Sean Christopherson --- 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 0ddb3bd0f1aac..146e16f420edf 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;