Skip to content
  • Gerd Hoffmann's avatar
    suspend: add infrastructure · 95b363b5
    Gerd Hoffmann authored
    
    
    This patch adds some infrastructure to handle suspend and resume to
    qemu.  First there are two functions to switch state and second there
    is a suspend notifier:
    
     * qemu_system_suspend_request is supposed to be called when the
       guest asks for being be suspended, for example via ACPI.
    
     * qemu_system_wakeup_request is supposed to be called on events
       which should wake up the guest.
    
     * qemu_register_suspend_notifier can be used to register a notifier
       which will be called when the guest is suspended.  Machine types
       and device models can hook in there to modify state if needed.
    
     * qemu_register_wakeup_notifier can be used to register a notifier
       which will be called when the guest is woken up.  Machine types
       and device models can hook in there to modify state if needed.
    
     * qemu_system_wakeup_enable can be used to enable/disable wakeup
       events.
    
    Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
    Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
    95b363b5