From: Zihao Chang <changzihao1@huawei.com>
To: <qemu-devel@nongnu.org>
Cc: berrange@redhat.com, oscar.zhangbo@huawei.com,
changzihao1@huawei.com, armbru@redhat.com,
xiexiangyou@huawei.com, yebiaoxiang@huawei.com,
kraxel@redhat.com
Subject: [PATCH v5 3/3] qmp: add new qmp display-reload
Date: Thu, 11 Mar 2021 18:54:24 +0800 [thread overview]
Message-ID: <20210311105424.1370-4-changzihao1@huawei.com> (raw)
In-Reply-To: <20210311105424.1370-1-changzihao1@huawei.com>
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 | 13 +++++++++++++
qapi/ui.json | 19 +++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c
index c7df8c0ee268..0f791f974f30 100644
--- a/monitor/qmp-cmds.c
+++ b/monitor/qmp-cmds.c
@@ -334,3 +334,16 @@ MemoryInfo *qmp_query_memory_size_summary(Error **errp)
return mem_info;
}
+
+void qmp_display_reload(bool has_vnc_tls_certs, bool vnc_tls_certs,
+ Error **errp)
+{
+ Error *local_err = NULL;
+
+ if (has_vnc_tls_certs && vnc_tls_certs) {
+ if (!vnc_display_reload_certs(NULL, &local_err)) {
+ error_propagate(errp, local_err);
+ return;
+ }
+ }
+}
diff --git a/qapi/ui.json b/qapi/ui.json
index d08d72b43923..97b38aa1666e 100644
--- a/qapi/ui.json
+++ b/qapi/ui.json
@@ -1179,3 +1179,22 @@
##
{ 'command': 'query-display-options',
'returns': 'DisplayOptions' }
+
+##
+# @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': { '*vnc-tls-certs': 'bool' } }
--
2.28.0
next prev parent reply other threads:[~2021-03-11 10:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-11 10:54 [PATCH v5 0/3] vnc: support reload x509 certificates Zihao Chang
2021-03-11 10:54 ` [PATCH v5 1/3] crypto: add reload for QCryptoTLSCredsClass Zihao Chang
2021-03-11 11:12 ` Daniel P. Berrangé
2021-03-11 10:54 ` [PATCH v5 2/3] vnc: support reload x509 certificates for vnc Zihao Chang
2021-03-11 11:13 ` Daniel P. Berrangé
2021-03-11 10:54 ` Zihao Chang [this message]
2021-03-11 11:18 ` [PATCH v5 3/3] qmp: add new qmp display-reload Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210311105424.1370-4-changzihao1@huawei.com \
--to=changzihao1@huawei.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=oscar.zhangbo@huawei.com \
--cc=qemu-devel@nongnu.org \
--cc=xiexiangyou@huawei.com \
--cc=yebiaoxiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).