diff options
author | Zhenzhong Duan <zhenzhong.duan@intel.com> | 2023-11-21 16:44:25 +0800 |
---|---|---|
committer | Cédric Le Goater <clg@redhat.com> | 2023-12-19 19:03:38 +0100 |
commit | 6106a329141af7d47bdc3346ce9820d4714e0e5d (patch) | |
tree | 3de9916a47b3940bab139bdc3802ffafbae8073e /include/hw/vfio | |
parent | c12b55ad6f9d3b4792b590e9211bd7319e4a2d70 (diff) |
vfio: Introduce a helper function to initialize VFIODevice
Introduce a helper function to replace the common code to initialize
VFIODevice in pci, platform, ap and ccw VFIO device.
No functional change intended.
Suggested-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'include/hw/vfio')
-rw-r--r-- | include/hw/vfio/vfio-common.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index efcba19f66..b8aa8a5495 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -257,4 +257,6 @@ int vfio_get_dirty_bitmap(const VFIOContainerBase *bcontainer, uint64_t iova, /* Returns 0 on success, or a negative errno. */ int vfio_device_get_name(VFIODevice *vbasedev, Error **errp); void vfio_device_set_fd(VFIODevice *vbasedev, const char *str, Error **errp); +void vfio_device_init(VFIODevice *vbasedev, int type, VFIODeviceOps *ops, + DeviceState *dev, bool ram_discard); #endif /* HW_VFIO_VFIO_COMMON_H */ |