[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2] Fixes related to processing of qemu's -numa
From: |
Vinod, Chegu |
Subject: |
Re: [Qemu-devel] [PATCH v2] Fixes related to processing of qemu's -numa option |
Date: |
Tue, 26 Jun 2012 01:07:57 +0100 |
-----Original Message-----
From: Eduardo Habkost [mailto:address@hidden
Sent: Monday, June 25, 2012 1:01 PM
To: Vinod, Chegu
Cc: Hada, Craig M; Hull, Jim; address@hidden; address@hidden
Subject: Re: [Qemu-devel] [PATCH v2] Fixes related to processing of qemu's
-numa option
Just found another issue:
On Wed, Jun 20, 2012 at 05:33:29PM -0300, Eduardo Habkost wrote:
[...]
> > @@ -970,27 +974,24 @@ static void numa_add(const char *optarg)
> > }
> > node_mem[nodenr] = sval;
> > }
> > - if (get_param_value(option, 128, "cpus", optarg) == 0) {
> > - node_cpumask[nodenr] = 0;
> > - } else {
> > + if (get_param_value(option, 128, "cpus", optarg) != 0) {
> > value = strtoull(option, &endptr, 10);
> > - if (value >= 64) {
> > - value = 63;
> > - fprintf(stderr, "only 64 CPUs in NUMA mode supported.\n");
> > + if (*endptr == '-') {
> > + endvalue = strtoull(endptr+1, &endptr, 10);
> > } else {
> > - if (*endptr == '-') {
> > - endvalue = strtoull(endptr+1, &endptr, 10);
> > - if (endvalue >= 63) {
> > - endvalue = 62;
> > - fprintf(stderr,
> > - "only 63 CPUs in NUMA mode supported.\n");
> > - }
> > - value = (2ULL << endvalue) - (1ULL << value);
> > - } else {
> > - value = 1ULL << value;
> > - }
> > + endvalue = value;
> > + }
> > +
> > + if (endvalue >= max_cpus) {
> > + endvalue = max_cpus - 1;
> > + fprintf(stderr,
> > + "A max of %d CPUs are supported in a guest on this
> > host\n",
> > + max_cpus);
> > + }
>This makes the following command segfault:
>
>$ qemu-system-x86_64 -numa 'node,cpus=1-3' -smp 100
>
>max_cpus may be not initialized yet at the call to numa_add(), as you are
>still parsing the command-line options.
Yes. I am aware of this issue too... and shall post another version of the
patch next week (along with another fix) .
Thanks
Vinod
--
Eduardo