Re: [PATCH 00/10] Connect VFIO to IOMMUFD

2022-10-31 Thread Yi Liu
On 2022/10/31 20:18, Jason Gunthorpe wrote: On Mon, Oct 31, 2022 at 06:38:45PM +0800, Yi Liu wrote: Hi Jason, On 2022/10/26 02:17, Jason Gunthorpe wrote: This series provides an alternative container layer for VFIO implemented using iommufd. This is optional, if CONFIG_IOMMUFD is not set

Re: [PATCH 00/10] Connect VFIO to IOMMUFD

2022-10-31 Thread Yi Liu
mode 100644 drivers/vfio/iommufd.c base-commit: 3bec937e94942a6aee8854be1c1f5cc2b92d15e2 -- Regards, Yi Liu

Re: [PATCH v2 15/15] vfio: Add struct device to vfio_device

2022-09-08 Thread Yi Liu
On 2022/9/8 17:06, Eric Auger wrote: Hi Kevin, On 9/1/22 16:37, Kevin Tian wrote: From: Yi Liu and replace kref. With it a 'vfio-dev/vfioX' node is created under the sysfs path of the parent, indicating the device is bound to a vfio driver, e.g.: /sys/devices/pci\:6f/\:6f\:01.0/vfio

Re: [PATCH 06/10] vfio-iommufd: Allow iommufd to be used in place of a container fd

2022-11-02 Thread Yi Liu
roup->container) vfio_group_detach_container(group); + if (group->iommufd) { + iommufd_ctx_put(group->iommufd); + group->iommufd = NULL; + } group->opened_file = NULL; mutex_unlock(>group_lock); return 0; @@ -1879,6 +1923,8 @@ static void __exit vfio_cleanup(void) module_init(vfio_init); module_exit(vfio_cleanup); +MODULE_IMPORT_NS(IOMMUFD); +MODULE_IMPORT_NS(IOMMUFD_VFIO); MODULE_VERSION(DRIVER_VERSION); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR(DRIVER_AUTHOR); -- Regards, Yi Liu

Re: [PATCH v2 00/11] Connect VFIO to IOMMUFD

2022-11-08 Thread Yi Liu
look fine. Once we fix those issues, GVT and other modules can run some more stressful tests, I think. our side is also starting test (gvt, nic passthrough) this version. need to wait a while for the result. -- Regards, Yi Liu

Re: [PATCH v2 11/11] iommufd: Allow iommufd to supply /dev/vfio/vfio

2022-11-10 Thread Yi Liu
he module info even if the IOMMUFD_VFIO_CONTAINER is not configured? +#endif MODULE_DESCRIPTION("I/O Address Space Management for passthrough devices"); MODULE_LICENSE("GPL"); -- Regards, Yi Liu

Re: [PATCH v2 07/11] vfio-iommufd: Support iommufd for physical VFIO devices

2022-11-10 Thread Yi Liu
+ vdev->iommufd_attached = true; it's better to set this bool in vfio_iommufd_physical_attach_ioas() as the emulated devices uses iommufd_access instead. is it? or you mean this flag to cover both cases? -- Regards, Yi Liu

Re: [PATCH v2 09/11] vfio: Move container related MODULE_ALIAS statements into container.c

2022-11-10 Thread Yi Liu
) Reported-by: "Liu, Yi L" s/Liu Yi L/Yi Liu :) Reviewed-by: Yi Liu Signed-off-by: Jason Gunthorpe --- drivers/vfio/container.c | 3 +++ drivers/vfio/vfio_main.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/vfio/container.c b/drivers/vf

Re: [PATCH v2 11/11] iommufd: Allow iommufd to supply /dev/vfio/vfio

2022-11-10 Thread Yi Liu
On 2022/11/11 12:16, Yi Liu wrote: On 2022/11/8 08:52, Jason Gunthorpe wrote: If the VFIO container is compiled out, give a kconfig option for iommufd to provide the miscdev node with the same name and permissions as vfio uses. The compatibility node supports the same ioctls as VFIO

Re: [PATCH v2 07/11] vfio-iommufd: Support iommufd for physical VFIO devices

2022-11-07 Thread Yi Liu
ice->group->container) vfio_group_unuse_container(device->group); + vfio_iommufd_unbind(device); Ditto -- Regards, Yi Liu

Re: [PATCH v2 00/11] Connect VFIO to IOMMUFD

2022-11-14 Thread Yi Liu
On 2022/11/14 22:38, Jason Gunthorpe wrote: On Mon, Nov 14, 2022 at 08:51:58PM +0800, Yi Liu wrote: Our side, Yu He, Lixiao Yang has done below tests on Intel platform with the above kernel, results are: 1) GVT-g test suit passed, Intel iGFx passthrough passed. 2) NIC passthrough test

Re: [PATCH v2 00/11] Connect VFIO to IOMMUFD

2022-11-14 Thread Yi Liu
On 2022/11/10 00:57, Jason Gunthorpe wrote: On Tue, Nov 08, 2022 at 11:18:03PM +0800, Yi Liu wrote: On 2022/11/8 17:19, Nicolin Chen wrote: On Mon, Nov 07, 2022 at 08:52:44PM -0400, Jason Gunthorpe wrote: This is on github: https://github.com/jgunthorpe/linux/commits/vfio_iommufd [...] v2

