|   | 
      | 
  
  
      | 
      | 
  
 
     | 
    | 
  
  
     | 
    | 
  
  
    |   | 
      | 
  
  
    | 
         
xen-changelog
[Xen-changelog] This patch fixes dom0 SMP vcpu hotplug.  Currently,	doma
 
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID 2acbe70dd418a963fc15d6b3f5bd0ecf76881f50
# Parent  fcf13f653dbaed0962e5e2aa1e9ac9439e704358
This patch fixes dom0 SMP vcpu hotplug.  Currently, domains without
config files (e.g. dom0) don't set info['vcpus'] correctly resulting in
incorrect cpu availablity values in the store.  This prevents hotplug
from functioning.
Signed-off-by: Ryan Harper <ryanh@xxxxxxxxxx>
diff -r fcf13f653dba -r 2acbe70dd418 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Tue Nov 15 16:28:05 2005
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Nov 15 16:30:55 2005
@@ -437,12 +437,18 @@
             defaultInfo('on_crash',     lambda: "restart")
             defaultInfo('cpu',          lambda: None)
             defaultInfo('cpu_weight',   lambda: 1.0)
-            defaultInfo('vcpus',        lambda: int(1))
+
+            # some domains don't have a config file (e.g. dom0 )
+            # to set number of vcpus so we derive available cpus
+            # from max_vcpu_id which is present for running domains.
+            if not self.infoIsSet('vcpus') and self.infoIsSet('max_vcpu_id'):
+                avail = int(self.info['max_vcpu_id'])+1
+            else:
+                avail = int(1)
+
+            defaultInfo('vcpus',        lambda: avail)
             defaultInfo('online_vcpus', lambda: self.info['vcpus'])
-
-            self.info['vcpus'] = int(self.info['vcpus'])
             defaultInfo('max_vcpu_id',  lambda: self.info['vcpus']-1)
-
             defaultInfo('vcpu_avail',   lambda: (1 << self.info['vcpus']) - 1)
 
             defaultInfo('memory',       lambda: 0)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
 |   
 
| <Prev in Thread] | 
Current Thread | 
[Next in Thread> |  
- [Xen-changelog] This patch fixes dom0 SMP vcpu hotplug.  Currently,	domains without,
Xen patchbot -unstable <=
  
 |  
  
 | 
    | 
  
  
    |   | 
    |