From: Ewan Mellor Date: Wed, 30 Aug 2006 08:47:24 +0000 (+0100) Subject: Shadow memory should be in MiB, not KiB. It also needs rounding up to be safe. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15673^2~23^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b973ec93fc80d8e32fc808b4176be8e474d5b5bb;p=xen.git Shadow memory should be in MiB, not KiB. It also needs rounding up to be safe. Signed-off-by: Ewan Mellor --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index f9bf32e8c7..fbb60c0c30 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1301,7 +1301,8 @@ class XendDomainInfo: balloon.free(mem_kb + shadow_kb) # Set up the shadow memory - shadow_cur = xc.shadow_mem_control(self.domid, shadow_kb * 1024) + shadow_cur = xc.shadow_mem_control(self.domid, + (shadow_kb + 1023) / 1024) self.info['shadow_memory'] = shadow_cur # initial memory allocation