From 6f2e27301d8cfea0a40dda7ec8a6dc1b9d0e228e Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Mon, 16 Jun 2014 19:12:25 +0200 Subject: qmp: add query-memory-devices command ... allowing to get state of present memory devices. Currently implemented only for PCDIMMDevice. Signed-off-by: Igor Mammedov Reviewed-by: Eric Blake Acked-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- qmp-commands.hx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'qmp-commands.hx') diff --git a/qmp-commands.hx b/qmp-commands.hx index e47c3ea900..81054d0b1b 100644 --- a/qmp-commands.hx +++ b/qmp-commands.hx @@ -3611,4 +3611,31 @@ Example (1): ] } +EQMP + + { + .name = "query-memory-devices", + .args_type = "", + .mhandler.cmd_new = qmp_marshal_input_query_memory_devices, + }, + +SQMP +@query-memory-devices +-------------------- + +Return a list of memory devices. + +Example: +-> { "execute": "query-memory-devices" } +<- { "return": [ { "data": + { "addr": 5368709120, + "hotpluggable": true, + "hotplugged": true, + "id": "d1", + "memdev": "/objects/memX", + "node": 0, + "size": 1073741824, + "slot": 0}, + "type": "dimm" + } ] } EQMP -- cgit v1.2.1