Re: [PATCH v4 02/14] iommufd/viommu: Add IOMMU_VDEVICE_ALLOC ioctl

2024-10-21 Thread Nicolin Chen
On Tue, Oct 22, 2024 at 11:40:11AM +0800, Baolu Lu wrote: > On 2024/10/22 8:20, Nicolin Chen wrote: > > Introduce a new ioctl to allocate a vDEVICE object. Since a vDEVICE object > > is a connection of an iommufd_iommufd object and an iommufd_viommu object, > > nit: > > :s/iommufd_iommufd/iommufd

Re: [PATCH v4 02/14] iommufd/viommu: Add IOMMU_VDEVICE_ALLOC ioctl

2024-10-21 Thread Baolu Lu
On 2024/10/22 8:20, Nicolin Chen wrote: Introduce a new ioctl to allocate a vDEVICE object. Since a vDEVICE object is a connection of an iommufd_iommufd object and an iommufd_viommu object, nit: :s/iommufd_iommufd/iommufd_device/g or not? require both as the ioctl inputs and take refcounts

[PATCH v4 02/14] iommufd/viommu: Add IOMMU_VDEVICE_ALLOC ioctl

2024-10-21 Thread Nicolin Chen
Introduce a new ioctl to allocate a vDEVICE object. Since a vDEVICE object is a connection of an iommufd_iommufd object and an iommufd_viommu object, require both as the ioctl inputs and take refcounts in the ioctl handler. Add to the vIOMMU object a "vdevs" xarray, indexed by a per-vIOMMU virtual