Skip to contentSkip to conversation

libxl: Fix qemu-xen command line for vcpus numbers.

PATCH In review Anthony PERARD 2 participants 2 messages May 29, 2013 – May 30, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libxl: Fix qemu-xen command line for vcpus numbers.

On the qemu-xen command line, the number of vcpus initially online and the number of maximum available vcpus are inverted.

---
 tools/libxl/libxl_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxl/libxl_dm.c +2 -2
index d10a58f..1e3a9f4 100644
@@ -533,8 +533,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
                 nr_set_cpus = libxl_bitmap_count_set(&b_info->avail_vcpus);
 
                 flexarray_append(dm_args, libxl__sprintf(gc, "%d,maxcpus=%d",
-                                                         b_info->max_vcpus,
-                                                         nr_set_cpus));
+                                                         nr_set_cpus,
+                                                         b_info->max_vcpus));
             } else
                 flexarray_append(dm_args, libxl__sprintf(gc, "%d",
                                                          b_info->max_vcpus));
Signature · 1 line
Anthony PERARD
#1 lore raw
Quoted 4 lines · Anthony PERARD

On the qemu-xen command line, the number of vcpus initially online and the number of maximum available vcpus are inverted.

Doh! Acked + applied, thanks.

Quoted 19 lines
---
 tools/libxl/libxl_dm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/libxl/libxl_dm.c +2 -2
index d10a58f..1e3a9f4 100644
@@ -533,8 +533,8 @@ static char ** libxl__build_device_model_args_new(libxl__gc *gc,
                 nr_set_cpus = libxl_bitmap_count_set(&b_info->avail_vcpus);
 
                 flexarray_append(dm_args, libxl__sprintf(gc, "%d,maxcpus=%d",
-                                                         b_info->max_vcpus,
-                                                         nr_set_cpus));
+                                                         nr_set_cpus,
+                                                         b_info->max_vcpus));
             } else
                 flexarray_append(dm_args, libxl__sprintf(gc, "%d",
                                                          b_info->max_vcpus));