@@ -334,3 +334,15 @@ MemoryInfo *qmp_query_memory_size_summary(Error **errp)
return mem_info;
}
+
+void qmp_display_reload(DiaplayReloadInfo *arg, Error **errp)
+{
+ Error *local_err = NULL;
+
+ if (arg->has_vnc_tls_certs && arg->vnc_tls_certs) {
+ if (!vnc_display_reload_certs(NULL, &local_err)) {
+ error_propagate(errp, local_err);
+ return;
+ }
+ }
+}
@@ -1179,3 +1179,35 @@
##
{ 'command': 'query-display-options',
'returns': 'DisplayOptions' }
+
+##
+# @DiaplayReloadInfo:
+#
+# The basic information for reload Display configuration
+#
+# @vnc-tls-certs: whether to reload tls certs
+#
+# Since: 6.0
+##
+{ 'struct': 'DiaplayReloadInfo',
+ 'data': { '*vnc-tls-certs': 'bool' } }
+
+##
+# @display-reload:
+#
+# Reload display configuration
+#
+# Returns: Nothing on success
+#
+# Since: 6.0
+#
+# Example:
+#
+# -> { "execute": "display-reload",
+# "arguments": { "vnc-tls-certs": true } }
+# <- { "return": {} }
+#
+##
+{ 'command': 'display-reload',
+ 'data': 'DiaplayReloadInfo',
+ 'boxed' : true }
This patch provides a new qmp to reload display configuration without restart VM, but only reloading the vnc tls certificates is implemented. Example: {"execute": "display-reload", "arguments":{"vnc-tls-certs": true}} Signed-off-by: Zihao Chang <changzihao1@huawei.com> --- monitor/qmp-cmds.c | 12 ++++++++++++ qapi/ui.json | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+)