diff --git a/xen/common/cpu.c b/xen/common/cpu.c index 630881e..e20868c 100644 --- a/xen/common/cpu.c +++ b/xen/common/cpu.c @@ -5,6 +5,7 @@ #include #include #include +#include unsigned int __read_mostly nr_cpu_ids = NR_CPUS; #ifndef nr_cpumask_bits @@ -212,6 +213,8 @@ void enable_nonboot_cpus(void) BUG_ON(error == -EBUSY); printk("Error taking CPU%d up: %d\n", cpu, error); } + if (system_state == SYS_STATE_resume) + cpumask_set_cpu(cpu, cpupool0->cpu_valid); } cpumask_clear(&frozen_cpus); diff --git a/xen/common/schedule.c b/xen/common/schedule.c index eee74be..eefca1c 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -543,7 +543,7 @@ int cpu_disable_scheduler(unsigned int cpu) int ret = 0; c = per_cpu(cpupool, cpu); - if ( (c == NULL) || (system_state == SYS_STATE_suspend) ) + if ( c == NULL ) return ret; for_each_domain_in_cpupool ( d, c ) @@ -554,7 +554,8 @@ int cpu_disable_scheduler(unsigned int cpu) cpumask_and(&online_affinity, v->cpu_affinity, c->cpu_valid); if ( cpumask_empty(&online_affinity) && - cpumask_test_cpu(cpu, v->cpu_affinity) ) + cpumask_test_cpu(cpu, v->cpu_affinity) && + system_state != SYS_STATE_suspend ) { printk("Breaking vcpu affinity for domain %d vcpu %d\n", v->domain->domain_id, v->vcpu_id);