Based on series `convert -numa to QemuOpts/OptsVisitor' posted by Igor at http://lists.nongnu.org/archive/html/qemu-devel/2014-02/msg02801.html.
You can also checkout this series out at https://github.com/taohu/qemu/tree/numa-binding-v19, including all required patches. changes in v19: - use complete() method of user_creatable in memdev backend - implement qmp query-memdev by walking through numa_info[...].node_memdev and using object_property_get to get information as suggested by Paolo - implement info memdev - drop ram_backend->relative - make string output visitor parse int list - introduce libnuma Hu Tao (5): qapi: make string input visitor parse int list qapi: make string output visitor parse int list hostmem backend: implement memory policy qmp: add query-memdev hmp: add info memdev Igor Mammedov (2): object_add: allow completion handler to get canonical path add memdev backend infrastructure Paolo Bonzini (3): pc: pass QEMUMachineInitArgs to pc_memory_init numa: introduce memory_region_allocate_system_memory numa: add -numa node,memdev= option Wanlong Gao (1): Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. backends/Makefile.objs | 2 + backends/hostmem-ram.c | 77 ++++++++++++++ backends/hostmem.c | 202 +++++++++++++++++++++++++++++++++++++ configure | 33 ++++++ hmp.c | 27 +++++ hmp.h | 1 + hw/i386/pc.c | 15 ++- hw/i386/pc_piix.c | 8 +- hw/i386/pc_q35.c | 4 +- include/hw/i386/pc.h | 7 +- include/sysemu/hostmem.h | 64 ++++++++++++ include/sysemu/sysemu.h | 8 ++ monitor.c | 7 ++ numa.c | 133 ++++++++++++++++++++++++ qapi-schema.json | 57 ++++++++++- qapi/string-input-visitor.c | 160 +++++++++++++++++++++++++++-- qapi/string-output-visitor.c | 156 +++++++++++++++++++++++++++- qmp-commands.hx | 32 ++++++ qmp.c | 8 +- tests/test-string-input-visitor.c | 21 ++++ tests/test-string-output-visitor.c | 26 +++++ vl.c | 9 +- 22 files changed, 1017 insertions(+), 40 deletions(-) create mode 100644 backends/hostmem-ram.c create mode 100644 backends/hostmem.c create mode 100644 include/sysemu/hostmem.h -- 1.8.5.2.229.g4448466