Commit dba69d10 authored by Marcelo Tosatti's avatar Marcelo Tosatti Committed by Ingo Molnar

x86, kvm: Call restore_sched_clock_state() only after %gs is initialized

s2ram broke due to this KVM commit:

  b74f05d6 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: default avatarKonstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
Cc: Avi Kivity <avi@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent c0e9afc0
...@@ -225,13 +225,13 @@ static void __restore_processor_state(struct saved_context *ctxt) ...@@ -225,13 +225,13 @@ static void __restore_processor_state(struct saved_context *ctxt)
fix_processor_context(); fix_processor_context();
do_fpu_end(); do_fpu_end();
x86_platform.restore_sched_clock_state();
mtrr_bp_restore(); mtrr_bp_restore();
} }
/* Needed by apm.c */ /* Needed by apm.c */
void restore_processor_state(void) void restore_processor_state(void)
{ {
x86_platform.restore_sched_clock_state();
__restore_processor_state(&saved_context); __restore_processor_state(&saved_context);
} }
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment