From: Ewan Mellor Date: Wed, 30 Aug 2006 10:05:00 +0000 (+0100) Subject: Further shadow_mem_control fixes -- we need to balloon the amount of memory X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15673^2~23^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=34784d695b7fbf2e190a29788ac33fdee6d63f54;p=xen.git Further shadow_mem_control fixes -- we need to balloon the amount of memory that we're going to request i.e. the rounded-up value. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index fbb60c0c30..a7a388bbea 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1296,13 +1296,13 @@ class XendDomainInfo: shadow_kb_req = self.info['shadow_memory'] * 1024 if shadow_kb_req > shadow_kb: shadow_kb = shadow_kb_req + shadow_mb = (shadow_kb + 1023) / 1024 # Make sure there's enough RAM available for the domain - balloon.free(mem_kb + shadow_kb) + balloon.free(mem_kb + shadow_mb * 1024) # Set up the shadow memory - shadow_cur = xc.shadow_mem_control(self.domid, - (shadow_kb + 1023) / 1024) + shadow_cur = xc.shadow_mem_control(self.domid, shadow_mb) self.info['shadow_memory'] = shadow_cur # initial memory allocation