public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* x86: call restore_sched_clock_state after %gs is initialized
@ 2012-03-21  2:11 Marcelo Tosatti
  2012-03-22  9:43 ` Avi Kivity
  0 siblings, 1 reply; 2+ messages in thread
From: Marcelo Tosatti @ 2012-03-21  2:11 UTC (permalink / raw)
  To: kvm; +Cc: Avi Kivity


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.

Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>

diff --git a/arch/x86/power/cpu.c b/arch/x86/power/cpu.c
index 0e76a28..0f405d9 100644
--- a/arch/x86/power/cpu.c
+++ b/arch/x86/power/cpu.c
@@ -224,13 +224,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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: x86: call restore_sched_clock_state after %gs is initialized
  2012-03-21  2:11 x86: call restore_sched_clock_state after %gs is initialized Marcelo Tosatti
@ 2012-03-22  9:43 ` Avi Kivity
  0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2012-03-22  9:43 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: kvm

On 03/21/2012 04:11 AM, Marcelo Tosatti wrote:
> 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.
>

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-22  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-21  2:11 x86: call restore_sched_clock_state after %gs is initialized Marcelo Tosatti
2012-03-22  9:43 ` Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox