On Tue, Nov 08, 2022 at 03:13:38PM -0800, John Johnson wrote: > + /* > + * The proxy uses a SW IOMMU in lieu of the HW one > + * used in the ioctl() version. Mascarade as TYPE1 > + * for maximum capatibility > + */
capability > @@ -3692,12 +3698,18 @@ static void vfio_user_instance_finalize(Object *obj) > { > VFIOPCIDevice *vdev = VFIO_PCI_BASE(obj); > VFIODevice *vbasedev = &vdev->vbasedev; > + VFIOGroup *group = vbasedev->group; > + > + vfio_bars_finalize(vdev); > + g_free(vdev->emulated_config_bits); > + g_free(vdev->rom); These changes seem unrelated to this particular patch? > diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h > index 793ca94..312ef9c 100644 > --- a/include/hw/vfio/vfio-common.h > +++ b/include/hw/vfio/vfio-common.h > @@ -94,6 +94,7 @@ typedef struct VFIOContainer { > uint64_t max_dirty_bitmap_size; > unsigned long pgsizes; > unsigned int dma_max_mappings; > + VFIOProxy *proxy; > QLIST_HEAD(, VFIOGuestIOMMU) giommu_list; > QLIST_HEAD(, VFIOHostDMAWindow) hostwin_list; > QLIST_HEAD(, VFIOGroup) group_list; > @@ -282,6 +283,11 @@ void vfio_put_group(VFIOGroup *group); > int vfio_get_device(VFIOGroup *group, const char *name, > VFIODevice *vbasedev, Error **errp); > > +int vfio_user_get_device(VFIOGroup *group, VFIODevice *vbasedev, Error > **errp); > +VFIOGroup *vfio_user_get_group(VFIOProxy *proxy, AddressSpace *as, > + Error **errp); > +void vfio_user_put_group(VFIOGroup *group); > + Why aren't these in user.h? regards john