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

Marc Zyngier maz at kernel.org
Tue Nov 24 12:42:19 PST 2026


On Tue, 24 Nov 2026 20:22:15 +0000,
Colton Lewis <coltonlewis at google.com> wrote:
> 
> On Tue, 24 Nov 2026 13:10:04 +0000, Marc Zyngier <maz at kernel.org> 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@kernel.org/
> 
> [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.

Why do you think this makes *any* difference? The hint passed by the
guest is utter bollocks, and the best thing would be to not invalidate
anything. It's just too invasive to do elegantly.

> 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?

No, I don't want it at all, unless you can prove that this there is
something architecturally incorrect in what I'm proposing.

	M.

-- 
Jazz isn't dead. It just smells funny.



More information about the linux-arm-kernel mailing list