[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Revert alloc_idle_vcpu() to support multiple idle domains where max
# 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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |