mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
xend: Ensure 2MB free before creating any domain. All domain creations
have an implicit memory overhead. Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
47d265319b
commit
f92b83e597
1 file changed
+7
-3
@@ -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,
|
||||
|
||||