• Amit Shah's avatar
    virtio: console: Add freeze and restore handlers to support S4 · 2b8f41d8
    Amit Shah authored
    Remove all vqs and associated buffers in the freeze callback which
    prepares us to go into hibernation state.  On restore, re-create all the
    vqs and populate the input vqs with buffers to get to the pre-hibernate
    state.
    
    Note: Any outstanding unconsumed buffers are discarded; which means
    there's a possibility of data loss in case the host or the guest didn't
    consume any data already present in the vqs.  This can be addressed in a
    later patch series, perhaps in virtio common code.
    Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    2b8f41d8
virtio_console.c 46.5 KB