]> git.proxmox.com Git - qemu.git/commit - vl.c
suspend: add infrastructure
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 23 Feb 2012 12:45:19 +0000 (13:45 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 24 Feb 2012 19:36:02 +0000 (13:36 -0600)
commit95b363b5c643d8ad81c5377726e753b84c909037
tree59cf3cd9d5f38ef3027cf58669ea9110b3fd7a80
parent8283c4f565a26b3415961c481d980310c83dd2b4
suspend: add infrastructure

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: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sysemu.h
vl.c