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] x86: defer a panic call during dom0 construction

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] x86: defer a panic call during dom0 construction
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 12 Jun 2008 15:34:57 +0100
Delivery-date: Thu, 12 Jun 2008 07:35:08 -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
We should try to avoid to panic with interrupts disabled, as panic()
may imply use of the call-function-IPI (in the case of opt_noreboot
being set), which asserts that interrupts are enabled.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: 2008-06-12/xen/arch/x86/domain_build.c
===================================================================
--- 2008-06-12.orig/xen/arch/x86/domain_build.c 2008-06-12 09:08:19.000000000 
+0200
+++ 2008-06-12/xen/arch/x86/domain_build.c      2008-06-12 09:08:31.000000000 
+0200
@@ -784,7 +784,7 @@ int __init construct_dom0(
     while ( pfn < nr_pages )
     {
         if ( (page = alloc_chunk(d, nr_pages - d->tot_pages)) == NULL )
-            panic("Not enough RAM for DOM0 reservation.\n");
+            break;
         while ( pfn < d->tot_pages )
         {
             mfn = page_to_mfn(page);
@@ -828,6 +828,10 @@ int __init construct_dom0(
     write_ptbase(current);
     local_irq_enable();
 
+    /* Must call panic() with interrupts enabled. */
+    if ( page == NULL )
+        panic("Not enough RAM for DOM0 reservation.\n");
+
 #if defined(__i386__)
     /* Destroy low mappings - they were only for our convenience. */
     zap_low_mappings(l2start);




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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86: defer a panic call during dom0 construction, Jan Beulich <=