hw/vfio/pci: handle reset at VFIODevice
commitb47d8efa9f430c332bf96ce6eede169eb48422ad
authorEric Auger <eric.auger@linaro.org>
Mon, 22 Dec 2014 16:54:35 +0000 (22 09:54 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Mon, 22 Dec 2014 16:54:35 +0000 (22 09:54 -0700)
tree28840e1fe46e026eb358ad3642233c0fdfad5365
parent462037c9e85b27149e71d7f5c7f41375ca6e47d5
hw/vfio/pci: handle reset at VFIODevice

Since we can potentially have both PCI and platform devices in
the same VFIO group, this latter now owns a list of VFIODevices.
A unified reset handler, vfio_reset_handler, is registered, looping
through this VFIODevice list. 2 specialized operations are introduced
(vfio_compute_needs_reset and vfio_hot_reset_multi): they allow to
implement type specific behavior. also reset_works and needs_reset
VFIOPCIDevice fields are moved into VFIODevice.

Signed-off-by: Eric Auger <eric.auger@linaro.org>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c