Re: [PATCH v11 01/13] iommu: Introduce attach/detach_pasid_table API

2020-04-15 Thread Auger Eric
Hi Jacob, On 4/15/20 5:59 PM, Jacob Pan wrote: > On Wed, 15 Apr 2020 16:52:10 +0200 > Auger Eric wrote: > >> Hi Jacob, >> On 4/15/20 12:15 AM, Jacob Pan wrote: >>> Hi Eric, >>> >>> There are some discussions about how to size the uAPI data. >>> https://lkml.org/lkml/2020/4/14/939 >>> >>> I

Re: [PATCH v11 01/13] iommu: Introduce attach/detach_pasid_table API

2020-04-15 Thread Jacob Pan
On Wed, 15 Apr 2020 16:52:10 +0200 Auger Eric wrote: > Hi Jacob, > On 4/15/20 12:15 AM, Jacob Pan wrote: > > Hi Eric, > > > > There are some discussions about how to size the uAPI data. > > https://lkml.org/lkml/2020/4/14/939 > > > > I think the problem with the current scheme is that when

Re: [PATCH v11 01/13] iommu: Introduce attach/detach_pasid_table API

2020-04-15 Thread Auger Eric
Hi Jacob, On 4/15/20 12:15 AM, Jacob Pan wrote: > Hi Eric, > > There are some discussions about how to size the uAPI data. > https://lkml.org/lkml/2020/4/14/939 > > I think the problem with the current scheme is that when uAPI data gets > extended, if VFIO continue to use: > > minsz =

Re: [PATCH v11 01/13] iommu: Introduce attach/detach_pasid_table API

2020-04-14 Thread Jacob Pan
Hi Eric, There are some discussions about how to size the uAPI data. https://lkml.org/lkml/2020/4/14/939 I think the problem with the current scheme is that when uAPI data gets extended, if VFIO continue to use: minsz = offsetofend(struct vfio_iommu_type1_set_pasid_table, config); if

[PATCH v11 01/13] iommu: Introduce attach/detach_pasid_table API

2020-04-14 Thread Eric Auger
From: Jacob Pan In virtualization use case, when a guest is assigned a PCI host device, protected by a virtual IOMMU on the guest, the physical IOMMU must be programmed to be consistent with the guest mappings. If the physical IOMMU supports two translation stages it makes sense to program guest