[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231214164541.000027a1@Huawei.com>
Date: Thu, 14 Dec 2023 16:45:41 +0000
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
To: Jean-Philippe Brucker <jean-philippe@...aro.org>
CC: Robin Murphy <robin.murphy@....com>, Will Deacon <will@...nel.org>,
"Ryan Roberts" <ryan.roberts@....com>,
Catalin Marinas <catalin.marinas@....com>,
Ard Biesheuvel <ardb@...nel.org>,
Marc Zyngier <maz@...nel.org>,
"Oliver Upton" <oliver.upton@...ux.dev>,
James Morse <james.morse@....com>,
"Suzuki K Poulose" <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
"Andrey Ryabinin" <ryabinin.a.a@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
Anshuman Khandual <anshuman.khandual@....com>,
Matthew Wilcox <willy@...radead.org>,
Yu Zhao <yuzhao@...gle.com>,
Mark Rutland <mark.rutland@....com>,
David Hildenbrand <david@...hat.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
John Hubbard <jhubbard@...dia.com>, Zi Yan <ziy@...dia.com>,
Barry Song <21cnbao@...il.com>,
Alistair Popple <apopple@...dia.com>,
Yang Shi <shy828301@...il.com>,
<linux-arm-kernel@...ts.infradead.org>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
<shameerali.kolothum.thodi@...wei.com>
Subject: Re: [PATCH v3 12/15] arm64/mm: Split __flush_tlb_range() to elide
trailing DSB
On Thu, 14 Dec 2023 15:22:06 +0000
Jean-Philippe Brucker <jean-philippe@...aro.org> wrote:
> On Thu, Dec 14, 2023 at 12:30:55PM +0000, Robin Murphy wrote:
> > > Robin, Jean-Philippe -- do we need to make sure that the SMMU has completed
> > > its TLB invalidation before issuing an ATC invalidate? My half-baked worry
> > > is whether or not an ATS request could refill the ATC before the TLBI
> > > has completed, therefore rendering the ATC invalidation useless.
> >
> > I would agree, and the spec for CMD_ATC_INV does call out a
> > TLBI->sync->ATCI->sync sequence. At the moment the SVA notifier is issuing
> > its own command-based TLBIs anyway so the necessary sync is implicit there,
> > but if and when we get BTM support wired up properly it would be nice not to
> > have to bodge in an additional sync/DSB.
>
> Yes agreed, with BTM the CPU must call the notifier that issues ATC
> invalidation after completing the TLBI+DSB instructions.
>
> SMMU IHI0070F.a 3.9.1 ATS Interface
>
> Software must ensure that the SMMU TLB invalidation is complete before
> initiating the ATC invalidation.
>
> I'm guessing BTM will be enabled in the SMMU driver sometime soon, given
> that there already is one implementation in the wild that could use it. I
> think we didn't enable it because of the lack of separation between shared
> and private VMIDs, but that may now be solvable with the recent rework of
> the VMID allocator.
>
+CC Shameer. We'll indeed need to fix this when enabling BTM.
Thanks for the heads up.
Jonathan
> Thanks,
> Jean
>
Powered by blists - more mailing lists