Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-19 Thread Jean-Philippe Brucker
On 18/06/2019 18:05, Jacob Pan wrote: > On Tue, 18 Jun 2019 15:22:20 +0100 > Jean-Philippe Brucker wrote: > >> On 11/06/2019 19:13, Jacob Pan wrote: >> +/** >> + * ioasid_find - Find IOASID data >> + * @set: the IOASID set >> + * @ioasid: the IOASID to find >> + * @getter: fun

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-18 Thread Jacob Pan
On Tue, 18 Jun 2019 15:22:20 +0100 Jean-Philippe Brucker wrote: > On 11/06/2019 19:13, Jacob Pan wrote: > +/** > + * ioasid_find - Find IOASID data > + * @set: the IOASID set > + * @ioasid: the IOASID to find > + * @getter: function to call on the found object > + *

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-18 Thread Jean-Philippe Brucker
On 11/06/2019 19:13, Jacob Pan wrote: +/** + * ioasid_find - Find IOASID data + * @set: the IOASID set + * @ioasid: the IOASID to find + * @getter: function to call on the found object + * + * The optional getter function allows to take a reference to the fou

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-12 Thread Jean-Philippe Brucker
On 11/06/2019 18:10, Jacob Pan wrote: >> The issue is theoretical at the moment because no users do this, but >> I'd be more comfortable taking the xa_lock, which prevents a >> concurrent xa_erase()+free(). (I commented on your v3 but you might >> have missed it) >> > Did you reply to my v3? I did

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-11 Thread Jacob Pan
On Tue, 11 Jun 2019 15:35:22 +0100 Jean-Philippe Brucker wrote: > On 11/06/2019 10:36, Jonathan Cameron wrote: > >> +/** > >> + * ioasid_alloc - Allocate an IOASID > >> + * @set: the IOASID set > >> + * @min: the minimum ID (inclusive) > >> + * @max: the maximum ID (inclusive) > >> + * @private:

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-11 Thread Jacob Pan
On Tue, 11 Jun 2019 15:37:42 +0100 Jean-Philippe Brucker wrote: > On 11/06/2019 13:26, Jacob Pan wrote: > >> +/** > >> + * ioasid_set_data - Set private data for an allocated ioasid > >> + * @ioasid: the ID to set data > >> + * @data: the private data > >> + * > >> + * For IOASID that is alread

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-11 Thread Jean-Philippe Brucker
On 11/06/2019 13:26, Jacob Pan wrote: >> +/** >> + * ioasid_set_data - Set private data for an allocated ioasid >> + * @ioasid: the ID to set data >> + * @data: the private data >> + * >> + * For IOASID that is already allocated, private data can be set >> + * via this API. Future lookup can be d

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-11 Thread Jean-Philippe Brucker
On 11/06/2019 10:36, Jonathan Cameron wrote: >> +/** >> + * ioasid_alloc - Allocate an IOASID >> + * @set: the IOASID set >> + * @min: the minimum ID (inclusive) >> + * @max: the maximum ID (inclusive) >> + * @private: data private to the caller >> + * >> + * Allocate an ID between @min and @max. T

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-11 Thread Jacob Pan
On Mon, 10 Jun 2019 19:47:07 +0100 Jean-Philippe Brucker wrote: > Some devices might support multiple DMA address spaces, in particular > those that have the PCI PASID feature. PASID (Process Address Space > ID) allows to share process address spaces with devices (SVA), > partition a device into

Re: [PATCH 1/8] iommu: Add I/O ASID allocator

2019-06-11 Thread Jonathan Cameron
On Mon, 10 Jun 2019 19:47:07 +0100 Jean-Philippe Brucker wrote: > Some devices might support multiple DMA address spaces, in particular > those that have the PCI PASID feature. PASID (Process Address Space ID) > allows to share process address spaces with devices (SVA), partition a > device into