Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-22 Thread Jean-Philippe Brucker
On 22/11/2018 08:44, Joerg Roedel wrote: > Hi Jean-Philippe, > > On Wed, Nov 21, 2018 at 11:16:07AM +, Jean-Philippe Brucker wrote: >> On 12/11/2018 14:40, Joerg Roedel wrote: >>> What is the intended use-case for this function? >> >> I'm using it in sva_bind(), to see if there already exists

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-22 Thread Joerg Roedel
Hi Jean-Philippe, On Wed, Nov 21, 2018 at 11:16:07AM +, Jean-Philippe Brucker wrote: > On 12/11/2018 14:40, Joerg Roedel wrote: > > What is the intended use-case for this function? > > I'm using it in sva_bind(), to see if there already exists an io_mm > associated to the mm_struct given as

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-22 Thread Joerg Roedel
On Wed, Nov 21, 2018 at 07:10:20PM +, Koenig, Christian wrote: > All of that is completely unrelated to IOMMU, but when IOMMU is enabled > you need to use the same allocator because all use cases use the same ID > space. Okay, I see. Is there ever a case where we can have multiple PASIDs

RE: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-21 Thread Tian, Kevin
> From: Koenig, Christian > Sent: Thursday, November 22, 2018 3:10 AM > > Am 21.11.18 um 12:16 schrieb Jean-Philippe Brucker: > > On 12/11/2018 14:40, Joerg Roedel wrote: > >> Hi Jean-Philippe, > >> > >> On Fri, Oct 19, 2018 at 07:11:54PM +0100, Jean-Philippe Brucker wrote: > >>> The allocator

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-21 Thread Koenig, Christian
Am 21.11.18 um 12:16 schrieb Jean-Philippe Brucker: > On 12/11/2018 14:40, Joerg Roedel wrote: >> Hi Jean-Philippe, >> >> On Fri, Oct 19, 2018 at 07:11:54PM +0100, Jean-Philippe Brucker wrote: >>> The allocator doesn't really belong in drivers/iommu because some >>> drivers would like to allocate

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-21 Thread Jean-Philippe Brucker
On 12/11/2018 14:40, Joerg Roedel wrote: > Hi Jean-Philippe, > > On Fri, Oct 19, 2018 at 07:11:54PM +0100, Jean-Philippe Brucker 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: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-12 Thread Joerg Roedel
Hi Jean-Philippe, On Fri, Oct 19, 2018 at 07:11:54PM +0100, Jean-Philippe Brucker 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

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-08 Thread Jean-Philippe Brucker
On 07/11/2018 04:53, Lu Baolu wrote: > Hi, > > On 10/20/18 2:11 AM, Jean-Philippe Brucker wrote: >> +static inline void *ioasid_find(struct ioasid_set *set, ioasid_t ioasid) >> +{ >> +return -ESRCH; > > return NULL; I'll fix it, thanks Jean ___

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-11-06 Thread Lu Baolu
Hi, On 10/20/18 2:11 AM, Jean-Philippe Brucker wrote: +static inline void *ioasid_find(struct ioasid_set *set, ioasid_t ioasid) +{ + return -ESRCH; return NULL; Best regards, Lu Baolu +} +#endif /* CONFIG_IOASID */ +#endif /* __LINUX_IOASID_H */

RE: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-10-23 Thread Tian, Kevin
> From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Tuesday, October 23, 2018 2:57 PM > > Hi, > > On 10/22/18 6:22 PM, Raj, Ashok wrote: > > On Mon, Oct 22, 2018 at 12:49:47PM +0800, Lu Baolu wrote: > >> Hi, > >> > >> On 10/20/18 2:11 AM, Jean-Philippe Brucker wrote: > >>> Some devices

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-10-23 Thread Lu Baolu
Hi, On 10/22/18 6:22 PM, Raj, Ashok wrote: On Mon, Oct 22, 2018 at 12:49:47PM +0800, Lu Baolu wrote: Hi, On 10/20/18 2:11 AM, 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

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-10-22 Thread Raj, Ashok
On Mon, Oct 22, 2018 at 12:49:47PM +0800, Lu Baolu wrote: > Hi, > > On 10/20/18 2:11 AM, 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

Re: [RFC PATCH 2/6] drivers core: Add I/O ASID allocator

2018-10-21 Thread Lu Baolu
Hi, On 10/20/18 2:11 AM, 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 VM-assignable