direct-io.hg

changeset 12760:0f5dd1d43b67

merge
author kfraser@localhost.localdomain
date Thu Dec 07 11:14:21 2006 +0000 (2006-12-07)
parents 67a06a9b7b1d e8a74ac80167
children 0c1e2abc1888
files
line diff
     1.1 --- a/tools/python/xen/xend/XendConfig.py	Thu Dec 07 11:12:52 2006 +0000
     1.2 +++ b/tools/python/xen/xend/XendConfig.py	Thu Dec 07 11:14:21 2006 +0000
     1.3 @@ -353,10 +353,15 @@ class XendConfig(dict):
     1.4          if self['builder'] not in ('hvm', 'linux'):
     1.5              raise XendConfigError('Invalid builder configuration')
     1.6  
     1.7 +    def _vcpus_sanity_check(self):
     1.8 +        if self.get('vcpus_number') != None:
     1.9 +            self['vcpu_avail'] = (1 << self['vcpus_number']) - 1
    1.10 +
    1.11      def validate(self):
    1.12          self._memory_sanity_check()
    1.13          self._actions_sanity_check()
    1.14          self._builder_sanity_check()
    1.15 +        self._vcpus_sanity_check()
    1.16  
    1.17      def _dominfo_to_xapi(self, dominfo):
    1.18          self['domid'] = dominfo['domid']