diff options
author | Ben Guthro <benjamin.guthro@citrix.com> | 2013-04-02 09:52:32 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-04-02 09:52:32 +0200 |
commit | 41e71c2607e036f1ac00df898b8f4acb2d4df7ee (patch) | |
tree | bb768df8cdebd22eabbfa39e8f8d5c1ff4fbf00e /xen/common/domain.c | |
parent | af699220ad6d111ba76fc3040342184e423cc9a1 (diff) | |
download | xen-41e71c2607e036f1ac00df898b8f4acb2d4df7ee.tar.gz xen-41e71c2607e036f1ac00df898b8f4acb2d4df7ee.tar.bz2 xen-41e71c2607e036f1ac00df898b8f4acb2d4df7ee.zip |
x86/S3: Restore broken vcpu affinity on resume
When in SYS_STATE_suspend, and going through the cpu_disable_scheduler
path, save a copy of the current cpu affinity, and mark a flag to
restore it later.
Later, in the resume process, when enabling nonboot cpus restore these
affinities.
Signed-off-by: Ben Guthro <benjamin.guthro@citrix.com>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/domain.c')
-rw-r--r-- | xen/common/domain.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c index 64ee29d62b..590548e101 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -126,6 +126,7 @@ struct vcpu *alloc_vcpu( if ( !zalloc_cpumask_var(&v->cpu_affinity) || !zalloc_cpumask_var(&v->cpu_affinity_tmp) || + !zalloc_cpumask_var(&v->cpu_affinity_saved) || !zalloc_cpumask_var(&v->vcpu_dirty_cpumask) ) goto fail_free; @@ -155,6 +156,7 @@ struct vcpu *alloc_vcpu( fail_free: free_cpumask_var(v->cpu_affinity); free_cpumask_var(v->cpu_affinity_tmp); + free_cpumask_var(v->cpu_affinity_saved); free_cpumask_var(v->vcpu_dirty_cpumask); free_vcpu_struct(v); return NULL; |