@@ -867,6 +867,21 @@ Display the amount of initially allocated and present hotpluggable (if
enabled) memory in bytes.
ETEXI
+ {
+ .name = "wakeup_from_suspend_support",
+ .args_type = "",
+ .params = "",
+ .help = "shows if the guest has support for wake up "
+ "from suspend",
+ .cmd = hmp_info_wakeup_from_suspend_support,
+ },
+
+STEXI
+@item info wakeup_from_suspend_support
+@findex info wakeup_from_suspend_support
+Shows if the guest has support for wake up from suspended state.
+ETEXI
+
STEXI
@end table
ETEXI
@@ -2918,3 +2918,14 @@ void hmp_info_memory_size_summary(Monitor *mon, const QDict *qdict)
}
hmp_handle_error(mon, &err);
}
+
+void hmp_info_wakeup_from_suspend_support(Monitor *mon, const QDict *qdict)
+{
+ WakeupSuspendSupportInfo *info;
+
+ info = qmp_query_wakeup_from_suspend_support(NULL);
+ monitor_printf(mon, "wake up from suspend support: %s\n",
+ info->enabled ? "enabled" : "disabled");
+
+ qapi_free_WakeupSuspendSupportInfo(info);
+}
@@ -147,5 +147,6 @@ void hmp_info_ramblock(Monitor *mon, const QDict *qdict);
void hmp_hotpluggable_cpus(Monitor *mon, const QDict *qdict);
void hmp_info_vm_generation_id(Monitor *mon, const QDict *qdict);
void hmp_info_memory_size_summary(Monitor *mon, const QDict *qdict);
+void hmp_info_wakeup_from_suspend_support(Monitor *mon, const QDict *qdict);
#endif
This is the HMP side of 'query-wakeup-from-suspend-support', a new QMP command that queries the guest support for system_wakeup. This is the expected output of the new command when running a x86 guest: (qemu) info wakeup_from_suspend_support wake up from suspend support: enabled (qemu) And when running a pseries guest: (qemu) info wakeup_from_suspend_support wake up from suspend support: disabled (qemu) Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com> --- hmp-commands-info.hx | 15 +++++++++++++++ hmp.c | 11 +++++++++++ hmp.h | 1 + 3 files changed, 27 insertions(+)