aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-05-01 10:20:55 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-05-01 10:20:55 +0100
commitf92b83e597d933f7b497892e270a0737392ca287 (patch)
treea55039cfec01ae92eccb2508a8a3db9b4587bdff
parent47d265319bc1d8711c147c1e85d3cce699543d4c (diff)
downloadxen-f92b83e597d933f7b497892e270a0737392ca287.tar.gz
xen-f92b83e597d933f7b497892e270a0737392ca287.tar.bz2
xen-f92b83e597d933f7b497892e270a0737392ca287.zip
xend: Ensure 2MB free before creating any domain. All domain creations
have an implicit memory overhead. Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r--tools/python/xen/xend/XendDomainInfo.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py
index c082c19090..f1c602a2d7 100644
--- a/tools/python/xen/xend/XendDomainInfo.py
+++ b/tools/python/xen/xend/XendDomainInfo.py
@@ -1419,9 +1419,13 @@ class XendDomainInfo:
raise VmError("HVM guest support is unavailable: is VT/AMD-V "
"supported by your CPU and enabled in your "
"BIOS?")
- # Hack to pre-reserve some memory for HVM setup.
- # Needed because Xen allocates 1MB by default immediately.
- balloon.free(2*1024) # 2MB should be plenty
+
+ # Hack to pre-reserve some memory for initial domain creation.
+ # There is an implicit memory overhead for any domain creation. This
+ # overhead is greater for some types of domain than others. For
+ # example, an x86 HVM domain will have a default shadow-pagetable
+ # allocation of 1MB. We free up 2MB here to be on the safe side.
+ balloon.free(2*1024) # 2MB should be plenty
self.domid = xc.domain_create(
domid = 0,