Re: [PATCH 01/10] vfio: Move vfio_device driver open/close code to a function

2022-11-01 Thread Yi Liu
++-- 1 file changed, 53 insertions(+), 42 deletions(-) Reviewed-by: Yi Liu diff --git a/drivers/vfio/vfio_main.c b/drivers/vfio/vfio_main.c index 2d168793d4e1ce..d043383fc3ba2b 100644 --- a/drivers/vfio/vfio_main.c +++ b/drivers/vfio/vfio_main.c @@ -734,6

Re: [PATCH 02/10] vfio: Move vfio_device_assign_container() into vfio_device_first_open()

2022-11-01 Thread Yi Liu
o_device_open(struct vfio_device *device) err_unassign_container: should the err_unassign_container be renamed to be err_dec_count? other parts look good to me. Reviewed-by: Yi Liu device->open_count--; mutex_unlock(>dev_set->lock); - vfio_device_unassign_c

Re: [PATCH 03/10] vfio: Rename vfio_device_assign/unassign_container()

2022-11-01 Thread Yi Liu
/vfio.h | 4 ++-- drivers/vfio/vfio_main.c | 6 +++--- 3 files changed, 11 insertions(+), 13 deletions(-) Reviewed-by: Yi Liu diff --git a/drivers/vfio/container.c b/drivers/vfio/container.c index dd79a66ec62cad..499777930b08fa 100644 --- a/drivers/vfio/container.c +++ b/drivers/vfio

Re: [PATCH 00/10] Connect VFIO to IOMMUFD

2022-11-01 Thread Yi Liu
On 2022/11/1 19:41, Jason Gunthorpe wrote: On Tue, Nov 01, 2022 at 11:04:38AM +0800, Yi Liu wrote: On 2022/11/1 07:24, Jason Gunthorpe wrote: On Mon, Oct 31, 2022 at 08:25:39PM +0800, Yi Liu wrote: There is something wrong with the test suite that it isn't covering the above, I'm going

Re: [PATCH 00/10] Connect VFIO to IOMMUFD

2022-11-01 Thread Yi Liu
On 2022/11/1 12:21, Nicolin Chen wrote: On Tue, Nov 01, 2022 at 11:04:38AM +0800, Yi Liu wrote: On 2022/11/1 07:24, Jason Gunthorpe wrote: On Mon, Oct 31, 2022 at 08:25:39PM +0800, Yi Liu wrote: There is something wrong with the test suite that it isn't covering the above, I'm going to look

Re: [PATCH 00/20] iommu: Refactoring domain allocation interface

2024-05-29 Thread Yi Liu
+- drivers/vfio/vfio_iommu_type1.c | 7 +- drivers/vhost/vdpa.c | 11 +- 16 files changed, 253 insertions(+), 258 deletions(-) -- Regards, Yi Liu

Re: [PATCH 05/20] iommu: Add iommu_paging_domain_alloc() interface

2024-05-29 Thread Yi Liu
alloc); + void iommu_domain_free(struct iommu_domain *domain) { if (domain->type == IOMMU_DOMAIN_SVA) -- Regards, Yi Liu

Re: [PATCH v2 01/22] iommu: Add iommu_user_domain_alloc() interface

2024-06-04 Thread Yi Liu
return __iommu_domain_alloc(ops, dev, IOMMU_DOMAIN_UNMANAGED); +} +EXPORT_SYMBOL_GPL(iommu_user_domain_alloc); + void iommu_domain_free(struct iommu_domain *domain) { if (domain->type == IOMMU_DOMAIN_SVA) -- Regards, Yi Liu

Re: [PATCH 00/20] iommu: Refactoring domain allocation interface

2024-05-30 Thread Yi Liu
On 2024/5/29 20:02, Baolu Lu wrote: On 2024/5/29 17:03, Yi Liu wrote: On 2024/5/29 13:32, Lu Baolu wrote: The IOMMU subsystem has undergone some changes, including the removal of iommu_ops from the bus structure. Consequently, the existing domain allocation interface, which relies on a bus

Re: [PATCH 00/20] iommu: Refactoring domain allocation interface

2024-05-31 Thread Yi Liu
On 2024/5/31 14:00, Baolu Lu wrote: On 5/31/24 11:16 AM, Yi Liu wrote: On 2024/5/29 20:02, Baolu Lu wrote: On 2024/5/29 17:03, Yi Liu wrote: On 2024/5/29 13:32, Lu Baolu wrote: The IOMMU subsystem has undergone some changes, including the removal of iommu_ops from the bus structure

Re: [PATCH v2 01/22] iommu: Add iommu_user_domain_alloc() interface

2024-06-05 Thread Yi Liu
On 2024/6/5 10:00, Baolu Lu wrote: On 6/4/24 4:03 PM, Yi Liu wrote: On 2024/6/4 09:51, Lu Baolu wrote: Commit <909f4abd1097> ("iommu: Add new iommu op to create domains owned by userspace") added a dedicated iommu op to allocate a user domain. While IOMMUFD has