[PATCH v4 01/23] KVM: arm64: Prefault host stage-2 entries on block split

Fuad Tabba fuad.tabba at linux.dev
Mon Nov 23 11:24:16 PST 2026


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



More information about the linux-arm-kernel mailing list