diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2018-06-05 08:23:17 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2018-06-05 08:23:17 -0600 |
commit | 469d02de993817dcf4430d08fdff92aef8352d8f (patch) | |
tree | b68ab27a473aa68f93c0ce20e7ec2b8da10954d8 /hw/vfio/pci.h | |
parent | bcf3c3d029e73d54455e1d7a51177c37d668378c (diff) |
vfio/quirks: Add quirk reset callback
Quirks can be self modifying, provide a hook to allow them to cleanup
on device reset if desired.
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'hw/vfio/pci.h')
-rw-r--r-- | hw/vfio/pci.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h index 59ab7757a3..594a5bd005 100644 --- a/hw/vfio/pci.h +++ b/hw/vfio/pci.h @@ -29,6 +29,7 @@ typedef struct VFIOQuirk { void *data; int nr_mem; MemoryRegion *mem; + void (*reset)(struct VFIOPCIDevice *vdev, struct VFIOQuirk *quirk); } VFIOQuirk; typedef struct VFIOBAR { @@ -167,6 +168,7 @@ void vfio_bar_quirk_exit(VFIOPCIDevice *vdev, int nr); void vfio_bar_quirk_finalize(VFIOPCIDevice *vdev, int nr); void vfio_setup_resetfn_quirk(VFIOPCIDevice *vdev); int vfio_add_virt_caps(VFIOPCIDevice *vdev, Error **errp); +void vfio_quirk_reset(VFIOPCIDevice *vdev); extern const PropertyInfo qdev_prop_nv_gpudirect_clique; |