Re: [PATCH v4 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

2024-10-25 Thread Nicolin Chen
On Fri, Oct 25, 2024 at 08:59:11AM +, Tian, Kevin wrote: > > From: Nicolin Chen > > Sent: Tuesday, October 22, 2024 8:19 AM > > > > Add a new ioctl for user space to do a vIOMMU allocation. It must be based > > on a nesting parent HWPT, so take its refcount. > > > > If an IOMMU driver supports

Re: [PATCH v4 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

2024-10-25 Thread Nicolin Chen
On Fri, Oct 25, 2024 at 09:05:58AM +, Tian, Kevin wrote: > > From: Nicolin Chen > > Sent: Tuesday, October 22, 2024 8:19 AM > > + > > + viommu->type = cmd->type; > > + viommu->ictx = ucmd->ictx; > > + viommu->hwpt = hwpt_paging; > > + /* Assume physical IOMMUs are unpluggable (

RE: [PATCH v4 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

2024-10-25 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Tuesday, October 22, 2024 8:19 AM > + > + viommu->type = cmd->type; > + viommu->ictx = ucmd->ictx; > + viommu->hwpt = hwpt_paging; > + /* Assume physical IOMMUs are unpluggable (the most likely case) > */ > + viommu->iommu_dev = __iommu_get_iommu_de

RE: [PATCH v4 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

2024-10-25 Thread Tian, Kevin
> From: Nicolin Chen > Sent: Tuesday, October 22, 2024 8:19 AM > > Add a new ioctl for user space to do a vIOMMU allocation. It must be based > on a nesting parent HWPT, so take its refcount. > > If an IOMMU driver supports a driver-managed vIOMMU object, it must > define why highlight 'driver-

[PATCH v4 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

2024-10-21 Thread Nicolin Chen
Add a new ioctl for user space to do a vIOMMU allocation. It must be based on a nesting parent HWPT, so take its refcount. If an IOMMU driver supports a driver-managed vIOMMU object, it must define its own IOMMU_VIOMMU_TYPE_ in the uAPI header and implement a viommu_alloc op in its iommu_ops. Rev