Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-17 Thread Nicolin Chen
On Tue, Oct 17, 2023 at 12:50:11PM -0300, Jason Gunthorpe wrote: > On Tue, Oct 17, 2023 at 04:55:12PM +0800, Yi Liu wrote: > > On 2023/10/17 02:44, Nicolin Chen wrote: > > > On Mon, Oct 16, 2023 at 08:59:07AM -0300, Jason Gunthorpe wrote: > > > > On Mon, Oct 16, 2023 at 03:03:04PM +0800, Yi Liu wro

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-17 Thread Jason Gunthorpe
On Tue, Oct 17, 2023 at 04:55:12PM +0800, Yi Liu wrote: > On 2023/10/17 02:44, Nicolin Chen wrote: > > On Mon, Oct 16, 2023 at 08:59:07AM -0300, Jason Gunthorpe wrote: > > > On Mon, Oct 16, 2023 at 03:03:04PM +0800, Yi Liu wrote: > > > > Current nesting series actually extends HWPT_ALLOC ioctl to a

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-17 Thread Yi Liu
On 2023/10/17 02:44, Nicolin Chen wrote: On Mon, Oct 16, 2023 at 08:59:07AM -0300, Jason Gunthorpe wrote: On Mon, Oct 16, 2023 at 03:03:04PM +0800, Yi Liu wrote: Current nesting series actually extends HWPT_ALLOC ioctl to accept user data for allocating domain with vendor specific data. Nested

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-16 Thread Nicolin Chen
On Mon, Oct 16, 2023 at 08:59:07AM -0300, Jason Gunthorpe wrote: > On Mon, Oct 16, 2023 at 03:03:04PM +0800, Yi Liu wrote: > > Current nesting series actually extends HWPT_ALLOC ioctl to accept user > > data for allocating domain with vendor specific data. Nested translation > > happens to be the u

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-16 Thread Jason Gunthorpe
On Mon, Oct 16, 2023 at 03:03:04PM +0800, Yi Liu wrote: > On 2023/10/14 08:51, Nicolin Chen wrote: > > On Fri, Oct 13, 2023 at 09:07:09PM -0300, Jason Gunthorpe wrote: > > > On Fri, Oct 13, 2023 at 01:58:59PM -0700, Nicolin Chen wrote: > > > > On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthor

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-16 Thread Yi Liu
On 2023/10/14 08:51, Nicolin Chen wrote: On Fri, Oct 13, 2023 at 09:07:09PM -0300, Jason Gunthorpe wrote: On Fri, Oct 13, 2023 at 01:58:59PM -0700, Nicolin Chen wrote: On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: IOMM

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Nicolin Chen
On Fri, Oct 13, 2023 at 09:07:09PM -0300, Jason Gunthorpe wrote: > On Fri, Oct 13, 2023 at 01:58:59PM -0700, Nicolin Chen wrote: > > On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: > > > On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > > > > IOMMU_HWPT_ALLOC already suppor

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Jason Gunthorpe
On Fri, Oct 13, 2023 at 01:58:59PM -0700, Nicolin Chen wrote: > On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: > > On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > > > IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. > > > But it can only allocate

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Nicolin Chen
On Fri, Oct 13, 2023 at 12:19:23PM -0300, Jason Gunthorpe wrote: > On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > > IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. > > But it can only allocate a hw_pagetable that associates to a given IOAS, > > i.e. only a kernel

Re: [PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-10-13 Thread Jason Gunthorpe
On Thu, Sep 21, 2023 at 12:51:31AM -0700, Yi Liu wrote: > IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. > But it can only allocate a hw_pagetable that associates to a given IOAS, > i.e. only a kernel-managed hw_pagetable of IOMMU_HWPT_TYPE_DEFAULT type. > > IOMMU drivers

[PATCH v4 10/17] iommufd: Support IOMMU_HWPT_ALLOC allocation with user data

2023-09-21 Thread Yi Liu
IOMMU_HWPT_ALLOC already supports iommu_domain allocation for usersapce. But it can only allocate a hw_pagetable that associates to a given IOAS, i.e. only a kernel-managed hw_pagetable of IOMMU_HWPT_TYPE_DEFAULT type. IOMMU drivers can now support user-managed hw_pagetables, for two-stage transla