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] Revert alloc_idle_vcpu() to support multi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Revert alloc_idle_vcpu() to support multiple idle domains where max
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 12 Aug 2009 07:45:23 -0700
Delivery-date: Wed, 12 Aug 2009 07:47:07 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1249908688 -3600
# Node ID db1890f07661dc6ec699ff789de98d5917f74f37
# Parent  6d37f9be5fdfe2eeaf10ff0a3f95e94840fd937c
Revert alloc_idle_vcpu() to support multiple idle domains where max
vcpus is less than max pcpus (e.g., can happen on i386).

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/common/domain.c |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff -r 6d37f9be5fdf -r db1890f07661 xen/common/domain.c
--- a/xen/common/domain.c       Mon Aug 10 13:33:01 2009 +0100
+++ b/xen/common/domain.c       Mon Aug 10 13:51:28 2009 +0100
@@ -182,8 +182,19 @@ struct vcpu *alloc_vcpu(
 
 struct vcpu *alloc_idle_vcpu(unsigned int cpu_id)
 {
-    return idle_vcpu[cpu_id] ?: alloc_vcpu(idle_vcpu[0]->domain,
-                                           cpu_id, cpu_id);
+    struct domain *d;
+    struct vcpu *v;
+    unsigned int vcpu_id = cpu_id % MAX_VIRT_CPUS;
+
+    if ( (v = idle_vcpu[cpu_id]) != NULL )
+        return v;
+
+    d = (vcpu_id == 0) ?
+        domain_create(IDLE_DOMAIN_ID, 0, 0) :
+        idle_vcpu[cpu_id - vcpu_id]->domain;
+    BUG_ON(d == NULL);
+
+    return alloc_vcpu(d, vcpu_id, cpu_id);
 }
 
 static unsigned int extra_dom0_irqs, extra_domU_irqs = 8;

_______________________________________________
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] Revert alloc_idle_vcpu() to support multiple idle domains where max, Xen patchbot-unstable <=