Hi Eric, >-----Original Message----- >From: Eric Auger <eric.au...@redhat.com> >Subject: Re: [PATCH rfcv2 02/20] vfio/iommufd: Add properties and handlers to >TYPE_HOST_IOMMU_DEVICE_IOMMUFD > >Hi Zhenzhong, > > >On 2/19/25 9:22 AM, Zhenzhong Duan wrote: >> New added properties include IOMMUFD handle, devid and hwpt_id. >a property generally has an other meaning in qemu (PROP*). > >I would rather say you enhance HostIOMMUDeviceIOMMUFD object with 3 new >members, specific to the iommufd BE + 2 new class functions.
Will do. > > >> IOMMUFD handle and devid are used to allocate/free ioas and hwpt. >> hwpt_id is used to re-attach IOMMUFD backed device to its default >> VFIO sub-system created hwpt, i.e., when vIOMMU is disabled by >> guest. These properties are initialized in .realize_late() handler. >realize_late does not exist yet >> >> New added handlers include [at|de]tach_hwpt. They are used to >> attach/detach hwpt. VFIO and VDPA have different way to attach >> and detach, so implementation will be in sub-class instead of >> HostIOMMUDeviceIOMMUFD. >this is tricky to follow ... I mean implementing [at|de]tach_hwpt in e.g., HostIOMMUDeviceIOMMUFDVFIO. >> >> Add two wrappers host_iommu_device_iommufd_[at|de]tach_hwpt to >> wrap the two handlers. >> >> This is a prerequisite patch for following ones. >would get rid of that sentence as it does not help much Sure. Thanks Zhenzhong