Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-27 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 08:12:40PM +0800, Yi Liu wrote: > External email: Use caution opening links or attachments > > > On 2024/9/27 14:02, Nicolin Chen wrote: > > On Fri, Sep 27, 2024 at 01:38:08PM +0800, Yi Liu wrote: > > > > > Does it mean each vIOMMU of VM can only have > > > > > one s2 HWPT

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-27 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 08:59:25AM -0300, Jason Gunthorpe wrote: > On Thu, Sep 26, 2024 at 11:02:37PM -0700, Nicolin Chen wrote: > > On Fri, Sep 27, 2024 at 01:38:08PM +0800, Yi Liu wrote: > > > > > Does it mean each vIOMMU of VM can only have > > > > > one s2 HWPT? > > > > > > > > Giving some exa

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-27 Thread Yi Liu
On 2024/9/27 14:02, Nicolin Chen wrote: On Fri, Sep 27, 2024 at 01:38:08PM +0800, Yi Liu wrote: Does it mean each vIOMMU of VM can only have one s2 HWPT? Giving some examples here: - If a VM has 1 vIOMMU, there will be 1 vIOMMU object in the kernel holding one S2 HWPT. - If a VM has

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-27 Thread Jason Gunthorpe
On Thu, Sep 26, 2024 at 11:02:37PM -0700, Nicolin Chen wrote: > On Fri, Sep 27, 2024 at 01:38:08PM +0800, Yi Liu wrote: > > > > Does it mean each vIOMMU of VM can only have > > > > one s2 HWPT? > > > > > > Giving some examples here: > > > - If a VM has 1 vIOMMU, there will be 1 vIOMMU object in

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 01:38:08PM +0800, Yi Liu wrote: > > > Does it mean each vIOMMU of VM can only have > > > one s2 HWPT? > > > > Giving some examples here: > > - If a VM has 1 vIOMMU, there will be 1 vIOMMU object in the > > kernel holding one S2 HWPT. > > - If a VM has 2 vIOMMUs, the

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Yi Liu
On 2024/9/27 04:10, Nicolin Chen wrote: On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: On 2024/8/28 00:59, Nicolin Chen wrote: Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like a nested parent HWPT to allocate a nested HWPT. Support that in the IOMMU_HWPT_ALLOC

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 02:23:16AM +, Tian, Kevin wrote: > > > > > Does it mean each vIOMMU of VM can only have > > > > > one s2 HWPT? > > > > > > > > Giving some examples here: > > > > - If a VM has 1 vIOMMU, there will be 1 vIOMMU object in the > > > >kernel holding one S2 HWPT. > > > >

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Fri, Sep 27, 2024 at 12:43:16AM +, Tian, Kevin wrote: > > From: Nicolin Chen > > Sent: Friday, September 27, 2024 4:11 AM > > > > On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > > > On 2024/8/28 00:59, Nicolin Chen wrote: > > > > Now a VIOMMU can wrap a shareable nested parent HWP

RE: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Friday, September 27, 2024 9:26 AM > > On Fri, Sep 27, 2024 at 12:43:16AM +, Tian, Kevin wrote: > > > From: Nicolin Chen > > > Sent: Friday, September 27, 2024 4:11 AM > > > > > > On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > > > > On 2024/8/28 00:59,

RE: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Friday, September 27, 2024 4:11 AM > > On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > > On 2024/8/28 00:59, Nicolin Chen wrote: > > > Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act > like > > > a nested parent HWPT to allocate a nested

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Nicolin Chen
On Thu, Sep 26, 2024 at 04:50:46PM +0800, Yi Liu wrote: > On 2024/8/28 00:59, Nicolin Chen wrote: > > Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like > > a nested parent HWPT to allocate a nested HWPT. > > > > Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-26 Thread Yi Liu
On 2024/8/28 00:59, Nicolin Chen wrote: Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like a nested parent HWPT to allocate a nested HWPT. Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update its kdoc. Also, associate a viommu to an allocating nested HWPT. it

Re: [PATCH v2 04/19] iommufd: Allow pt_id to carry viommu_id for IOMMU_HWPT_ALLOC

2024-09-05 Thread Jason Gunthorpe
On Tue, Aug 27, 2024 at 09:59:41AM -0700, Nicolin Chen wrote: > Now a VIOMMU can wrap a shareable nested parent HWPT. So, it can act like > a nested parent HWPT to allocate a nested HWPT. > > Support that in the IOMMU_HWPT_ALLOC ioctl handler, and update its kdoc. > > Also, associate a viommu to