dect
/
linux-2.6
Archived
13
0
Fork 0

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

s2ram broke due to this KVM commit:

  b74f05d61b 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>
This commit is contained in:
Marcelo Tosatti 2012-04-01 13:53:36 -03:00 committed by Ingo Molnar
parent c0e9afc0da
commit dba69d1092
1 changed files with 1 additions and 1 deletions

View File

@ -225,13 +225,13 @@ static void __restore_processor_state(struct saved_context *ctxt)
fix_processor_context();
do_fpu_end();
x86_platform.restore_sched_clock_state();
mtrr_bp_restore();
}
/* Needed by apm.c */
void restore_processor_state(void)
{
x86_platform.restore_sched_clock_state();
__restore_processor_state(&saved_context);
}
#ifdef CONFIG_X86_32