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

From: Marc Zyngier

Date: Wed Nov 25 2026 - 11:09:34 EST


On Wed, 25 Nov 2026 09:56:18 +0000,
Wei-Lin Chang <weilin.chang@xxxxxxx> wrote:
>
> On Tue, Nov 24, 2026 at 10:16:16PM +0000, Colton Lewis wrote:
> > On Tue, 24 Nov 2026 20:42:19 +0000, Marc Zyngier <maz@xxxxxxxxxx> wrote:
> > > On Tue, 24 Nov 2026 20:22:15 +0000,
> > > Colton Lewis <coltonlewis@xxxxxxxxxx> wrote:
> > > > [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.
> >
> > Architecturally [1] is fine for the TLB, and before guest_s2_mappings
> > landed in v7.4-rc1 clearing the block was harmless. The problem with [1]
> > is a host memory leak in kvm_pgtable_stage2_unmap_tracked():

Then fix the tracking.

M.

--
Without deviation from the norm, progress is not possible.