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=1796299655; b=qcaeeSJ1km2mp+CmEsCWClhsnpaVaPv4V4LIltjvtf4KDflkYsuWLaqzZAWNPM+OjXqK E79ANUqCO235R4RZk8czfp5PrmB/cwQX8c/+kApNv7S1OtoQ1MJFpzlvXGwUFVcRVyU4H 5E7ibXe4NkdJOUN8PP4dQp6iPDVB8Z+Z95hGC8a0ZqAM/IxvkHTHgh6QnGyq3hwNSDSAw 16oyJF81ANb9UkFScJ1MJBp8sb0Rc8CcjZyEoomTQ6DQ4n2V8vFlaSgQBcfZXTLY0PyGz uSSfvLjWmmXsISBjEzmq+0H5Mqf/BmZ+NRBlubMbzHx2gtbFeSs1Q+o8CLFPntwVcUg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796299655; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=5OISnm7E1054RbY7O2vEK/AbXVntecySRwMGAKUI4CQ=; b=prfA7VH5uEbsqWBA/mkyBI87c1dvGM6dZ1SpelhhM/ar5VXkTYfBLFOsd3jpKtGlO5h6 GwIEH11PKI3GeuLXKQlTobSvY1QtW+FtqMyl72y/yFmzaNhBkfUYAYgwZrAOIqQLMtoT1 goxXzqRjicUM8QdRvr7OHfbmpX/N/Xsgm3VLS7S4IgZFGnMBGxrebCg0gmOLF00InxLVV 9h8prJCIBdPg35FrN+nRd/vrk4PRROo8FRud/Y1wHWXgZ2j31NvgS7PHFLthLIUH7ufAE GnLeF9H58dKuxcXlCdNwwZi+TeAO646Po41QiXl1xV7PNo+ohLVX7kL55+J/qh+MK/g== 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=ikQwGZ6V; 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 261B8606A332 for ; Thu, 3 Dec 2026 12:07:34 +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=ikQwGZ6V Received: by smtp.kernel.org (Postfix) with ESMTPSA id 871B51F00899; Thu, 3 Dec 2026 12:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796299654; bh=5OISnm7E1054RbY7O2vEK/AbXVntecySRwMGAKUI4CQ=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=ikQwGZ6VbwUd1016L7fy1gc6SBhmj9IJo4QM57ZoSfiPiL1VLVJtiaXdtktUWLKHr aIjhRkrzqsRxIAhqtWoAAjkN4iWnoZD/ay6oYl1RSxksAvuF5/suhubFoAZ2G0M3R7 IqoPyQC2+RGGJufWLMykdnenDacgb920ruWQ8+eyg+igPnrIUYiGxuYq+xTKZTpqOI 6E5Uyf/gCIhBjkRYb5O/3xNiVl77ZAO0J35jGyDCTYkhfYsnCl2HH70EQHKcVns41p VrtktaENBLR5N2/M9xTaOzTlqkjICoFVH0+wpfTW0F54Q4AaaILyQQ0AURqj2gUMRL XlKwi4S3IDBLg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v6 01/24] KVM: arm64: Introduce kvm_pgtable_stage2_table_install() Reply-To: sashiko-reviews@lists.linux.dev To: "Vincent Donnefort" , kvmarm@lists.linux.dev Cc: "Oliver Upton" , "Marc Zyngier" In-Reply-To: <20261203115209.1690207-2-vdonnefort@google.com> References: <20261203115209.1690207-1-vdonnefort@google.com> <20261203115209.1690207-2-vdonnefort@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 12:07:34 +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 2 potential issues to consider: - [Low] KVM: arm64: inconsistent name/arg order in kvm_pgtable_stage2_table_install() - [Low] KVM: arm64: incomplete kernel-doc for kvm_pgtable_stage2_table_install() -- commit 9882f928ffe9d645ba3fdb1199cbfda370f7397e Author: Vincent Donnefort KVM: arm64: Introduce kvm_pgtable_stage2_table_install() This commit factors out stage2_table_install() and exposes kvm_pgtable_stage2_table_install() so callers such as pKVM can replace a stage-2 leaf entry with an unlinked page table. > diff --git a/arch/arm64/include/asm/kvm_pgtable.h b/arch/arm64/include/as= m/kvm_pgtable.h > index 1c9c57cd6ae40..5d5d2165dbec9 100644 > --- a/arch/arm64/include/asm/kvm_pgtable.h > +++ b/arch/arm64/include/asm/kvm_pgtable.h > @@ -835,6 +835,19 @@ int kvm_pgtable_stage2_flush(struct kvm_pgtable *pgt= , u64 addr, u64 size); > int kvm_pgtable_stage2_split(struct kvm_pgtable *pgt, u64 addr, u64 size, > struct kvm_mmu_memory_cache *mc); > =20 > +/** > + * kvm_pgtable_stage2_table_install() - Replace a stage-2 leaf entry wit= h a table. > + * @pgt: Page-table structure initialised by kvm_pgtable_stage2_init*(). > + * @table: Unlinked stage-2 paging structure to install, such as one > + * created by kvm_pgtable_stage2_create_unlinked(). > + * @addr: Address identifying the leaf entry to replace. > + * @level: Level of the leaf entry to replace. > + * > + * Return: 0 on success, negative error code on failure. > + */ [Severity: Low] Should the kernel-doc spell out the preconditions and ownership rules for kvm_pgtable_stage2_table_install()? Unlike sibling stage-2 helpers that ignore sub-page offsets, this function requires addr to be aligned to kvm_granule_size(level) and returns -EINVAL otherwise. It also performs a non-shared walk (KVM_PGTABLE_WALK_LEAF only), so callers must hold exclusive access to pgt. On success, pgt takes ownership of table (carrying its base reference plus one per counted entry); on failure, the caller must free it (for example via kvm_pgtable_stage2_free_unlinked()). Replacing a valid leaf performs break-before-make TLB invalidation, but no cache maintenance on table. > +int kvm_pgtable_stage2_table_install(struct kvm_pgtable *pgt, kvm_pte_t = *table, > + u64 addr, s8 level); [Severity: Low] Could this declaration match the naming and parameter order of the other stage-2 helpers in this header? Every other IPA-taking kvm_pgtable_stage2_*() helper takes (pgt, addr, ...) first, and multi-word helpers use verb-object names (create_unlinked, destroy_range, relax_perms). Renaming and reordering this to kvm_pgtable_stage2_install_table(pgt, addr, level, table) would match them. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203115209.1690= 207-1-vdonnefort@google.com?part=3D1