WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH]Check the values of MAX_VIRT_CPUS and NR_CPUS for

To: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Subject: Re: [Xen-devel] [PATCH]Check the values of MAX_VIRT_CPUS and NR_CPUS for SMP
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 21 Apr 2006 08:46:20 +0100
Cc: Atsushi SAKAI <sakaia@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 21 Apr 2006 00:46:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <200604210910.07824.Tristan.Gingold@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200604210131.k3L1VgNc009129@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <200604210910.07824.Tristan.Gingold@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 21 Apr 2006, at 08:10, Tristan Gingold wrote:

But the logical limit of the IA64 Max CPU is larger than 64.
If someone change these values, some possibility make this error again.

To avoid this problem, I believe this check code should be exists.
Please also note that this problem is currently worked around in xen/ia64:
   /* A vcpu is created for the idle domain on every physical cpu.
       Limit the number of cpus to the maximum number of vcpus.  */
    if (max_cpus > MAX_VIRT_CPUS)
        max_cpus = MAX_VIRT_CPUS;

Of course, the Keir method is better!

Rather than cut-and-pasting that code into arch/ia64 I would like to see a patch which moves the definition of the idle_vcpu array, and the code from the top of x86's do_boot_cpu(), into common/domain.c (maybe call the function alloc_idle_vcpu()). Passed a physical cpu number, it would use the x86 alloc logic, fill in idle_vcpu[], and return the vcpu that was allocated.

 -- Keir


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>