Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-11-04 Thread Will Deacon
On Fri, Nov 01, 2024 at 10:40:05AM -0300, Jason Gunthorpe wrote: > On Fri, Oct 18, 2024 at 02:19:26PM -0300, Jason Gunthorpe wrote: > > Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) > > arm_lpae is unique in how it handles partial unmap of large IOPTEs. > > > > All other drive

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-11-01 Thread Jason Gunthorpe
On Fri, Nov 01, 2024 at 11:58:29AM +, Will Deacon wrote: > On Fri, Oct 18, 2024 at 02:19:26PM -0300, Jason Gunthorpe wrote: > > Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) > > arm_lpae is unique in how it handles partial unmap of large IOPTEs. > > > > All other drivers w

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-11-01 Thread Will Deacon
On Fri, Oct 18, 2024 at 02:19:26PM -0300, Jason Gunthorpe wrote: > Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) > arm_lpae is unique in how it handles partial unmap of large IOPTEs. > > All other drivers will unmap the large IOPTE and return it's length. For > example if a 2

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-11-01 Thread Jason Gunthorpe
On Fri, Oct 18, 2024 at 02:19:26PM -0300, Jason Gunthorpe wrote: > Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) > arm_lpae is unique in how it handles partial unmap of large IOPTEs. > > All other drivers will unmap the large IOPTE and return it's length. For > example if a 2

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-11-01 Thread Will Deacon
Hi Jason, On Thu, Oct 24, 2024 at 10:44:11AM -0300, Jason Gunthorpe wrote: > On Thu, Oct 24, 2024 at 02:05:53PM +0100, Will Deacon wrote: > > > My recollection is hazy, but I seem to remember VFIO using the largest > > page sizes in the IOMMU 'pgsize_bitmap' for map() requests but then > > using

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-24 Thread Jason Gunthorpe
On Thu, Oct 24, 2024 at 02:05:53PM +0100, Will Deacon wrote: > My recollection is hazy, but I seem to remember VFIO using the largest > page sizes in the IOMMU 'pgsize_bitmap' for map() requests but then > using the smallest page size for unmap() requests, so you'd end up > cracking block mappings

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-24 Thread Will Deacon
Hi Jason, On Fri, Oct 18, 2024 at 02:19:26PM -0300, Jason Gunthorpe wrote: > Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) > arm_lpae is unique in how it handles partial unmap of large IOPTEs. > > All other drivers will unmap the large IOPTE and return it's length. For > exa

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-21 Thread Jason Gunthorpe
On Mon, Oct 21, 2024 at 02:50:34PM +0100, Robin Murphy wrote: > Beware that whatever the Mali drivers might have the option to do for > themselves, there's still no notion of "atomic update" for SMMU and > io-pgtable-arm in general, other than perhaps for permission changes - even > BBML is quite

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-21 Thread Robin Murphy
On 21/10/2024 1:17 pm, Jason Gunthorpe wrote: On Mon, Oct 21, 2024 at 12:32:21PM +0100, Steven Price wrote: that, we can always do it in two steps (unmap the 2M region and remap the borders). At some point it'd be good to have some kind of atomic page table updates, so we don't have this short

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-21 Thread Jason Gunthorpe
On Mon, Oct 21, 2024 at 12:32:21PM +0100, Steven Price wrote: > > that, we can always do it in two steps (unmap the 2M region and remap > > the borders). At some point it'd be good to have some kind of atomic > > page table updates, so we don't have this short period of time during > > which nothi

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-21 Thread Steven Price
On 21/10/2024 10:17, Boris Brezillon wrote: > On Fri, 18 Oct 2024 14:19:26 -0300 > Jason Gunthorpe wrote: > >> Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) >> arm_lpae is unique in how it handles partial unmap of large IOPTEs. >> >> All other drivers will unmap the large IOP

Re: [PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-21 Thread Boris Brezillon
On Fri, 18 Oct 2024 14:19:26 -0300 Jason Gunthorpe wrote: > Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) > arm_lpae is unique in how it handles partial unmap of large IOPTEs. > > All other drivers will unmap the large IOPTE and return it's length. For > example if a 2M IOP

[PATCH] iommu/io-pgtable-arm: Remove split on unmap behavior

2024-10-18 Thread Jason Gunthorpe
Of the page table implementations (AMD v1/2, VT-D SS, ARM32, DART) arm_lpae is unique in how it handles partial unmap of large IOPTEs. All other drivers will unmap the large IOPTE and return it's length. For example if a 2M IOPTE is present and the first 4K is requested to be unmapped then unmap