Re: [RFC PATCH 2/2] arm64, tlbflush: don't TLBI broadcast if page reused in write fault

From: Huang, Ying

Date: Fri Sep 19 2025 - 05:03:37 EST


Catalin Marinas <catalin.marinas@xxxxxxx> writes:

> On Thu, Sep 18, 2025 at 10:18:49AM +0800, Huang, Ying wrote:
>> Ryan Roberts <ryan.roberts@xxxxxxx> writes:
>> > contpte_ptep_set_access_flags() currently does a (broadcast) __flush_tlb_range()
>> > on the (pte_write(orig_pte) == pte_write(entry)) path. I think that should be
>> > changed to a local range invalidation to be consistent with this change.
>>
>> Yes. This should be changed too. However, it means we need a local
>> variant of __flush_tlb_range() and flush_tlb_mm(). Is it OK to
>> introduce them first and tidy up later?
>
> If it's just for contpte, we'd never take the flush_tlb_mm() path. So we
> could instead add a specific local_flush_tlb_contpte_range().

Sure.

---
Best Regards,
Huang, Ying