linux/drivers/virtio
Stephan Gerhold ed7ac37fde virtio_mmio: Add missing PM calls to freeze/restore
Most virtio drivers provide freeze/restore callbacks to finish up
device usage before suspend and to reinitialize the virtio device after
resume. However, these callbacks are currently only called when using
virtio_pci. virtio_mmio does not have any PM ops defined.

This causes problems for example after suspend to disk (hibernation),
since the virtio devices might lose their state after the VMM is
restarted. Calling virtio_device_freeze()/restore() ensures that
the virtio devices are re-initialized correctly.

Fix this by implementing the dev_pm_ops for virtio_mmio,
similar to virtio_pci_common.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Message-Id: <20220621110621.3638025-2-stephan.gerhold@kernkonzept.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-06-27 08:05:35 -04:00
..
Kconfig virtio: disable notification hardening by default 2022-06-24 02:49:48 -04:00
Makefile virtio-pci: introduce legacy device module 2021-11-01 04:30:34 -04:00
virtio_balloon.c virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio_dma_buf.c dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
virtio_input.c virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
virtio_mem.c drivers: virtio_mem: use pageblock size as the minimum virtio_mem size. 2022-05-13 07:20:13 -07:00
virtio_mmio.c virtio_mmio: Add missing PM calls to freeze/restore 2022-06-27 08:05:35 -04:00
virtio_pci_common.c virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio_pci_common.h virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio_pci_legacy_dev.c virtio/virtio_pci_legacy_dev: ensure the correct return value 2022-01-14 18:50:53 -05:00
virtio_pci_legacy.c virtio-pci: implement synchronize_cbs() 2022-05-31 12:45:09 -04:00
virtio_pci_modern_dev.c virtio: Remove unnecessary variable assignments 2022-06-24 02:49:48 -04:00
virtio_pci_modern.c virtio-pci: implement synchronize_cbs() 2022-05-31 12:45:09 -04:00
virtio_ring.c virtio: disable notification hardening by default 2022-06-24 02:49:48 -04:00
virtio_vdpa.c virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio.c virtio: disable notification hardening by default 2022-06-24 02:49:48 -04:00