There is a way to tell qemu how (not) to advertise S3/S4 ACPI sleep
state capability to the guest OS. This series includes the capability
to set this in the XML and also covers all the handling from qemu
point of view including checking for the support, parameter parsing,
command building, checking before sending the signals through guest
agent and also tests.
--
v2:
- Modified the patch to reflect danpb's notes (according to qemu
people the setting the disable_s[34] parameter to 0/1 ensures that
the states will be enabled/disabled respectively)
Martin Kletzander (3):
Add per-guest S3/S4 state configuration
qemu: Add support for S3/S4 state configuration
tests: Add tests for qemu S3/S4 state configuration
docs/schemas/domaincommon.rng | 33 ++++++
src/conf/domain_conf.c | 44 +++++++++
src/conf/domain_conf.h | 14 +++
src/libvirt_private.syms | 2 +
src/qemu/qemu_capabilities.c | 7 ++
src/qemu/qemu_capabilities.h | 2 +
src/qemu/qemu_command.c | 103 ++++++++++++++++++++
src/qemu/qemu_driver.c | 17 +++
tests/qemuargv2xmltest.c | 3 +
.../qemuxml2argv-misc-disable-s3.args | 4 +
.../qemuxml2argv-misc-disable-s3.xml | 27 +++++
.../qemuxml2argv-misc-disable-suspends.args | 4 +
.../qemuxml2argv-misc-disable-suspends.xml | 27 +++++
.../qemuxml2argv-misc-enable-s4.args | 4 +
.../qemuxml2argv-misc-enable-s4.xml | 27 +++++
tests/qemuxml2argvtest.c | 4 +
tests/qemuxml2xmltest.c | 3 +
17 files changed, 325 insertions(+), 0 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-misc-disable-s3.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-misc-disable-suspends.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-misc-enable-s4.xml
--
1.7.8.6