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

[Xen-devel] [PATCH] boot failes when strange value is specified for dom0

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] boot failes when strange value is specified for dom0_max_vcpus
From: MINAI Katsuhito <minai@xxxxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 14:05:09 +0900
Delivery-date: Wed, 30 Aug 2006 22:05:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

This patch corrects the following bug. 

The startup of Xen fails when the following values are specified
for boot option dom0_max_vcpus. 

- Value more than number of physical CPU
- Negative value


Signed-off-by: Katsuhito Minai <minai@xxxxxxxxxxxxxx>


diff -r f790546ecfda xen/arch/x86/domain_build.c
--- a/xen/arch/x86/domain_build.c       Mon Aug 28 20:22:56 2006 +0100
+++ b/xen/arch/x86/domain_build.c       Tue Aug 29 17:48:30 2006 +0900
@@ -671,6 +671,8 @@ int construct_dom0(struct domain *d,
 
     if ( opt_dom0_max_vcpus == 0 )
         opt_dom0_max_vcpus = num_online_cpus();
+    if ( opt_dom0_max_vcpus > num_online_cpus() )
+        opt_dom0_max_vcpus = num_online_cpus();
     if ( opt_dom0_max_vcpus > MAX_VIRT_CPUS )
         opt_dom0_max_vcpus = MAX_VIRT_CPUS;
     printk("Dom0 has maximum %u VCPUs\n", opt_dom0_max_vcpus);


Best regards,
Minai



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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] boot failes when strange value is specified for dom0_max_vcpus, MINAI Katsuhito <=