mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
xen/arm: allocate secondaries dom0 vcpus
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
51c2a919a3
commit
6b0e8e4334
1 file changed
+11
-1
@@ -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;
|
||||
|
||||