[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] When recreating the record for dom 0, read the current VCPU settings from Xen,
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Node ID ecc16f3222dc877e22daed9307be04134752905e # Parent 478ddc354ccdb815cbf94fda0201747ea5a7f299 When recreating the record for dom 0, read the current VCPU settings from Xen, rather than from the store, allowing boot-time configuration to take precedence. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- tools/python/xen/xend/XendDomainInfo.py | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff -r 478ddc354ccd -r ecc16f3222dc tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Wed Dec 13 11:32:04 2006 +0000 +++ b/tools/python/xen/xend/XendDomainInfo.py Wed Dec 13 14:36:36 2006 +0000 @@ -167,7 +167,7 @@ def recreate(info, priv): @param xeninfo: Parsed configuration @type xeninfo: Dictionary - @param priv: TODO, unknown, something to do with memory + @param priv: Is a privileged domain (Dom 0) @type priv: bool @rtype: XendDomainInfo @@ -381,7 +381,7 @@ class XendDomainInfo: @type dompath: string @keyword augment: Augment given info with xenstored VM info @type augment: bool - @keyword priv: Is a privledged domain (Dom 0) (TODO: really?) + @keyword priv: Is a privileged domain (Dom 0) @type priv: bool @keyword resume: Is this domain being resumed? @type resume: bool @@ -647,6 +647,8 @@ class XendDomainInfo: if priv: augment_entries.remove('memory') augment_entries.remove('maxmem') + augment_entries.remove('vcpus') + augment_entries.remove('vcpu_avail') vm_config = self._readVMDetails([(k, XendConfig.LEGACY_CFG_TYPES[k]) for k in augment_entries]) @@ -663,6 +665,14 @@ class XendDomainInfo: self.info[xapiarg] = val else: self.info[arg] = val + + # For dom0, we ignore any stored value for the vcpus fields, and + # read the current value from Xen instead. This allows boot-time + # settings to take precedence over any entries in the store. + if priv: + xeninfo = dom_get(self.domid) + self.info['vcpus_number'] = xeninfo['online_vcpus'] + self.info['vcpu_avail'] = (1 << xeninfo['online_vcpus']) - 1 # read image value image_sxp = self._readVm('image') _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |