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 qemu.conf: add vnc_tls_x509_secret_uuid 2019-01-22 12:18:28 +01:00
Makefile.inc.am maint: Add filetype annotations to Makefile.inc.am 2019-04-12 16:55:38 +02:00
MIGRATION.txt
qemu_agent.c util: Move enum convertors into virenum.(c|h) 2019-04-10 09:12:04 +02:00
qemu_agent.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_alias.c Remove all Author(s): lines from source file headers 2018-12-13 16:08:38 +00:00
qemu_alias.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_block.c qemu: block: Use VIR_RETURN_PTR 2019-04-10 16:34:57 +02:00
qemu_block.h qemu: block: Introduce and use AUTOPTR func for qemuBlockStorageSourceAttachDataPtr 2019-04-10 16:34:57 +02:00
qemu_blockjob.c util: Replace virStorageSourceFree with virObjectUnref 2019-02-18 10:31:21 +01:00
qemu_blockjob.h qemu: improve compile-time check of qemuBlockjobState mapping 2019-01-23 16:20:25 -06:00
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_capabilities: Introduce virQEMUCapsGetCPUModelInfo 2019-03-05 14:47:49 +01:00
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 util: Move enum convertors into virenum.(c|h) 2019-04-10 09:12:04 +02:00
qemu_conf.c qemu: remove qemuGetDomainDefaultHugepath 2019-04-10 16:24:33 +02:00
qemu_conf.h qemu: remove qemuGetDomainDefaultHugepath 2019-04-10 16:24:33 +02:00
qemu_domain_address.c qemu: Partially convert to net model enum 2019-04-16 13:11:08 -04:00
qemu_domain_address.h qemu: Always use 'alias' in warning message when removing USB address 2019-03-28 13:38:57 +01:00
qemu_domain.c conf: Add VIR_DOMAIN_DEF_FEATURE_NET_MODEL_STRING 2019-04-16 13:11:08 -04:00
qemu_domain.h util: Move enum convertors into virenum.(c|h) 2019-04-10 09:12:04 +02:00
qemu_driver.c qemuDomainPMSuspendForDuration: check for wake-up support 2019-04-25 11:43:53 +02:00
qemu_driver.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_extdevice.c Require a semicolon for VIR_LOG_INIT calls 2019-02-03 17:46:29 -05:00
qemu_extdevice.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_firmware.c qemu_firmware: Introduce qemuFirmwareGetSupported 2019-04-10 13:58:30 +02:00
qemu_firmware.h qemu_firmware: Introduce qemuFirmwareGetSupported 2019-04-10 13:58:30 +02:00
qemu_hostdev.c qemu: Filter non SCSI hostdevs in qemuHostdevPrepareSCSIDevices 2019-01-11 08:52:10 -05:00
qemu_hostdev.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_hotplug.c qemu_hotplug: Check for duplicate drive addresses 2019-04-18 17:09:02 +02:00
qemu_hotplug.h qemu_hotplug: rename dev to match in qemuDomainDetachDeviceLive 2019-03-26 11:05:03 -04:00
qemu_hotplugpriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
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 Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_migration_cookie.c qemu: Use VIR_XPATH_NODE_AUTORESTORE when XPath context is modified 2019-03-04 13:04:20 +01:00
qemu_migration_cookie.h util: Move enum convertors into virenum.(c|h) 2019-04-10 09:12:04 +02:00
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 util: Move enum convertors into virenum.(c|h) 2019-04-10 09:12:04 +02:00
qemu_migration_paramspriv.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
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 util: Move enum convertors into virenum.(c|h) 2019-04-10 09:12:04 +02:00
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 Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_monitor_text.c qemu: monitor: check for common 'Error: ' string 2019-04-23 11:05:44 -04:00
qemu_monitor_text.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
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 Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
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_process: Enter QMP command mode when starting QEMU Process 2019-02-19 18:44:49 +01:00
qemu_qapi.c
qemu_qapi.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu_security.c qemu: security: Replace and remove qemuSecurity[Set|Restore]DiskLabel 2019-01-30 17:20:38 +01:00
qemu_security.h qemu: security: Replace and remove qemuSecurity[Set|Restore]DiskLabel 2019-01-30 17:20:38 +01:00
qemu_tpm.c Require a semicolon for VIR_LOG_INIT calls 2019-02-03 17:46:29 -05:00
qemu_tpm.h Enforce a standard header file guard symbol name 2018-12-14 10:47:13 +00:00
qemu.conf Remove remaining references to kqemu 2019-02-19 08:33:50 +01:00
test_libvirtd_qemu.aug.in Remove remaining references to kqemu 2019-02-19 08:33:50 +01:00
THREADS.txt