qmp: add query-memdev

Add qmp command query-memdev to query for information
of memory devices

Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Hu Tao 2014-06-16 18:05:41 +08:00 committed by Michael S. Tsirkin
parent 4cf1b76bf1
commit 76b5d8507d
3 changed files with 162 additions and 0 deletions

View file

@ -3573,4 +3573,42 @@ Example:
}
} } ] }
EQMP
{
.name = "query-memdev",
.args_type = "",
.mhandler.cmd_new = qmp_marshal_input_query_memdev,
},
SQMP
query-memdev
------------
Show memory devices information.
Example (1):
-> { "execute": "query-memdev" }
<- { "return": [
{
"size": 536870912,
"merge": false,
"dump": true,
"prealloc": false,
"host-nodes": [0, 1],
"policy": "bind"
},
{
"size": 536870912,
"merge": false,
"dump": true,
"prealloc": true,
"host-nodes": [2, 3],
"policy": "preferred"
}
]
}
EQMP