[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZLrNlgLZvtubFTiy@arm.com>
Date: Fri, 21 Jul 2023 19:25:26 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Alistair Popple <apopple@...dia.com>
Cc: akpm@...ux-foundation.org, ajd@...ux.ibm.com,
fbarrat@...ux.ibm.com, iommu@...ts.linux.dev, jgg@...pe.ca,
jhubbard@...dia.com, kevin.tian@...el.com, kvm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, linuxppc-dev@...ts.ozlabs.org,
mpe@...erman.id.au, nicolinc@...dia.com, npiggin@...il.com,
robin.murphy@....com, seanjc@...gle.com, will@...nel.org,
x86@...nel.org, zhi.wang.linux@...il.com, sj@...nel.org
Subject: Re: [PATCH v3 3/5] mmu_notifiers: Call invalidate_range() when
invalidating TLBs
On Thu, Jul 20, 2023 at 06:39:25PM +1000, Alistair Popple wrote:
> diff --git a/arch/arm64/include/asm/tlbflush.h b/arch/arm64/include/asm/tlbflush.h
> index 3456866..a99349d 100644
> --- a/arch/arm64/include/asm/tlbflush.h
> +++ b/arch/arm64/include/asm/tlbflush.h
> @@ -13,6 +13,7 @@
> #include <linux/bitfield.h>
> #include <linux/mm_types.h>
> #include <linux/sched.h>
> +#include <linux/mmu_notifier.h>
> #include <asm/cputype.h>
> #include <asm/mmu.h>
>
> @@ -252,6 +253,7 @@ static inline void flush_tlb_mm(struct mm_struct *mm)
> __tlbi(aside1is, asid);
> __tlbi_user(aside1is, asid);
> dsb(ish);
> + mmu_notifier_invalidate_range(mm, 0, -1UL);
> }
>
> static inline void __flush_tlb_page_nosync(struct mm_struct *mm,
> @@ -263,6 +265,8 @@ static inline void __flush_tlb_page_nosync(struct mm_struct *mm,
> addr = __TLBI_VADDR(uaddr, ASID(mm));
> __tlbi(vale1is, addr);
> __tlbi_user(vale1is, addr);
> + mmu_notifier_invalidate_range(mm, uaddr & PAGE_MASK,
> + (uaddr & PAGE_MASK) + PAGE_SIZE);
Nitpick: we have PAGE_ALIGN() for this.
For arm64:
Acked-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists