From: Stefano Stabellini Date: Tue, 7 May 2013 14:12:39 +0000 (+0100) Subject: xen/arm: allocate secondaries dom0 vcpus X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6902 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6b0e8e43348a6b5548224ae8edc4907a60bf14d1;p=xen.git xen/arm: allocate secondaries dom0 vcpus Signed-off-by: Stefano Stabellini Acked-by: Ian Campbell --- diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c index 1b2a4fab6c..874827240a 100644 --- a/xen/arch/arm/domain_build.c +++ b/xen/arch/arm/domain_build.c @@ -363,7 +363,7 @@ static void dtb_load(struct kernel_info *kinfo) int construct_dom0(struct domain *d) { struct kernel_info kinfo = {}; - int rc; + int rc, i, cpu; struct vcpu *v = d->vcpu[0]; struct cpu_user_regs *regs = &v->arch.cpu_info->guest_cpu_user_regs; @@ -452,6 +452,16 @@ int construct_dom0(struct domain *d) } #endif + for ( i = 1, cpu = 0; i < d->max_vcpus; i++ ) + { + cpu = cpumask_cycle(cpu, &cpu_online_map); + if ( alloc_vcpu(d, i, cpu) == NULL ) + { + printk("Failed to allocate dom0 vcpu %d on pcpu %d\n", i, cpu); + break; + } + } + local_abort_enable(); return 0;