[PATCH v5 01/25] KVM: arm64: Prefault host stage-2 entries on block split
Fuad Tabba
fuad.tabba at linux.dev
Mon Nov 30 10:52:14 PST 2026
Hi Vincent,
On Mon, 30 Nov 2026 15:56:45 +0000, Vincent Donnefort
<vdonnefort at google.com> wrote:
[...]
> diff --git a/arch/arm64/kvm/hyp/pgtable.c b/arch/arm64/kvm/hyp/pgtable.c
[...]
> +static void stage2_map_prefault_idmap(const struct kvm_pgtable_visit_ctx *ctx, kvm_pte_t *ptep)
> +{
[...]
> + /*
> + * Shared walks not supported: cannot rollback refcounts on break
> + * failure.
> + */
> + if (counted && WARN_ON_ONCE(kvm_pgtable_walk_shared(ctx)))
> + return;
Could this return an error, rather than WARN_ON_ONCE()?
stage2_map_walk_leaf() already frees the new table when the break
fails, and could do the same here.
Cheers,
/fuad
More information about the linux-arm-kernel
mailing list