On 5/21/25 10:40, John Levon wrote:
On Wed, May 21, 2025 at 09:39:42AM +0200, Cédric Le Goater wrote:
These routines :
Object *vfio_pci_get_object(VFIODevice *vbasedev);
void vfio_pci_intx_eoi(VFIODevice *vbasedev);
int vfio_pci_load_config(VFIODevice *vbasedev, QEMUFile *f);
int vfio_pci_save_config(VFIODevice *vbasedev, QEMUFile *f, Error **errp);
are exported to simply define the VFIODeviceOps vfio_user_pci_ops struct
(and they don't take a VFIOPCIDevice as first argument). I wonder if we
could find a way to keep them private.
+static Object *vfio_user_pci_get_object(VFIODevice *vbasedev)
+{
+ VFIOUserPCIDevice *vdev = container_of(vbasedev, VFIOUserPCIDevice,
+ device.vbasedev);
+
+ return OBJECT(vdev);
+}
seems to work.
export vfio_pci_intx_eoi()
This is definitely required.
yes. it makes sense.
Also, does vfio-user support migration ?
Not yet: we dropped support during the v2 changeover. Happy to drop the
save/load config in the meantime.
Then please drop vfio_pci_get_object too.
Thanks,
C.