ia64/xen-unstable

changeset 11347:dc773bf49664

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 <ewan@xensource.com>
author Ewan Mellor <ewan@xensource.com>
date Wed Aug 30 11:05:00 2006 +0100 (2006-08-30)
parents a47951e59cbf
children 550821cdee0a
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Wed Aug 30 09:47:24 2006 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Wed Aug 30 11:05:00 2006 +0100
     1.3 @@ -1296,13 +1296,13 @@ class XendDomainInfo:
     1.4              shadow_kb_req = self.info['shadow_memory'] * 1024
     1.5              if shadow_kb_req > shadow_kb:
     1.6                  shadow_kb = shadow_kb_req
     1.7 +            shadow_mb = (shadow_kb + 1023) / 1024
     1.8  
     1.9              # Make sure there's enough RAM available for the domain
    1.10 -            balloon.free(mem_kb + shadow_kb)
    1.11 +            balloon.free(mem_kb + shadow_mb * 1024)
    1.12  
    1.13              # Set up the shadow memory
    1.14 -            shadow_cur = xc.shadow_mem_control(self.domid,
    1.15 -                                               (shadow_kb + 1023) / 1024)
    1.16 +            shadow_cur = xc.shadow_mem_control(self.domid, shadow_mb)
    1.17              self.info['shadow_memory'] = shadow_cur
    1.18  
    1.19              # initial memory allocation