summaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorWanlong Gao <gaowanlong@cn.fujitsu.com>2014-05-14 17:43:08 +0800
committerMichael S. Tsirkin <mst@redhat.com>2014-06-19 18:44:18 +0300
commit0042109a6ab629aebfb287ff7aee295f24fad40d (patch)
tree41acc6dcd442a6ef425a0b1df96c431c5284d791 /vl.c
parent8c85901ed3cf2ede1ed5957e6e047d3719dceb4e (diff)
downloadqemu-0042109a6ab629aebfb287ff7aee295f24fad40d.tar.gz
qemu-0042109a6ab629aebfb287ff7aee295f24fad40d.tar.bz2
qemu-0042109a6ab629aebfb287ff7aee295f24fad40d.zip
NUMA: convert -numa option to use OptsVisitor
Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com> Signed-off-by: Igor Mammedov <imammedo@redhat.com> Tested-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> 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>
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/vl.c b/vl.c
index 7af90cd41b..469aa9c00c 100644
--- a/vl.c
+++ b/vl.c
@@ -2938,6 +2938,7 @@ int main(int argc, char **argv, char **envp)
qemu_add_opts(&qemu_realtime_opts);
qemu_add_opts(&qemu_msg_opts);
qemu_add_opts(&qemu_name_opts);
+ qemu_add_opts(&qemu_numa_opts);
runstate_init();
@@ -3133,7 +3134,10 @@ int main(int argc, char **argv, char **envp)
}
break;
case QEMU_OPTION_numa:
- numa_add(optarg);
+ opts = qemu_opts_parse(qemu_find_opts("numa"), optarg, 1);
+ if (!opts) {
+ exit(1);
+ }
break;
case QEMU_OPTION_display:
display_type = select_display(optarg);
@@ -4303,6 +4307,11 @@ int main(int argc, char **argv, char **envp)
default_drive(default_floppy, snapshot, IF_FLOPPY, 0, FD_OPTS);
default_drive(default_sdcard, snapshot, IF_SD, 0, SD_OPTS);
+ if (qemu_opts_foreach(qemu_find_opts("numa"), numa_init_func,
+ NULL, 1) != 0) {
+ exit(1);
+ }
+
set_numa_nodes();
if (qemu_opts_foreach(qemu_find_opts("mon"), mon_init_func, NULL, 1) != 0) {