From: INAKOSHI Hiroya <inakoshi.hiroya@jp.fujitsu.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] boot with default on dom0_mem allocation failure.
Date: Thu, 31 Aug 2006 20:28:22 +0900 [thread overview]
Message-ID: <44F6C7D6.2080800@jp.fujitsu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 382 bytes --]
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@jp.fujitsu.com>
[-- Attachment #2: dom0_mem.patch --]
[-- Type: text/plain, Size: 601 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
reply other threads:[~2006-08-31 11:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F6C7D6.2080800@jp.fujitsu.com \
--to=inakoshi.hiroya@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.