virtio: Add support for no-reset virtio PCI PM
authorDavid Stevens <stevensd@chromium.org>
Fri, 8 Dec 2023 07:07:54 +0000 (16:07 +0900)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 27 Dec 2023 21:10:38 +0000 (16:10 -0500)
commitdff4fa0e57856045359440d05af9e9b7f7048f52
tree9a5c7aa416b31d43a874fd907be621c1dc582dd1
parentd2c4f1928a3f7f4a1f28a0cfc022e8a145ce6903
virtio: Add support for no-reset virtio PCI PM

If a virtio_pci_device supports native PCI power management and has the
No_Soft_Reset bit set, then skip resetting and reinitializing the device
when suspending and restoring the device. This allows system-wide low
power states like s2idle to be used in systems with stateful virtio
devices that can't simply be re-initialized (e.g. virtio-fs).

Signed-off-by: David Stevens <stevensd@chromium.org>
Message-Id: <20231208070754.3132339-1-stevensd@chromium.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
drivers/virtio/virtio_pci_common.c