libvirt/src/qemu
Daniel Henrique Barboza cc1d1dbbd5 qemuDomainPMSuspendForDuration: check for wake-up support
If the current QEMU guest can't wake up from suspend properly,
and we are able to determine that, avoid suspending the guest
at all. To be able to determine this support, QEMU needs to
implement the 'query-current-machine' QMP call. This is reflected
by the QEMU_CAPS_QUERY_CURRENT_MACHINE cap.

If the cap is enabled, a new function qemuDomainProbeQMPCurrentMachine
is called. This is wrapper for qemuMonitorGetCurrentMachineInfo,
where the 'wakeup-suspend-support' flag is retrieved from
'query-current-machine'. If wakeupSuspendSupport is true,
proceed with the regular flow of qemuDomainPMSuspendForDuration.

The absence of QEMU_CAPS_QUERY_CURRENT_MACHINE indicates that
we're dealing with a QEMU version older than 4.0 (which implements
the required QMP API). In this case, proceed as usual with the
suspend logic of qemuDomainPMSuspendForDuration, since we can't
assume whether the guest has support or not.

Fixes: https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1759509
Reported-by: Balamuruhan S <bala24@linux.vnet.ibm.com>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2019-04-25 11:43:53 +02:00
..
EVENTHANDLERS.txt
libvirtd_qemu.aug
Makefile.inc.am maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
MIGRATION.txt
qemu_agent.c
qemu_agent.h
qemu_alias.c
qemu_alias.h
qemu_block.c qemu: block: Use VIR_RETURN_PTR 2019-04-10 16:34:57 +02:00
qemu_block.h
qemu_blockjob.c
qemu_blockjob.h
qemu_capabilities.c qemu_capabilities: Add QEMU_CAPS_QUERY_CURRENT_MACHINE 2019-04-25 11:43:53 +02:00
qemu_capabilities.h qemu_capabilities: Add QEMU_CAPS_QUERY_CURRENT_MACHINE 2019-04-25 11:43:53 +02:00
qemu_capspriv.h
qemu_cgroup.c qemu_cgroup: Remove unused qemuSetupCpusetMems 2019-04-18 17:59:19 +02:00
qemu_cgroup.h qemu_cgroup: Remove unused qemuSetupCpusetMems 2019-04-18 17:59:19 +02:00
qemu_command.c virt drivers: don't handle type=network after resolving actual network type 2019-04-18 13:10:06 +01:00
qemu_command.h
qemu_conf.c
qemu_conf.h
qemu_domain_address.c qemu: Partially convert to net model enum 2019-04-16 13:11:08 -04:00
qemu_domain_address.h
qemu_domain.c conf: Add VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING 2019-04-16 13:11:08 -04:00
qemu_domain.h
qemu_driver.c qemuDomainPMSuspendForDuration: check for wake-up support 2019-04-25 11:43:53 +02:00
qemu_driver.h
qemu_extdevice.c
qemu_extdevice.h
qemu_firmware.c
qemu_firmware.h
qemu_hostdev.c
qemu_hostdev.h
qemu_hotplug.c qemu_hotplug: Check for duplicate drive addresses 2019-04-18 17:09:02 +02:00
qemu_hotplug.h
qemu_hotplugpriv.h
qemu_interface.c virt drivers: don't handle type=network after resolving actual network type 2019-04-18 13:10:06 +01:00
qemu_interface.h
qemu_migration_cookie.c
qemu_migration_cookie.h
qemu_migration_params.c Always put _LAST enums on second line of VIR_ENUM_IMPL 2019-04-11 12:47:23 -04:00
qemu_migration_params.h
qemu_migration_paramspriv.h
qemu_migration.c Always put _LAST enums on second line of VIR_ENUM_IMPL 2019-04-11 12:47:23 -04:00
qemu_migration.h
qemu_monitor_json.c qemu_monitor: Introduce handler for 'query-current-machine' command 2019-04-25 11:43:53 +02:00
qemu_monitor_json.h qemu_monitor: Introduce handler for 'query-current-machine' command 2019-04-25 11:43:53 +02:00
qemu_monitor_priv.h
qemu_monitor_text.c qemu: monitor: check for common 'Error: ' string 2019-04-23 11:05:44 -04:00
qemu_monitor_text.h
qemu_monitor.c qemu_monitor: Introduce handler for 'query-current-machine' command 2019-04-25 11:43:53 +02:00
qemu_monitor.h qemu_monitor: Introduce handler for 'query-current-machine' command 2019-04-25 11:43:53 +02:00
qemu_parse_command.c conf: net: Add wrapper functions for <model> value 2019-04-16 13:11:08 -04:00
qemu_parse_command.h
qemu_process.c qemu: Set up EMULATOR thread and cpuset.mems before exec()-ing qemu 2019-04-18 17:53:42 +02:00
qemu_process.h snapshot: Rename virDomainSnapshotObjPtr 2019-03-22 01:18:34 -05:00
qemu_processpriv.h
qemu_qapi.c
qemu_qapi.h
qemu_security.c
qemu_security.h
qemu_tpm.c
qemu_tpm.h
qemu.conf
test_libvirtd_qemu.aug.in
THREADS.txt