ia64/xen-unstable

changeset 17400:e8f058b99171

xend: Don't allow dom0 memory to be ballooned below dom0-min-mem
configuration parameter.

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Sat Apr 05 22:25:30 2008 +0100 (2008-04-05)
parents 61a3e041ea12
children 6143f5bd32a7
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Sat Apr 05 22:21:42 2008 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Sat Apr 05 22:25:30 2008 +0100
     1.3 @@ -986,6 +986,13 @@ class XendDomainInfo:
     1.4                    self.info['name_label'], str(self.domid), target)
     1.5          
     1.6          MiB = 1024 * 1024
     1.7 +
     1.8 +        if self.domid == 0:
     1.9 +            dom0_min_mem = xoptions.get_dom0_min_mem()
    1.10 +            memory_cur = self.get_memory_dynamic_max() / MiB
    1.11 +            if target < memory_cur and dom0_min_mem > target:
    1.12 +                raise XendError("memory_dynamic_max too small")
    1.13 +
    1.14          self._safe_set_memory('memory_dynamic_min', target * MiB)
    1.15          self._safe_set_memory('memory_dynamic_max', target * MiB)
    1.16