Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-26 Thread Jean-Philippe Brucker
On 26/07/18 04:28, Tian, Kevin wrote: >> hierarchical domain might be the right way to go, but let's do more >> thinking on any corner cases. >> > > btw maybe we don't need make it 'hierarchical', as maintaining > hierarchy usually brings more work. What we require is possibly > just the

Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-26 Thread Jean-Philippe Brucker
On 26/07/18 04:03, Tian, Kevin wrote: >> Whenever I come back to hierarchical IOMMU domains I reject it as too >> complicated, but maybe that is what we need. I find it difficult to >> reason about because domains currently represent both a collection of >> devices and a one or more address

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-25 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Thursday, July 26, 2018 11:04 AM [...] > > > > The IOMMU operations we care about don't take a device handle, I think, > > just a domain. And VFIO itself only deals with domains when doing > > map/unmap. Maybe we could add this operation to the IOMMU > subsystem: > > >

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-25 Thread Tian, Kevin
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Thursday, July 26, 2018 3:20 AM > > On 25/07/18 07:19, Tian, Kevin wrote: > >> From: Tian, Kevin > >> Sent: Wednesday, July 25, 2018 10:16 AM > >> > > [...] > >>> > >>> There is another way: as we're planning to add a

Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-25 Thread Jean-Philippe Brucker
On 25/07/18 07:19, Tian, Kevin wrote: >> From: Tian, Kevin >> Sent: Wednesday, July 25, 2018 10:16 AM >> > [...] >>> >>> There is another way: as we're planning to add a generic pasid_alloc() >>> function to the IOMMU API, the mdev module itself could allocate a >>> default PASID for each mdev by

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-25 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Wednesday, July 25, 2018 10:16 AM > [...] > > > > There is another way: as we're planning to add a generic pasid_alloc() > > function to the IOMMU API, the mdev module itself could allocate a > > default PASID for each mdev by calling pasid_alloc() on the mdev's > >

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-24 Thread Liu, Yi L
Hi Jean, > From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Tuesday, July 24, 2018 7:31 PM > > Hi Baolu, > > On 24/07/18 03:22, Lu Baolu wrote: > > Hi, > > > > On 07/23/2018 12:44 PM, Liu, Yi L wrote: > >>> From: Lu Baolu [mailto:baolu...@linux.intel.com] > >>> Sent:

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-24 Thread Tian, Kevin
> From: Jean-Philippe Brucker > Sent: Tuesday, July 24, 2018 7:31 PM > > Hi Baolu, > > On 24/07/18 03:22, Lu Baolu wrote: > > Hi, > > > > On 07/23/2018 12:44 PM, Liu, Yi L wrote: > >>> From: Lu Baolu [mailto:baolu...@linux.intel.com] > >>> Sent: Sunday, July 22, 2018 2:09 PM > >>> > >>> With the

Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-24 Thread Lu Baolu
Hi Jean, Pull Kevin in. Not sure why he was removed from cc list. On 07/24/2018 07:30 PM, Jean-Philippe Brucker wrote: > Hi Baolu, > > On 24/07/18 03:22, Lu Baolu wrote: >> Hi, >> >> On 07/23/2018 12:44 PM, Liu, Yi L wrote: From: Lu Baolu [mailto:baolu...@linux.intel.com] Sent: Sunday,

Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-24 Thread Alex Williamson
On Tue, 24 Jul 2018 12:30:35 +0100 Jean-Philippe Brucker wrote: > Hi Baolu, > > On 24/07/18 03:22, Lu Baolu wrote: > > Hi, > > > > On 07/23/2018 12:44 PM, Liu, Yi L wrote: > >>> From: Lu Baolu [mailto:baolu...@linux.intel.com] > >>> Sent: Sunday, July 22, 2018 2:09 PM > >>> > >>> With the

Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-24 Thread Jean-Philippe Brucker
Hi Baolu, On 24/07/18 03:22, Lu Baolu wrote: > Hi, > > On 07/23/2018 12:44 PM, Liu, Yi L wrote: >>> From: Lu Baolu [mailto:baolu...@linux.intel.com] >>> Sent: Sunday, July 22, 2018 2:09 PM >>> >>> With the Intel IOMMU supporting PASID granularity isolation and protection, >>> a >>> mediated

Re: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-23 Thread Lu Baolu
Hi, On 07/23/2018 12:44 PM, Liu, Yi L wrote: >> From: Lu Baolu [mailto:baolu...@linux.intel.com] >> Sent: Sunday, July 22, 2018 2:09 PM >> >> With the Intel IOMMU supporting PASID granularity isolation and protection, a >> mediated device could be isolated and protected by an IOMMU unit. We need

RE: [RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-22 Thread Liu, Yi L
> From: Lu Baolu [mailto:baolu...@linux.intel.com] > Sent: Sunday, July 22, 2018 2:09 PM > > With the Intel IOMMU supporting PASID granularity isolation and protection, a > mediated device could be isolated and protected by an IOMMU unit. We need to > allocate a new group instead of a PCI group.

[RFC PATCH 03/10] iommu/vt-d: Allocate groups for mediated devices

2018-07-22 Thread Lu Baolu
With the Intel IOMMU supporting PASID granularity isolation and protection, a mediated device could be isolated and protected by an IOMMU unit. We need to allocate a new group instead of a PCI group. Cc: Ashok Raj Cc: Jacob Pan Cc: Kevin Tian Cc: Liu Yi L Signed-off-by: Sanjay Kumar