Message ID | 1474250936-27962-6-git-send-email-peng.fan@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/xen/arch/arm/cpupool.c b/xen/arch/arm/cpupool.c index 74a5ef3..6c1c092 100644 --- a/xen/arch/arm/cpupool.c +++ b/xen/arch/arm/cpupool.c @@ -41,5 +41,20 @@ int arch_cpupool_cpu_add(struct cpupool *c, unsigned int cpu) bool_t arch_domain_cpupool_compatible(struct domain *d, struct cpupool *c) { - return true; + if ( !d->vcpu || !d->vcpu[0] ) + { + /* + * We are in process of domain creation, vcpu not constructed or + * initialiszed, ok to move domain from cpupool0 to other pool + */ + return true; + } + else if ( d->vcpu[0] ) + { + return !!( d->vcpu[0]->arch.vpidr == c->info.midr ); + } + else + { + return false; + } }