summaryrefslogtreecommitdiffstats
path: root/drivers/misc/hpilo.h
diff options
context:
space:
mode:
authorAlex Williamson <alex.williamson@redhat.com>2019-02-09 13:43:30 -0700
committerAlex Williamson <alex.williamson@redhat.com>2019-02-18 14:55:53 -0700
commit51ef3a004b1eb6241e56b3aa8495769a092a4dc2 (patch)
treeefbec861a722c7ab01af18d246e286e45f4bb0a8 /drivers/misc/hpilo.h
parenta3906855890d94736d240f0f637585c1470d8d02 (diff)
downloadlinux-51ef3a004b1eb6241e56b3aa8495769a092a4dc2.tar.gz
linux-51ef3a004b1eb6241e56b3aa8495769a092a4dc2.tar.bz2
linux-51ef3a004b1eb6241e56b3aa8495769a092a4dc2.zip
vfio/pci: Restore device state on PM transition
PCI core handles save and restore of device state around reset, but when using pci_set_power_state() we can unintentionally trigger a soft reset of the device, where PCI core only restores the BAR state. If we're using vfio-pci's idle D3 support to try to put devices into low power when unused, this might trigger a reset when the device is woken for use. Also power state management by the user, or within a guest, can put the device into D3 power state with potentially limited ability to restore the device if it should undergo a reset. The PCI spec does not define the extent of a soft reset and many devices reporting soft reset on D3->D0 transition do not undergo a PCI config space reset. It's therefore assumed safe to unconditionally restore the remainder of the state if the device indicates soft reset support, even on a user initiated wakeup. Implement a wrapper in vfio-pci to tag devices reporting PM reset support, save their state on transitions into D3 and restore on transitions back to D0. Reported-by: Alexander Duyck <alexander.h.duyck@linux.intel.com> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'drivers/misc/hpilo.h')
0 files changed, 0 insertions, 0 deletions