mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Fix crash if some secondary CPUs cannot be initialised.
Signed-off-by: Keir Fraser <keir@xensource.com>
This commit is contained in:
1 parent
539471abbe
commit
a3dc5328a3
1 file changed
+3
@@ -129,6 +129,9 @@ struct vcpu *alloc_idle_vcpu(unsigned int cpu_id)
|
||||
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) :
|
||||
idle_vcpu[cpu_id - vcpu_id]->domain;
|
||||
|
||||