[PATCH v4 01/23] KVM: arm64: Prefault host stage-2 entries on block split
Vincent Donnefort
vdonnefort at google.com
Thu Nov 26 11:58:50 PST 2026
On Mon, Nov 23, 2026 at 07:24:16PM +0000, Fuad Tabba wrote:
> Hi Vincent,
>
> On Tue, 17 Nov 2026 17:43:40 +0000, Vincent Donnefort
> <vdonnefort at google.com> wrote:
> [...]
> > diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
> > index 9c83837b184d..dfbcdd3d91a4 100644
> > --- a/arch/arm64/kvm/hyp/pgtable.c
> > +++ b/arch/arm64/kvm/hyp/pgtable.c
> [...]
> > @@ -1053,6 +1095,9 @@ static int stage2_map_walk_leaf(const struct kvm_pgtable_visit_ctx *ctx,
> > if (!childp)
> > return -ENOMEM;
> >
> > + if (pgt->flags & KVM_PGTABLE_S2_IDMAP)
> > + stage2_map_prefault_idmap(ctx, childp);
> > +
> > if (!stage2_try_break_pte(ctx, data->mmu)) {
> > mm_ops->put_page(childp);
> > return -EAGAIN;
>
> Should kvm_pgtable_stage2_annotate() end with a dsb(ishst), like
> kvm_pgtable_stage2_map()? With this patch, it installs valid leaves in
> the host stage-2 too.
>
> Cheers,
> /fuad
>
> To unsubscribe from this group and stop receiving emails from it, send an email to kernel-team+unsubscribe at android.com.
>
Ha, excellent catch! I believe it works nonetheless because
__pkvm_host_donate_guest() calls kvm_pgtable_stage2_map() after.
--
Vincent
More information about the linux-arm-kernel
mailing list