diff options
author | Paolo Bonzini | 2015-02-10 18:25:44 +0100 |
---|---|---|
committer | Alex Williamson | 2015-02-10 18:25:44 +0100 |
commit | 217e9fdcadb1dc7462f4d92866314f626426fa82 (patch) | |
tree | 20fa3fe01342fca506d75578f8383298577264a9 /include/hw/vfio/vfio-common.h | |
parent | memory: unregister AddressSpace MemoryListener within BQL (diff) | |
download | qemu-217e9fdcadb1dc7462f4d92866314f626426fa82.tar.gz qemu-217e9fdcadb1dc7462f4d92866314f626426fa82.tar.xz qemu-217e9fdcadb1dc7462f4d92866314f626426fa82.zip |
vfio: cleanup vfio_get_device error path, remove vfio_populate_device callback
Now that vfio_put_base_device is called unconditionally at instance_finalize
time, it can be called twice if vfio_populate_device fails. This works
but it is slightly harder to follow.
Change vfio_get_device to not touch the vbasedev struct until it will
definitely succeed, moving the vfio_populate_device call back to vfio-pci.
This way, vfio_put_base_device will only be called once.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'include/hw/vfio/vfio-common.h')
-rw-r--r-- | include/hw/vfio/vfio-common.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index 1d5bfe8fcb..5f3679b7b2 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -112,7 +112,6 @@ struct VFIODeviceOps { void (*vfio_compute_needs_reset)(VFIODevice *vdev); int (*vfio_hot_reset_multi)(VFIODevice *vdev); void (*vfio_eoi)(VFIODevice *vdev); - int (*vfio_populate_device)(VFIODevice *vdev); }; typedef struct VFIOGroup { |