diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile
index 23aaf52..1b72f66 100644
--- a/xen/arch/arm/Makefile
+++ b/xen/arch/arm/Makefile
@@ -9,6 +9,7 @@ obj-y += bootfdt.o
 obj-y += cpu.o
 obj-y += cpuerrata.o
 obj-y += cpufeature.o
+obj-y += cpupool.o
 obj-y += decode.o
 obj-y += device.o
 obj-y += domain.o
diff --git a/xen/arch/arm/cpupool.c b/xen/arch/arm/cpupool.c
new file mode 100644
index 0000000..74a5ef3
--- /dev/null
+++ b/xen/arch/arm/cpupool.c
@@ -0,0 +1,45 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <xen/cpumask.h>
+#include <xen/sched.h>
+#include <xen/sched-if.h>
+
+int arch_cpupool_create(struct cpupool *c)
+{
+    c->info.midr = -1;
+
+    return 0;
+}
+
+int arch_cpupool_cpu_add(struct cpupool *c, unsigned int cpu)
+{
+    if (( c->info.midr == -1 ) || ( cpumask_weight(c->cpu_valid) == 0 ))
+    {
+        c->info.midr = cpu_data[cpu].midr.bits;
+
+        return 0;
+    }
+    else if (( c->info.midr == cpu_data[cpu].midr.bits ))
+    {
+        return 0;
+    }
+    else
+    {
+        return -EINVAL;
+    }
+}
+
+bool_t arch_domain_cpupool_compatible(struct domain *d, struct cpupool *c)
+{
+    return true;
+}
diff --git a/xen/arch/x86/cpu/Makefile b/xen/arch/x86/cpu/Makefile
index 74f23ae..0d3036e 100644
--- a/xen/arch/x86/cpu/Makefile
+++ b/xen/arch/x86/cpu/Makefile
@@ -4,6 +4,7 @@ subdir-y += mtrr
 obj-y += amd.o
 obj-y += centaur.o
 obj-y += common.o
+obj-y += cpupool.o
 obj-y += intel.o
 obj-y += intel_cacheinfo.o
 obj-y += mwait-idle.o
diff --git a/xen/arch/x86/cpu/cpupool.c b/xen/arch/x86/cpu/cpupool.c
new file mode 100644
index 0000000..d897a1f
--- /dev/null
+++ b/xen/arch/x86/cpu/cpupool.c
@@ -0,0 +1,30 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <xen/cpumask.h>
+#include <xen/sched.h>
+#include <xen/sched-if.h>
+
+int arch_cpupool_create(struct cpupool *c)
+{
+    return 0;
+}
+
+int arch_cpupool_cpu_add(struct cpupool *c, unsigned int cpu)
+{
+    return 0;
+}
+
+bool_t arch_domain_cpupool_compatible(struct domain *d, struct cpupool *c)
+{
+    return true;
+}
diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c
index 9998394..798322d 100644
--- a/xen/common/cpupool.c
+++ b/xen/common/cpupool.c
@@ -134,11 +134,20 @@ static struct cpupool *cpupool_create(
     struct cpupool *c;
     struct cpupool **q;
     int last = 0;
+    int ret;
 
     *perr = -ENOMEM;
     if ( (c = alloc_cpupool_struct()) == NULL )
         return NULL;
 
+    ret = arch_cpupool_create(c);
+    if ( ret )
+    {
+        *perr = ret;
+        free_cpupool_struct(c);
+        return NULL;
+    }
+
     /* One reference for caller, one reference for cpupool_destroy(). */
     atomic_set(&c->refcnt, 2);
 
@@ -498,6 +507,8 @@ static int cpupool_cpu_add(unsigned int cpu)
         {
             if ( cpumask_test_cpu(cpu, (*c)->cpu_suspended ) )
             {
+                if ( arch_cpupool_cpu_add(*c, cpu) )
+                    continue;
                 ret = cpupool_assign_cpu_locked(*c, cpu);
                 if ( ret )
                     goto out;
@@ -516,6 +527,13 @@ static int cpupool_cpu_add(unsigned int cpu)
     }
     else
     {
+        if ( arch_cpupool_cpu_add(cpupool0, cpu) )
+        {
+           /* No fail, just skip adding the cpu to cpupool0 */
+            ret = 0;
+            goto out;
+	}
+
         /*
          * If we are not resuming, we are hot-plugging cpu, and in which case
          * we add it to pool0, as it certainly was there when hot-unplagged
@@ -657,6 +675,9 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
         ret = -ENOENT;
         if ( c == NULL )
             goto addcpu_out;
+        ret = -EINVAL;
+        if ( arch_cpupool_cpu_add(c, cpu) )
+            goto addcpu_out;
         ret = cpupool_assign_cpu_locked(c, cpu);
     addcpu_out:
         spin_unlock(&cpupool_lock);
@@ -707,7 +728,16 @@ int cpupool_do_sysctl(struct xen_sysctl_cpupool_op *op)
 
         c = cpupool_find_by_id(op->cpupool_id);
         if ( (c != NULL) && cpumask_weight(c->cpu_valid) )
+        {
+            if ( !arch_domain_cpupool_compatible (d, c) )
+            {
+                ret = -EINVAL;
+                spin_unlock(&cpupool_lock);
+                rcu_unlock_domain(d);
+                break;
+	    }
             ret = cpupool_move_domain_locked(d, c);
+        }
 
         spin_unlock(&cpupool_lock);
         cpupool_dprintk("cpupool move_domain(dom=%d)->pool=%d ret %d\n",
diff --git a/xen/include/xen/sched-if.h b/xen/include/xen/sched-if.h
index eb52ac7..1b2d4bf 100644
--- a/xen/include/xen/sched-if.h
+++ b/xen/include/xen/sched-if.h
@@ -203,4 +203,7 @@ static inline cpumask_t* cpupool_domain_cpumask(struct domain *d)
     return d->cpupool->cpu_valid;
 }
 
+int arch_cpupool_create(struct cpupool *c);
+int arch_cpupool_cpu_add(struct cpupool *c, unsigned int cpu);
+bool_t arch_domain_cpupool_compatible(struct domain *d, struct cpupool *c);
 #endif /* __XEN_SCHED_IF_H__ */
