Skip to contentSkip to conversation

x86: v3.4-rc1 s2ram regression

PATCH In review Konstantin Khlebnikov 3 participants 4 messages Apr 1, 2012 – Apr 2, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: v3.4-rc1 s2ram regression

commit b74f05d61b73af584d0c39121980171389ecfaaa
("x86: kvmclock: abstract save/restore sched_clock_state")
breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage and blinks with all possible leds =) Screen is black, so I don't know what happened.

reverting or following patch helps

Cc Thomas Gleixner <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Avi Kivity <[email protected]>
Cc Igor Mammedov <[email protected]>
---
 arch/x86/power/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/power/cpu.c +1 -1
index 4793683..2bc5a82 100644
@@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
 /* Needed by apm.c */
 void restore_processor_state(void)
 {
-	x86_platform.restore_sched_clock_state();
 	__restore_processor_state(&saved_context);
+	x86_platform.restore_sched_clock_state();
 }
 #ifdef CONFIG_X86_32
 EXPORT_SYMBOL(restore_processor_state);
#1 lore raw
Quoted 21 lines · Konstantin Khlebnikov

commit b74f05d61b73af584d0c39121980171389ecfaaa
("x86: kvmclock: abstract save/restore sched_clock_state")
breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage and blinks with all possible leds =) Screen is black, so I don't know what happened.

reverting or following patch helps

Cc Thomas Gleixner <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Avi Kivity <[email protected]>
Cc Igor Mammedov <[email protected]>
---
 arch/x86/power/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/power/cpu.c +0 -0
index 4793683..2bc5a82 100644

arch/x86/power/cpu.c static void __restore_processor_state(struct saved_context *ctxt) · line 238

Quoted 9 lines
arch/x86/power/cpu.c +1 -1
@@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
 /* Needed by apm.c */
 void restore_processor_state(void)
 {
-	x86_platform.restore_sched_clock_state();
 	__restore_processor_state(&saved_context);
+	x86_platform.restore_sched_clock_state();
 }
 #ifdef CONFIG_X86_32
 EXPORT_SYMBOL(restore_processor_state);

The correct fix is in kvm.git (see below).

Ingo, can you please merge it through x86 tree while the kvm.git issues are resolved? It has been forward to you directly.

x86: call restore_sched_clock_state after %gs is initialized

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.

#2 lore raw
Quoted 39 lines · Marcelo Tosatti
Quoted 21 lines · Konstantin Khlebnikov

commit b74f05d61b73af584d0c39121980171389ecfaaa
("x86: kvmclock: abstract save/restore sched_clock_state")
breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage and blinks with all possible leds =) Screen is black, so I don't know what happened.

reverting or following patch helps

Cc Thomas Gleixner <[email protected]>
Cc Marcelo Tosatti <[email protected]>
Cc Avi Kivity <[email protected]>
Cc Igor Mammedov <[email protected]>
---
 arch/x86/power/cpu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/power/cpu.c +0 -0
index 4793683..2bc5a82 100644

arch/x86/power/cpu.c static void __restore_processor_state(struct saved_context *ctxt) · line 238

Quoted 9 lines
arch/x86/power/cpu.c +1 -1
@@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
 /* Needed by apm.c */
 void restore_processor_state(void)
 {
-	x86_platform.restore_sched_clock_state();
 	__restore_processor_state(&saved_context);
+	x86_platform.restore_sched_clock_state();
 }
 #ifdef CONFIG_X86_32
 EXPORT_SYMBOL(restore_processor_state);

The correct fix is in kvm.git (see below).

Ingo, can you please merge it through x86 tree while the kvm.git issues are resolved? It has been forward to you directly.

x86: call restore_sched_clock_state after %gs is initialized

Quoted 8 lines

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.

Ok, will queue it up.

Thanks,

Ingo

#3 lore raw
In reply to Marcelo Tosatti
Quoted 17 lines · Marcelo Tosatti
Quoted 16 lines · Konstantin Khlebnikov

commit b74f05d61b73af584d0c39121980171389ecfaaa
("x86: kvmclock: abstract save/restore sched_clock_state")
breaks s2ram for my notebook. It hangs (maybe panic) somewhere on resume stage and blinks with all possible leds =) Screen is black, so I don't know what happened.

reverting or following patch helps

Cc Thomas Gleixner<[email protected]>
Cc Marcelo Tosatti<[email protected]>
Cc Avi Kivity<[email protected]>
Cc Igor Mammedov<[email protected]>
---
  arch/x86/power/cpu.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
Quoted 16 lines
Quoted 5 lines
arch/x86/power/cpu.c +0 -0
index 4793683..2bc5a82 100644

arch/x86/power/cpu.c static void __restore_processor_state(struct saved_context *ctxt) · line 238

Quoted 9 lines
arch/x86/power/cpu.c +1 -1
@@ -231,8 +231,8 @@ static void __restore_processor_state(struct saved_context *ctxt)
  /* Needed by apm.c */
  void restore_processor_state(void)
  {
-	x86_platform.restore_sched_clock_state();
  	__restore_processor_state(&saved_context);
+	x86_platform.restore_sched_clock_state();
  }
  #ifdef CONFIG_X86_32
  EXPORT_SYMBOL(restore_processor_state);

The correct fix is in kvm.git (see below).

Thanks. Your patch works for me too.

Quoted 16 lines

Ingo, can you please merge it through x86 tree while the kvm.git issues are resolved? It has been forward to you directly.

x86: call restore_sched_clock_state after %gs is initialized

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.