From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796314627; b=PNhDJYbFB1BegD+f3rK1yEjoWxyOoEOynWEUl/FVisKq2W12kRTrM2ni7qB52ZMp/4SF 3R3UIQGM1RWet5ynV7iecwDlAR4Iv/pd9ggiEy3Yyfd+Vi3NULfclJ1/FBeI5EtMFy6J5 /QARX8BXxpDmIGvknjD2XorL8krw4VldIlvvR7+Abg/5Mt2PuUphYfrgW25Y39H+DmNP1 2hrFOkQZ8zJaScJExLWs55pipqmK5I6K7Dn6Wye+5evxDgMLA8Urtmmf772Z2iRvmfwGG Q1Jg6xZiu8DBsdzjjfeQ7YrtHsoCIemO94Qk75CjcESkHjlXKes3Tpfc9waC5HHAHiw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796314627; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=s2vAiyd5Mv2DrpynmO0EOhOCFrbVZ/9XrlXs6n4weOc=; b=mj/nJGx4Wc8GH642ia5AgeyMHbJDmO4FNnUAfJFuaSjlysd4SkdubuRCdI9HceblkTNl n3d9xWvH4mcL9SNXd8DDoLoK3YxVnatibz6t7ujS7ZqsC71cMNi9unjmqnJMb7GG7om6+ /t7UUf0HN6GTZkim1mJq+DJKYUxngx1EHcuU088/nz52im/zI2Qt+avLi2MXh42Ys5y7p JSTVrtYYfBxTll7+LjWz6ORAwpSLQ6AcCf7DZPMkGADBCoNYFvhKqtzEyjAhlGDUUB+Aq xPGyJZl9+dJ9tMkXGfZAMbHMlaTtspPOihflu4uQB9Uh2QoUacCCEsN0aJn0Yuf7QRw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GwEx3OMq; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8B8E606A32D for ; Thu, 3 Dec 2026 16:17:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=GwEx3OMq Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D1731F000C1; Thu, 3 Dec 2026 16:17:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796314626; bh=s2vAiyd5Mv2DrpynmO0EOhOCFrbVZ/9XrlXs6n4weOc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=GwEx3OMq6eQ/Pvw6zu6q/osCiEHEnOTsI1xt/PMksj9grlJG0ggCc7fOggY4jZUmp a4NOFT0+po1Ct+ZV8ISR8H5A2J+dU9DVF045oZbBQV8SSsHIRWjn8hz5SAmWn6joEv RjAu/Z+QlO+mhuv6EAfiCWA515pk4nOidbJquLazsOOeWS2CqNMm9iTEoe4UEukcOW vcc3Qz4QXKLJNIF1Z5zaDckn6E6dzbmbn0FJMbV0MCw9UqlFhXvlG20aWorfkjKiDn sCil29FzwsF2/zXeleSpI2fI6ELmOAoMfBLVxL6wdvQ7sb4vj1dOTxBQpXzHJ7Gk74 FWgebqYQYptLg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v6 15/24] KVM: arm64: Add a range to pKVM ownership selftest Reply-To: sashiko-reviews@lists.linux.dev To: "Vincent Donnefort" , kvmarm@lists.linux.dev Cc: "Oliver Upton" , "Marc Zyngier" In-Reply-To: <20261203115209.1690207-16-vdonnefort@google.com> References: <20261203115209.1690207-1-vdonnefort@google.com> <20261203115209.1690207-16-vdonnefort@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 16:17:06 +0000 X-Mailing-List: kvmarm@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Low] KVM: arm64: PMD-sized pkvm_ownership_selftest() stalls EL2 on 64K pages -- commit 2e29e0870ec6148393389f7db103e0a41251adef Author: Vincent Donnefort KVM: arm64: Add a range to pKVM ownership selftest This commit extends __pkvm_ownership_selftest() with a nr_pages argument and runs the boot-time selftest for both order-0 and PMD_ORDER ranges. > diff --git a/arch/arm64/kvm/pkvm.c b/arch/arm64/kvm/pkvm.c > index 4c80e0960154b..7a6d4ba38a2be 100644 > --- a/arch/arm64/kvm/pkvm.c > +++ b/arch/arm64/kvm/pkvm.c > @@ -333,31 +333,45 @@ static int __init pkvm_drop_host_privileges(void) [ ... ] > static void __init pkvm_ownership_selftest(void) > { > unsigned long pgtable_order =3D 5; > unsigned long pgtable =3D 0; > - unsigned long page =3D 0; > - long ret =3D -ENOMEM; > =20 > /* Memory for the VM page-table */ > pgtable =3D __get_free_pages(GFP_KERNEL, pgtable_order); > if (!pgtable) > - goto out; > - > - /* Page whose ownership will be tested */ > - page =3D __get_free_page(GFP_KERNEL); > - if (!page) > - goto out; > + return; > =20 > - ret =3D kvm_call_hyp_nvhe(__pkvm_ownership_selftest, virt_to_pfn((void = *)page), > - virt_to_pfn((void *)pgtable), 1 << pgtable_order); > -out: > - if (ret) > - kvm_err("pKVM ownership selftest failed (%ld)\n", ret); > + __pkvm_ownership_selftest(0, pgtable, pgtable_order); > + __pkvm_ownership_selftest(PMD_ORDER, pgtable, pgtable_order); [Severity: Low] Can running the PMD_ORDER selftest inside a single EL2 hypercall stall the boot CPU on 64K-page kernels? On CONFIG_ARM64_64K_PAGES, PMD_ORDER is 13 (8,192 pages, 512 MiB) and pkvm_ownership_selftest() runs from device_initcall_sync after SMP, RCU stall detection, and lockup detectors are active. All transitions execute with interrupts masked and preemption disabled. Because HAS_FIXBLOCK is disabled for 64K pages, hyp_fixblock_map() falls back to PAGE_SIZE fixmap slots. The two hyp_poison_range() passes in __pkvm_host_force_reclaim_page_guest() and __pkvm_host_reclaim_guest() zero and clean 1 GiB to PoC with 16,384 broadcast vale2is TLBIs. In addition, pkvm_create_mappings_locked() maps PAGE_SIZE at a time, so the three hyp unmap cycles in __pkvm_ownership_selftest() issue another 24,576 broadcast vale2is TLBIs in hyp_unmap_walker(). On emulated platforms or systems without FEAT_S2FWB/FEAT_DIC, this can trigger boot-time softlockup or RCU stall warnings. Follow-up commit "KVM: arm64: Extend pKVM page ownership selftests to cover guest block split" adds two more full-PMD reclaim passes inside the same hypercall. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203115209.1690= 207-1-vdonnefort@google.com?part=3D15