Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1925604lql; Wed, 13 Mar 2024 12:02:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUs3vkuoqfQ0JcsJA7blSUO7/SxLD0X0AF22aySD8PhHJFOTqksrpxxr6Jpj6vqXM6w4SzWJScv1a5QQr9hiWxksWsvAy75/z81zva+Fg== X-Google-Smtp-Source: AGHT+IF/qLHGHBRd97Cx9/t8qhhvg8iWM3tO0GciQZrZDzs4s6CDuMY0Rbyq6DUGzgwVQOSJbIML X-Received: by 2002:a05:622a:1341:b0:42e:d4cd:d395 with SMTP id w1-20020a05622a134100b0042ed4cdd395mr15292747qtk.2.1710356546255; Wed, 13 Mar 2024 12:02:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710356546; cv=pass; d=google.com; s=arc-20160816; b=K3SEOAYzP7l1AoPW0LbhlKeP6By0Ivoxc7JdNuz9EkBRubBqe5uH/MEbsdJpkSKhv4 lU8VjzmBiEAEqf2ENroxjwEZM9NM3eZ/FAWw/bwde9kV/R076/alpxRD/xn/bd+62Q2h qohtdRQt76T6JJbWXA//2DVQp+8ORkWyHkzQhxKGe+crWePE2l4rj5VV+KWmnAMbQjpG WJSpphRF1Tt3tFMg7cPmU0/npTpkDVOf6EpWPYPzycPi0Q5jL0sVrTr7WZu+hku5Ys9P 3wm0SBuKOVIQ4V9QI2ndGbqC0AKbGJSWhhBjSJZHiiKNXFE0jY8qj/fM3K96xakk5yve 1miA== 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=JXp0Mm4yGTLmvCcCdU6JXDu0ajdt7pw4zFh18lmT1BM=; fh=ORw5ohP+qVwByK2GRNZ9JxYG8/Dz0i087xqUr45eKsE=; b=apBAHEY5gbjfrR/bfcmG3ZtG1XZFP1RhbCftn/ZMR/TwUogzVXU+RSGK+mHKbJpktQ FSXjNbDziHMFT9+/j3kzRs9hvErrTSA0YTQO62I0bFG1PAS/22JlEs5R1RAr2VSBvvE9 +3OxEaZ1MQLb/o+XQ/NQitjNJqkZXPJquNyYww6/q/jAeK3rxn+o8hpRYughE8E5dQ0/ XKXZvs1kKhcwU++vZUi4X2sjt7lFx/dyT4UG0lQ/Y4tdOFzwhCXzmt8hpzSlrFhTgIlu 1m+n8qH2SQV7LOCrlhohKNf+t8E1m1gxpTe3Wsdc5H765TXOR6NPFPN8IXNBDbFVEsFZ 62lw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hKlopcPk; 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-102329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102329-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f13-20020a05622a104d00b0042ef97bd6e2si10382834qte.524.2024.03.13.12.02.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 12:02:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102329-linux.lists.archive=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=hKlopcPk; 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-102329-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102329-linux.lists.archive=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 6FBB01C22E98 for ; Wed, 13 Mar 2024 19:01:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C3E385FEF9; Wed, 13 Mar 2024 18:02:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hKlopcPk" 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 65DF95EE7F for ; Wed, 13 Mar 2024 18:02:24 +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=1710352945; cv=none; b=VMiRRqapWhBXEQI/5AmhAYCPUM3Vkoe7v/zwxEUOJFA0ylkX4jXinaIX39hz8t7J3W14deNl27msZrZAX9ET9qoSsWg/dmO5shRbv+6I86fcsEK+nfLmxQNSitGEU5EF6NMxkyEB7cdVXYzIpJUYCwatLm8t0Q2K5fQlhR55NBc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710352945; c=relaxed/simple; bh=s10C1zZjvwCXFycCx8SBZlUoJ+dZ4c7ymn57tEmK7hc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=joU/AIH0zkB82WXAdp+823CXE/N75yWVSJ+K0wP75lyUrZ1uHf+wWQl9LpCmNTC85xluw5D9LhOsgfv97K6GI5ky1YGpeRw71Ay1lRcxfIxiDngKDATmw5mc7gVXXH5t+ISNAb6w/cjjqvsFQqcHkHOfV9eaanWvCbqCBDi1JX8= 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=hKlopcPk; 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=1710352943; 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=JXp0Mm4yGTLmvCcCdU6JXDu0ajdt7pw4zFh18lmT1BM=; b=hKlopcPkEi/ujZVO0ThafCMppzW31VMwmdSPfBpUKyq+t6Qzmazkg65JI9d82GNzZTJm0x 8pW30LO8DvGyXZwBC+0dbyp/TICOx3JhJ661JxmvvDIRWbtBhH0mgwwx/pst2ksYl2WdcP w/QPr//aEbOA/aI1pVNkc2LNdr6byP4= 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-299-WJUtYtCGOfiw3dIR08-FwQ-1; Wed, 13 Mar 2024 14:02:16 -0400 X-MC-Unique: WJUtYtCGOfiw3dIR08-FwQ-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 E5AFD185A783; Wed, 13 Mar 2024 18:02:14 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.194.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1A985C04224; Wed, 13 Mar 2024 18:02:09 +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 v3 3/4] x86/kvm: Make kvm_async_pf_enabled __ro_after_init Date: Wed, 13 Mar 2024 19:01:05 +0100 Message-ID: <20240313180106.2917308-4-vschneid@redhat.com> In-Reply-To: <20240313180106.2917308-1-vschneid@redhat.com> References: <20240313180106.2917308-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 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 101a7c1bf2008..6c6ff015b99fd 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; -- 2.43.0