From patchwork Tue Feb 6 17:39:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Valentin Schneider X-Patchwork-Id: 197572 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1705995dyb; Tue, 6 Feb 2024 09:43:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzUUxd/Y5tF3X4SMy22I/LP8qzfvC/MvSVyNr3QqJ/lWBkKBt27kKztjFVJa8RawAF9BjG X-Received: by 2002:a05:620a:4489:b0:785:6411:344 with SMTP id x9-20020a05620a448900b0078564110344mr4108793qkp.7.1707241381616; Tue, 06 Feb 2024 09:43:01 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707241381; cv=pass; d=google.com; s=arc-20160816; b=ZZq0CVmFHo51NOB9OL+Xa/ngkVTeUfD1pcn6HH/xFA2tTIALMbxRrkCcTyWX0WBAbB k+CWpYEcXShvQTe9P2SPAjAzUT3SJR49DdUPwzW2ZbRD+v+mSLRJdsDwV+3OmT6GYT3I Vfp8HV9gpuJTdjSVqPmFXuDuTiTkjlJrefJkLSrnTvHKpKg7cIBerV8O9HR3Qc3/zifN POaQg46ZX8j4dd2T+j4QDbMTtdzVoJJv+QAnlcw6pPo1woI10pzafplNHiUUIaL/PRyU XoVVpTzUdmh7DL35BYnd57NcM+xOzJcukazmdPQ4Y16rCFtXH0aplW3T3QBgekzhXIM3 uyQg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DiAeFErACPu2Qq/VSwmzn5NIHI5rZO8DYF37cTAxg+8=; fh=RaLc3JvvDpbvBfK1lrocTZelB7+xr0VHiebZ8C1vpaQ=; b=DOMXUJtMV4ep3exX0NtpExDelQ9zBBoCFAWq609O3DTGOyLqVnMsjHgfPpam/vK+Tm I0ImqRGeL4bR1ZCRAiPZpya4jUrsV0FDYut0awwOzyXgaDtWQmFxnCg2l+KZXTrrzLc2 tgfKOhtzEDXX9i0zpfli8gACxFbdFhf7UDXSPFBfgtcyxXurG5V6c4QgaEux3RuUT/EK xuZVDgjtmAwF9Sno5GC4zSytmP9ShVHV2XV7Op5RbIEaXp+xxY6pPUI9PgWv5DWC4fDR f9L6nn4f0q7LKEu73nquvfu9SCrS3GrD6jO6sG9Pg/6LoFJtOTv9XfA2DlhVz/pPkzys ltlg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C1MOs9an; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-55414-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55414-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCXQf/Sof95CYBkkcYqXwqKj4VxDeARimlc7QukGPGHuLCKRsFU51H6761B4c3NiCP3iur5tRFBLfuOllBgdtu2tCq6D0Q== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id z10-20020ae9e60a000000b0078596a6f587si508049qkf.47.2024.02.06.09.43.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 09:43:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55414-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=C1MOs9an; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-55414-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55414-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 673FA1C25151 for ; Tue, 6 Feb 2024 17:43:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 080561B94F; Tue, 6 Feb 2024 17:40:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="C1MOs9an" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B827719470 for ; Tue, 6 Feb 2024 17:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707241210; cv=none; b=PVv2Mwlou2Sake20O3YiOZg8KEehnFewvIcDbYx7pPfdev+IGnQCrvxuTJlKMzLTodYMIBhx6vR+Axx1ofOp43vXFmuDFJqvG8n/IS61f1RCD84iWybIYKDnFN6g2V0lq7Nqb5SB2JacfhEssGBTNJTZYUO0RxiFScMOWDVY0Fw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707241210; c=relaxed/simple; bh=OqaVifQS+nxzCD21b4s8rJ7JH6j5ozOv9bSA598QaaY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=E4F16/X6nsCTgjLFe2US3IMvjQn+ff97o0P9u4nwyCgTJhxXgkI4X80w7LPEOT/y0okvl9w7s3XKKbyhpr7/+U7g7MnRYOBQHb6NE9Vs5sYJWjxqIkxKR0+isp2B36hMmEUylKjnBYbUOkY0KHJz0Z1kMZbEL93+MgBNNisVlQY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=C1MOs9an; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707241207; 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=DiAeFErACPu2Qq/VSwmzn5NIHI5rZO8DYF37cTAxg+8=; b=C1MOs9anrQSsXFRlV/Bfj8OEba6wS8eDNuYaWzmIl1sgnBKiP0vlspln4ajXN1NOo6n6EY 0IQIhLuNXcGk/NS9oBZB0dPTqR+KxsUpwUdN1oqJ1+5YNAgIwk1HbpyMIpAy8Im9xZp/PS y7rSrHgzDmgmOXTf+cY0oVL8yRoClfQ= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-527-Leok8IbMPaWMhJaxElOyGA-1; Tue, 06 Feb 2024 12:40:02 -0500 X-MC-Unique: Leok8IbMPaWMhJaxElOyGA-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 98959879843; Tue, 6 Feb 2024 17:40:00 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.193.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B9882026D06; Tue, 6 Feb 2024 17:39:56 +0000 (UTC) From: Valentin Schneider To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Sean Christopherson , Josh Poimboeuf , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , 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 v2 3/5] x86/kvm: Make kvm_async_pf_enabled __ro_after_init Date: Tue, 6 Feb 2024 18:39:09 +0100 Message-ID: <20240206173911.4131670-4-vschneid@redhat.com> In-Reply-To: <20240206173911.4131670-1-vschneid@redhat.com> References: <20240206173911.4131670-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790172338960865827 X-GMAIL-MSGID: 1790172338960865827 kvm_async_pf_enabled is only ever enabled in __init kvm_guest_init(), so mark it as __ro_after_init. Reviewed-by: Sean Christopherson Signed-off-by: Valentin Schneider Acked-by: Josh Poimboeuf --- 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 dfe9945b9bece..8f48ce7adfb28 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;