aboutsummaryrefslogtreecommitdiff
path: root/qmp-commands.hx
diff options
context:
space:
mode:
Diffstat (limited to 'qmp-commands.hx')
-rw-r--r--qmp-commands.hx33
1 files changed, 33 insertions, 0 deletions
diff --git a/qmp-commands.hx b/qmp-commands.hx
index 96de0b8852..f0f7d2b395 100644
--- a/qmp-commands.hx
+++ b/qmp-commands.hx
@@ -499,6 +499,39 @@ Example:
EQMP
{
+ .name = "memchar-read",
+ .args_type = "device:s,size:i,format:s?",
+ .mhandler.cmd_new = qmp_marshal_input_memchar_read,
+ },
+
+SQMP
+memchar-read
+-------------
+
+Provide read interface for CirMemCharDriver. Read from the char
+device memory and return the data with size.
+
+Arguments:
+
+- "device": the name of the char device, must be unique (json-string)
+- "size": the memory size wanted to read in bytes (refer to unencoded
+ size of the raw data), would adjust to the init size of the
+ memchar if the requested size is larger than it. (json-int)
+- "format": the data format write to memchardev, default is
+ utf8. (json-string, optional)
+ - Possible values: "utf8", "base64"
+
+Example:
+
+-> { "execute": "memchar-read",
+ "arguments": { "device": foo,
+ "size": 1000,
+ "format": "utf8" } }
+<- { "return": { "data": "data string...", "count": 1000 } }
+
+EQMP
+
+ {
.name = "xen-save-devices-state",
.args_type = "filename:F",
.mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,