From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 82AEC606A31D for ; Wed, 21 Oct 2026 12:22:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Cf6vMKUC; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=OMZTz62u DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=IPJUymxjKiGCs/LHeM584g/BXjOFeySUOeJJNoSlY1w=; b=Cf6vMKUClHzoH91lyoKvdIArxi fAcBLkVZIm7iYDOasa73iI/OcRa8NxoDHymUWwsgY9RyhC294CFip9D+4Kv6ljlpcYHfFQXOS3X/f zzY1dKo/2CIF2z2/d2TgkX7sRdNT9RsuZQwX3ofGx1Jys6AaHMpMkah647vR3fc7qg94oVvhavJxm Oyx/R+B+TTZ6OhqX0S3X6JtmP50hDJbUUL/Jy7tVc7iQHdXAYfnxSP1wQf7t+XwH/1Qgb6EB46280 voyIfItG4tUn349aJCkamT+LwHgdas/8tZZkC8oU+zctBGmjoerZlDvmzRjsWh6Xwr3MyIxVm3/dD igAQVUyA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJVKy-0000000BnNX-1LaM; Wed, 21 Oct 2026 12:22:32 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xJVKx-0000000BnNO-1uTj for linux-arm-kernel@lists.infradead.org; Wed, 21 Oct 2026 12:22:31 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 01380418C4; Wed, 21 Oct 2026 12:22:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7D991F000C6; Wed, 21 Oct 2026 12:22:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1792585350; bh=IPJUymxjKiGCs/LHeM584g/BXjOFeySUOeJJNoSlY1w=; h=Date:From:To:Cc:Subject:In-Reply-To:References; b=OMZTz62ums/EzYgkcLfkDHfXVmr9pFPoJ8Dwj4vD2T06tPR5bPP1njcDF5Oi9ewm1 qxbaufbPYNTTEtEv14nDLB4FuMVs9Jj1GZltLa4Mv40SwMde40CrOreI3ONQOFfJxQ jDrofnvfGatq6D/BP7k2jQFZK6qJa38IfAqSNHOkfRA6Vd0KFS1cyWtx6x9XfqoMc6 mmcMq+jh0DEsDMrI8rJxUszEkKt6kE6S+DqVygbWYtGyDhS/yww4QhRl16jFT2HF+Q 3sHErpEsxRN426ueQc+BcGX1fOigsLKmwkzga05TKzmnbm8IxDtTPesGAFIvBE7Xb4 8GYYi+Qbo2RxQ== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xJVKu-00000005YGD-2Ld2; Wed, 21 Oct 2026 12:22:28 +0000 Date: Wed, 21 Oct 2026 13:22:28 +0100 Message-ID: <86qzhjz1iz.wl-maz@kernel.org> From: Marc Zyngier To: Vincent Donnefort Cc: oupton@kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, kernel-team@android.com, fuad.tabba@linux.dev, stable@vger.kernel.org Subject: Re: [PATCH v1] KVM: arm64: pkvm: Clear GICv3 LRs in the hypervisor In-Reply-To: <20261021110000.508827-1-vdonnefort@google.com> References: <20261021110000.508827-1-vdonnefort@google.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/30.1 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) X-Archived-By: MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: vdonnefort@google.com, oupton@kernel.org, kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org, joey.gouly@arm.com, seiden@linux.ibm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, catalin.marinas@arm.com, will@kernel.org, kernel-team@android.com, fuad.tabba@linux.dev, stable@vger.kernel.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On Wed, 21 Oct 2026 12:00:00 +0100, Vincent Donnefort wrote: > > The LR registers are architecturally UNKNOWN when the CPU boots or > resumes. However, in protected mode, only the used ones are reset. > During boot the HVC __vgic_v3_init_lrs() is never called because > vgic_present is only set in init_subsystems(), after cpu_hyp_init() was > called. Why don't you fix this rather than making the init even more different? > Also, the PM notifier isn't registered for pKVM and the HVC > becomes unavailable after the host is deprivileged. Sanitising the LRs on PSCI_ON is probably the right thing to do, but I don't understand why resetting the LRs is out of reach from the host, given that the host is fully in charge of the interrupt injection, and therefore controls the LRs. Thanks, M. -- Without deviation from the norm, progress is not possible.