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/include/xen/sched.h | |
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/include/xen/sched.h')
-rw-r--r-- | xen/include/xen/sched.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index cabaf27753..d15d567c9b 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -153,6 +153,9 @@ struct vcpu bool_t defer_shutdown; /* VCPU is paused following shutdown request (d->is_shutting_down)? */ bool_t paused_for_shutdown; + /* VCPU need affinity restored */ + bool_t affinity_broken; + /* * > 0: a single port is being polled; @@ -175,6 +178,8 @@ struct vcpu cpumask_var_t cpu_affinity; /* Used to change affinity temporarily. */ cpumask_var_t cpu_affinity_tmp; + /* Used to restore affinity across S3. */ + cpumask_var_t cpu_affinity_saved; /* Bitmask of CPUs which are holding onto this VCPU's state. */ cpumask_var_t vcpu_dirty_cpumask; @@ -697,6 +702,7 @@ int schedule_cpu_switch(unsigned int cpu, struct cpupool *c); void vcpu_force_reschedule(struct vcpu *v); int cpu_disable_scheduler(unsigned int cpu); int vcpu_set_affinity(struct vcpu *v, const cpumask_t *affinity); +void restore_vcpu_affinity(struct domain *d); void vcpu_runstate_get(struct vcpu *v, struct vcpu_runstate_info *runstate); uint64_t get_cpu_idle_time(unsigned int cpu); |