oasis-tcs / virtio-spec

OASIS Virtual I/O Device TC: Source code for the VIRTIO (Virtual I/O) Specification maintained by the OASIS Virtual I/O Device (VIRTIO) Technical Committee
https://github.com/oasis-tcs/virtio-spec
Other
237 stars 71 forks source link

virtio-mem: introduce VIRTIO_MEM_F_PERSISTENT_SUSPEND #207

Open davidhildenbrand opened 2 weeks ago

davidhildenbrand commented 2 weeks ago

virtio-mem in upstream QEMU and Linux support a new feature called VIRTIO_MEM_F_PERSISTENT_SUSPEND.

If provided by the device, the driver can safely allow the system to go into suspend mode (e.g., S5) without risking that the device will lose its state during the wakeup.

Quoting from the current proposal:

Before, the behavior while suspending to a deep sleep state and waking up was not specified. For example, in x86 QEMU VM all devices receive a reset request during wake-up. This would lead to unplugging of all the plugged memory blocks. Due to this, suspending is disallowed in the Linux Kernel, when plugged memory is present and VIRTIO_MEM_F_PERSISTENT_SUSPEND feature flag is not advertised by the virtio-mem device.

This new flag should signal to the guest driver, that the device can correctly suspend to a deep sleep state and then wake up without disrupting the plugged memory blocks.

Latest proposal: https://lkml.kernel.org/r/20241009090202.10544-2-jmarcin@redhat.com

mstsirkin commented 12 hours ago

BALLOT CREATED AT URL: https://groups.oasis-open.org/higherlogic/ws/public/ballot?id=3856