numa: add -numa node,memdev= option
This option provides the infrastructure for binding guest NUMA nodes
to host NUMA nodes. For example:
-object memory-ram,size=1024M,policy=bind,host-nodes=0,id=ram-node0 \
-numa node,nodeid=0,cpus=0,memdev=ram-node0 \
-object memory-ram,size=1024M,policy=interleave,host-nodes=1-3,id=ram-node1 \
-numa node,nodeid=1,cpus=1,memdev=ram-node1
The option replaces "-numa node,mem=".
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
MST: conflict resolution
diff --git a/qapi-schema.json b/qapi-schema.json
index e65b7b1..e05f8ba 100644
--- a/qapi-schema.json
+++ b/qapi-schema.json
@@ -3119,8 +3119,12 @@
# @cpus: #optional VCPUs belonging to this node (assign VCPUS round-robin
# if omitted)
#
-# @mem: #optional memory size of this node (equally divide total memory among
-# nodes if omitted)
+# @mem: #optional memory size of this node; mutually exclusive with @memdev.
+# Equally divide total memory among nodes if both @mem and @memdev are
+# omitted.
+#
+# @memdev: #optional memory backend object. If specified for one node,
+# it must be specified for all nodes.
#
# Since: 2.1
##
@@ -3128,4 +3132,5 @@
'data': {
'*nodeid': 'uint16',
'*cpus': ['uint16'],
- '*mem': 'size' }}
+ '*mem': 'size',
+ '*memdev': 'str' }}