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 with default on dom0_mem allocation failure.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] boot with default on dom0_mem allocation failure.
From: INAKOSHI Hiroya <inakoshi.hiroya@xxxxxxxxxxxxxx>
Date: Thu, 31 Aug 2006 20:28:22 +0900
Delivery-date: Thu, 31 Aug 2006 04:29:55 -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
User-agent: Thunderbird 1.5.0.5 (Windows/20060719)
Hi,

this patch makes Xen boot with the default dom0_mem value when the given
value exceeds available memory, instead Xen panics and reboots.

Administrators have a chance to correct dom0_mem (and other parameters
if necessary) after Xen is up with default, seeing the warning message.

Tested by booting Domain-0.

Signed-off-by: Hiroya INAKOSHI <inakoshi.hiroya@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       Thu Aug 31 16:48:55 2006 +0900
@@ -267,6 +267,12 @@ int construct_dom0(struct domain *d,
     printk("*** LOADING DOMAIN 0 ***\n");
 
     d->max_pages = ~0U;
+
+    if ( dom0_nrpages > (avail_domheap_pages() + initial_images_nrpages()) )
+    {
+        printk("Warning: dom0_mem exceed available memory. Booting with 
default.\n");
+        dom0_nrpages = 0;
+    }
 
     /*
      * If domain 0 allocation isn't specified, reserve 1/16th of available
_______________________________________________
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 with default on dom0_mem allocation failure., INAKOSHI Hiroya <=