Commit dba69d1092e291e257fb5673a3ad0e4c87878ebc
Committed by
Ingo Molnar
1 parent
c0e9afc0da
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
x86, kvm: Call restore_sched_clock_state() only after %gs is initialized
s2ram broke due to this KVM commit: b74f05d61b73 x86: kvmclock: abstract save/restore sched_clock_state restore_sched_clock_state() methods use percpu data, therefore they must run after %gs is initialized, but before mtrr_bp_restore() (due to lockstat using sched_clock). Move it to the correct place. Reported-and-tested-by: Konstantin Khlebnikov <khlebnikov@openvz.org> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Cc: Avi Kivity <avi@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
arch/x86/power/cpu.c
... | ... | @@ -225,13 +225,13 @@ |
225 | 225 | fix_processor_context(); |
226 | 226 | |
227 | 227 | do_fpu_end(); |
228 | + x86_platform.restore_sched_clock_state(); | |
228 | 229 | mtrr_bp_restore(); |
229 | 230 | } |
230 | 231 | |
231 | 232 | /* Needed by apm.c */ |
232 | 233 | void restore_processor_state(void) |
233 | 234 | { |
234 | - x86_platform.restore_sched_clock_state(); | |
235 | 235 | __restore_processor_state(&saved_context); |
236 | 236 | } |
237 | 237 | #ifdef CONFIG_X86_32 |