Re: [PATCH v2 1/2] KVM: arm64: nv: Discard undersized TTL hints in compute_tlb_inval_range()

From: Colton Lewis

Date: Tue Nov 24 2026 - 15:22:24 EST


On Tue, 24 Nov 2026 13:10:04 +0000, Marc Zyngier <maz@xxxxxxxxxx> wrote:
> What's the advantage doing all this dance over the patch proposed at
> [1]?
>
> M.
>
> [1] https://lore.kernel.org/all/20261123182312.4842-1-maz@xxxxxxxxxx/

[1] only catches TTL hints smaller than host PAGE_SIZE. It does not
catch a hint that is >= PAGE_SIZE but smaller than the mapped block,
such as a 4kB L3 hint on a 2MB block on a 4kB host.

I can rebase on top of [1] so it goes to stable on its own. Following
the same pattern, compute_tlb_inval_range() can check
mmu->guest_s2_mappings at addr for an entry larger than max_size and
clear it to 0 to use the maximum-extent fallback, dropping the extra
page-table walk and KVM_NV_GUEST_MAP_SZ check. Would that work for v3?