vfio-pci: Reset workaround for AMD Bonaire and Hawaii GPUs
commit5655f931abcfa5f100d12d021eaed606c2d4ef52
authorAlex Williamson <alex.williamson@redhat.com>
Tue, 28 Apr 2015 17:14:02 +0000 (28 11:14 -0600)
committerAlex Williamson <alex.williamson@redhat.com>
Tue, 28 Apr 2015 17:14:02 +0000 (28 11:14 -0600)
tree17189fd58d972281f8a8636154fa536e06985501
parentc6d231e2fd3773ef9a566ca24962f2314cb78f73
vfio-pci: Reset workaround for AMD Bonaire and Hawaii GPUs

Somehow these GPUs manage not to respond to a PCI bus reset, removing
our primary mechanism for resetting graphics cards.  The result is
that these devices typically work well for a single VM boot.  If the
VM is rebooted or restarted, the guest driver is not able to init the
card from the dirty state, resulting in a blue screen for Windows
guests.

The workaround is to use a device specific reset.  This is not 100%
reliable though since it depends on the incoming state of the device,
but it substantially improves the usability of these devices in a VM.

Credit to Alex Deucher <alexander.deucher@amd.com> for his guidance.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
hw/vfio/pci.c