[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC 5/5] xen/arm: cpupool: implement arch_domain_cpupool_compatible
From: Peng Fan <peng.fan@xxxxxxx> When migrating domain between different cpupools, need to check whether the domain is compatible with the cpupool. Signed-off-by: Peng Fan <peng.fan@xxxxxxx> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> Cc: Julien Grall <julien.grall@xxxxxxx> --- xen/arch/arm/cpupool.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; + } } -- 2.6.6 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |