Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-05-01 Thread Jean-Philippe Brucker
On 30/04/2019 21:24, Jacob Pan wrote: > On Thu, 25 Apr 2019 11:41:05 +0100 > Jean-Philippe Brucker wrote: > >> On 25/04/2019 11:17, Auger Eric wrote: +/** + * ioasid_alloc - Allocate an IOASID + * @set: the IOASID set + * @min: the minimum ID (inclusive) + * @max: the

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-26 Thread Jacob Pan
On Fri, 26 Apr 2019 05:21:15 -0700 Christoph Hellwig wrote: > On Fri, Apr 26, 2019 at 12:47:43PM +0100, Jean-Philippe Brucker wrote: > > >> On Tue, Apr 23, 2019 at 04:31:06PM -0700, Jacob Pan wrote: > > >>> The allocator doesn't really belong in drivers/iommu because > > >>> some drivers would

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-26 Thread Christoph Hellwig
On Fri, Apr 26, 2019 at 12:47:43PM +0100, Jean-Philippe Brucker wrote: > >> On Tue, Apr 23, 2019 at 04:31:06PM -0700, Jacob Pan wrote: > >>> The allocator doesn't really belong in drivers/iommu because some > >>> drivers would like to allocate PASIDs for devices that aren't > >>> managed by an

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-26 Thread Jean-Philippe Brucker
On 25/04/2019 19:19, Jacob Pan wrote: > Hi Christoph, > > On Tue, 23 Apr 2019 23:19:03 -0700 > Christoph Hellwig wrote: > >> On Tue, Apr 23, 2019 at 04:31:06PM -0700, Jacob Pan wrote: >>> The allocator doesn't really belong in drivers/iommu because some >>> drivers would like to allocate PASIDs

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-25 Thread Jacob Pan
Hi Christoph, On Tue, 23 Apr 2019 23:19:03 -0700 Christoph Hellwig wrote: > On Tue, Apr 23, 2019 at 04:31:06PM -0700, Jacob Pan wrote: > > The allocator doesn't really belong in drivers/iommu because some > > drivers would like to allocate PASIDs for devices that aren't > > managed by an IOMMU,

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-25 Thread Jean-Philippe Brucker
On 25/04/2019 11:17, Auger Eric wrote: >> +/** >> + * ioasid_alloc - Allocate an IOASID >> + * @set: the IOASID set >> + * @min: the minimum ID (inclusive) >> + * @max: the maximum ID (exclusive) >> + * @private: data private to the caller >> + * >> + * Allocate an ID between @min and @max (or %0

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-25 Thread Auger Eric
Hi Jean-Philippe, Jacob, On 4/24/19 1:31 AM, Jacob Pan wrote: > From: Jean-Philippe Brucker > > 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

Re: [PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-24 Thread Christoph Hellwig
On Tue, Apr 23, 2019 at 04:31:06PM -0700, Jacob Pan wrote: > The allocator doesn't really belong in drivers/iommu because some > drivers would like to allocate PASIDs for devices that aren't managed by > an IOMMU, using the same ID space as IOMMU. It doesn't really belong in > drivers/pci either

[PATCH v2 06/19] drivers core: Add I/O ASID allocator

2019-04-23 Thread Jacob Pan
From: Jean-Philippe Brucker 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 VM-assignable entities (VFIO mdev) or