On 2022/12/6 15:31, Yang, Lixiao wrote: > On 2022/12/3 21:53, Yi Liu wrote: >> On 2022/12/3 07:12, Alex Williamson wrote: >>> On Fri, 2 Dec 2022 10:44:30 -0400 >>> Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: >>> >>>> On Fri, Dec 02, 2022 at 09:57:45PM +0800, Yi Liu wrote: >>>>> On 2022/12/2 04:39, Jason Gunthorpe wrote: >>>>>> On Thu, Dec 01, 2022 at 06:55:25AM -0800, Yi Liu wrote: >>>>>>> With the introduction of iommufd[1], VFIO is towarding to provide >>>>>>> device centric uAPI after adapting to iommufd. With this trend, >>>>>>> existing VFIO group infrastructure is optional once VFIO converted to device centric. >>>>>>> >>>>>>> This series moves the group specific code out of vfio_main.c, >>>>>>> prepares for compiling group infrastructure out after adding vfio >>>>>>> device cdev[2] >>>>>>> >>>>>>> Complete code in below branch: >>>>>>> >>>>>>> https://github.com/yiliu1765/iommufd/commits/vfio_group_split_v1 >>>>>>> >>>>>>> This is based on Jason's "Connect VFIO to IOMMUFD"[3] and my >>>>>>> "Make mdev driver dma_unmap callback tolerant to unmaps come >>>>>>> before device open"[4] >>>>>>> >>>>>>> [1] >>>>>>> https://lore.kernel.org/all/0-v5-4001c2997bd0+30c-iommufd_jgg@nvi >>>>>>> dia.com/ >>>>>>> >>>>>>> [2] >>>>>>> https://github.com/yiliu1765/iommufd/tree/wip/vfio_device_cdev >>>>>>> [3] >>>>>>> https://lore.kernel.org/kvm/0-v4-42cd2eb0e3eb+335a-vfio_iommufd_j >>>>>>> gg@xxxxxxxxxx/ >>>>>>> >>>>>>> [4] >>>>>>> https://lore.kernel.org/kvm/20221129105831.466954-1-yi.l.liu@inte >>>>>>> l.com/ >>>>>> >>>>>> This looks good to me, and it applies OK to my branch here: >>>>>> >>>>>> https://git.kernel.org/pub/scm/linux/kernel/git/jgg/iommufd.git/ >>>>>> >>>>>> Alex, if you ack this in the next few days I can include it in the >>>>>> iommufd PR, otherwise it can go into the vfio tree in January >>>>>> >>>>>> Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx> >>>>> >>>>> thanks. btw. I've updated my github to incorporate Kevin's nit and >>>>> also r-b from you and Kevin. >>>> >>>> Please rebase it on the above branch also >> >> To Jason: done. Please fetch from below branch. >> >> https://github.com/yiliu1765/iommufd/commits/for-jason/vfio_group_spli >> t > > Tested NIC passthrough on Intel platform with above branch (Commit id: bf445e6747b588a774f5e45f2c9e0cdaa3140d7c). > Result looks good hence, > Tested-by: Lixiao Yang <lixiao.yang@xxxxxxxxx> > > >>> It looks fine to me aside from the previous review comments and my>>> own spelling nit. I also don't see that this adds any additional >>> conflicts vs the existing iommufd integration for any outstanding >>> vfio patches on the list, therefore, where there's not already a sign-off from me: >>> >>> Reviewed-by: Alex Williamson <alex.williamson@xxxxxxxxxx> >> >> To Alex: thanks. above branch is based on Jason's for-next. So may >> have one minor conflict with below commit in your next branch. >> >> vfio: Remove vfio_free_device > > Best regards, > Lixiao Yang GVT-g test passed with hybrid mode, GVT-d test passed with compat mode. Tested-by: Yu He <yu.he@xxxxxxxxx> -- Best regards, He,Yu