diff options
author | Alex Williamson <alex.williamson@redhat.com> | 2013-10-02 13:51:00 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2013-10-02 13:51:00 -0600 |
commit | f16f39c3fc973c5d7cbc2224eefb4ef5eb1e64ff (patch) | |
tree | 42ce5131f2a78734fcc4a8fd7d1a50be5652b2c2 /device-hotplug.c | |
parent | 8fbf47c3a8a7f37a11268a07290d20a325ba4cb6 (diff) |
vfio-pci: Implement PCI hot reset
Now that VFIO has a PCI hot reset interface, take advantage of it.
There are two modes that we need to consider. The first is when only
one device within the set of devices affected is actually assigned to
the guest. In this case the other devices are are just held by VFIO
for isolation and we can pretend they're not there, doing an entire
bus reset whenever the device reset callback is triggered. Supporting
this case separately allows us to do the best reset we can do of the
device even if the device is hotplugged.
The second mode is when multiple affected devices are all exposed to
the guest. In this case we can only do a hot reset when the entire
system is being reset. However, this also allows us to track which
individual devices are affected by a reset and only do them once.
We split our reset function into pre- and post-reset helper functions
prioritize the types of device resets available to us, and create
separate _one vs _multi reset interfaces to handle the distinct cases
above.
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'device-hotplug.c')
0 files changed, 0 insertions, 0 deletions