WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [XEN][POWERPC] Allocate secondary VCPUs f

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [XEN][POWERPC] Allocate secondary VCPUs for Dom0
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 14 Feb 2007 15:00:42 -0800
Delivery-date: Wed, 14 Feb 2007 15:01:10 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Date 1169383790 18000
# Node ID cc1eb0689bcf0c0123feec25214ddb169622d9b9
# Parent  88ae0647d542761848365b4af6b58bce4e4c03f6
[XEN][POWERPC] Allocate secondary VCPUs for Dom0

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 xen/arch/powerpc/domain_build.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+)

diff -r 88ae0647d542 -r cc1eb0689bcf xen/arch/powerpc/domain_build.c
--- a/xen/arch/powerpc/domain_build.c   Sun Jan 21 07:47:35 2007 -0500
+++ b/xen/arch/powerpc/domain_build.c   Sun Jan 21 07:49:50 2007 -0500
@@ -26,6 +26,7 @@
 #include <xen/ctype.h>
 #include <xen/iocap.h>
 #include <xen/shadow.h>
+#include <xen/domain.h>
 #include <xen/version.h>
 #include <asm/processor.h>
 #include <asm/papr.h>
@@ -120,6 +121,7 @@ int construct_dom0(struct domain *d,
     ulong msr;
     ulong pc;
     ulong r2;
+    int vcpu;
 
     /* Sanity! */
     BUG_ON(d->domain_id != 0);
@@ -209,6 +211,27 @@ int construct_dom0(struct domain *d,
 
     /* put stack below everything */
     v->arch.ctxt.gprs[1] = dst - STACK_FRAME_OVERHEAD;
+
+    /* startup secondary processors */
+    if ( opt_dom0_max_vcpus == 0 )
+        opt_dom0_max_vcpus = num_online_cpus();
+    if ( opt_dom0_max_vcpus > num_online_cpus() )
+        opt_dom0_max_vcpus = num_online_cpus();
+    if ( opt_dom0_max_vcpus > MAX_VIRT_CPUS )
+        opt_dom0_max_vcpus = MAX_VIRT_CPUS;
+#ifdef BITS_PER_GUEST_LONG
+    if ( opt_dom0_max_vcpus > BITS_PER_GUEST_LONG(d) )
+        opt_dom0_max_vcpus = BITS_PER_GUEST_LONG(d);
+#endif
+    printk("Dom0 has maximum %u VCPUs\n", opt_dom0_max_vcpus);
+
+    for (vcpu = 1; vcpu < opt_dom0_max_vcpus; vcpu++) {
+        if (NULL == alloc_vcpu(dom0, vcpu, vcpu))
+            panic("Error creating domain 0 vcpu %d\n", vcpu);
+        /* for now we pin Dom0 VCPUs to their coresponding CPUs */
+        if (cpu_isset(vcpu, cpu_online_map))
+            dom0->vcpu[vcpu]->cpu_affinity = cpumask_of_cpu(vcpu);
+    }
 
     /* copy relative to Xen */
     dst += rma;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [XEN][POWERPC] Allocate secondary VCPUs for Dom0, Xen patchbot-unstable <=