Re: [PATCH v8 07/12] iommu/arm-smmu-v3: Share process page tables

2020-07-16 Thread Jean-Philippe Brucker
On Mon, Jul 13, 2020 at 09:22:37PM +0100, Will Deacon wrote: > > +static struct arm_smmu_ctx_desc *arm_smmu_share_asid(u16 asid) > > +{ > > + struct arm_smmu_ctx_desc *cd; > > > > - xa_erase(_xa, cd->asid); > > + cd = xa_load(_xa, asid); > > + if (!cd) > > + return NULL; > > +

Re: [PATCH v8 07/12] iommu/arm-smmu-v3: Share process page tables

2020-07-13 Thread Will Deacon
On Thu, Jun 18, 2020 at 05:51:20PM +0200, Jean-Philippe Brucker wrote: > With Shared Virtual Addressing (SVA), we need to mirror CPU TTBR, TCR, > MAIR and ASIDs in SMMU contexts. Each SMMU has a single ASID space split > into two sets, shared and private. Shared ASIDs correspond to those >

[PATCH v8 07/12] iommu/arm-smmu-v3: Share process page tables

2020-06-18 Thread Jean-Philippe Brucker
With Shared Virtual Addressing (SVA), we need to mirror CPU TTBR, TCR, MAIR and ASIDs in SMMU contexts. Each SMMU has a single ASID space split into two sets, shared and private. Shared ASIDs correspond to those obtained from the arch ASID allocator, and private ASIDs are used for "classic"