[PATCH 1/3] KVM: arm64: Don't defer TLB invalidation when zapping table entries

Oliver Upton oliver.upton at linux.dev
Tue Mar 26 09:14:33 PDT 2024


On Tue, Mar 26, 2024 at 04:10:01PM +0000, Will Deacon wrote:
> > @@ -1163,7 +1168,7 @@ static int stage2_unmap_walker(const struct kvm_pgtable_visit_ctx *ctx,
> >  					       kvm_granule_size(ctx->level));
> >  
> >  	if (childp)
> > -		mm_ops->put_page(childp);
> > +		mm_ops->free_unlinked_table(childp, ctx->level);
> 
> Hmm, but doesn't the deferred TLBI still happen after the RCU critical
> section?

Right... We'd need to change that too :) Although I suppose table
invalidations are relatively infrequent when compared to leaf
invalidations.

> I also think I found another bug, so I'll send a v2 with an extra patch...

And I'm sure there's plenty more to be found too, heh.

-- 
Thanks,
Oliver



More information about the linux-arm-kernel mailing list