Skip to content

virtio: S3 support, use PM API macro for init

Amit Shah virtualization 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5virtio: balloon: Allow stats update after restore from S4drivers/virtio/virtio_balloon.c+0 -80 replies
2/5virtio: drop thaw PM operationdrivers/virtio/virtio_balloon.c drivers/virtio/virtio_pci.c include/linux/virtio.h+1 -340 replies
3/5virtio-pci: drop restore_common()drivers/virtio/virtio_pci.c+7 -160 replies
4/5virtio-pci: S3 supportdrivers/virtio/virtio_pci.c+3 -210 replies
5/5virtio-pci: switch to PM ops macro to initialise PM functionsdrivers/virtio/virtio_pci.c+1 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] virtio: S3 support, use PM API macro for init

Hello,

Turns out S3 is not different from S4 for virtio devices: the device is assumed to be reset, so the host and guest state are to be assumed to be out of sync upon resume. We handle the S4 case with exactly the same scenario, so just point the suspend/resume routines to the freeze/restore ones.

Once that is done, we also use the PM API's macro to initialise the sleep functions.

A couple of cleanups are included: there's no need for special thaw processing in the balloon driver, so that's addressed in patches 1 and 2.

Testing: both S3 and S4 support have been tested using these patches using a similar method used earlier during S4 patch development: a guest is started with virtio-blk as the only disk, a virtio network card, a virtio-serial port and a virtio balloon device. Ping from guest to host, dd /dev/zero to a file on the disk, and IO from the host on the virtio-serial port, all at once, while exercising S4 and S3 (separately) were tested. They all continue to work fine after resume. virtio balloon values too were tested by inflating and deflating the balloon.

Please review and apply,

Thanks,

Amit Shah (5):
virtio: balloon: Allow stats update after restore from S4
virtio: drop thaw PM operation
virtio-pci: drop restore_common()
virtio-pci: S3 support
virtio-pci: switch to PM ops macro to initialise PM functions

 drivers/virtio/virtio_balloon.c |   14 -------
 drivers/virtio/virtio_pci.c     |   74 ++++----------------------------------
 include/linux/virtio.h          |    1 -
 3 files changed, 8 insertions(+), 81 deletions(-)
Signature · 1 line
1.7.7.6