>-----Original Message----- >From: Nicolin Chen <nicol...@nvidia.com> >Sent: Thursday, August 17, 2023 1:49 PM >Subject: Re: [RFC PATCH v4 21/24] vfio/as: Add vfio device iterator callback >for >iommufd > >On Wed, Jul 12, 2023 at 03:25:25PM +0800, Zhenzhong Duan wrote: > >> The way to get vfio device pointer is different between legacy >> container and iommufd container, with iommufd backend support >> added, it's time to add the iterator support for iommufd. >> >> In order to implement it, a pointer to hwpt is added in vbasedev. >[...] >> diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio- >common.h >> index 6434a442fd..d596e802b0 100644 >> --- a/include/hw/vfio/vfio-common.h >> +++ b/include/hw/vfio/vfio-common.h >> @@ -133,6 +133,7 @@ typedef struct VFIODevice { >> #ifdef CONFIG_IOMMUFD >> int devid; >> IOMMUFDBackend *iommufd; >> + VFIOIOASHwpt *hwpt; > >I don't feel quite confident about this, since a patch prior just >added the following function: > >+static VFIOIOASHwpt *vfio_find_hwpt_for_dev(VFIOIOMMUFDContainer >*container, >+ VFIODevice *vbasedev) > >This feels a bit of conflict in the same series. Mind elaborating?
Good finding, I'll move " VFIOIOASHwpt *hwpt" to the prior patch, then vfio_find_hwpt_for_dev() could also use it. Thanks Zhenzhong