aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/swsusp_asm64.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-09-22 16:58:44 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-22 16:58:44 -0400
commit846955c8afe5ebca2f8841b042ca3342e08a092b (patch)
tree85584d6f009932c18e55562c3303c6331aebe0ca /arch/s390/kernel/swsusp_asm64.S
parent2e50195f58ec045bc4601ec94478d957974f4aa4 (diff)
[S390] hibernation: fix guest page hinting related crash
On resume the system that loads the to be resumed image might have unstable pages. When the resume image is copied back and a write access happen to an unstable page this causes an exception and the system crashes. To fix this set all free pages to stable before copying the resumed image data. Also after everything has been restored set all free pages of the resumed system to unstable again. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/swsusp_asm64.S')
-rw-r--r--arch/s390/kernel/swsusp_asm64.S7
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/s390/kernel/swsusp_asm64.S b/arch/s390/kernel/swsusp_asm64.S
index 7cd6b096f0d1..9a86ccb91a8a 100644
--- a/arch/s390/kernel/swsusp_asm64.S
+++ b/arch/s390/kernel/swsusp_asm64.S
@@ -102,6 +102,9 @@ swsusp_arch_resume:
102 aghi %r15,-STACK_FRAME_OVERHEAD 102 aghi %r15,-STACK_FRAME_OVERHEAD
103 stg %r1,__SF_BACKCHAIN(%r15) 103 stg %r1,__SF_BACKCHAIN(%r15)
104 104
105 /* Make all free pages stable */
106 lghi %r2,1
107 brasl %r14,arch_set_page_states
105#ifdef CONFIG_SMP 108#ifdef CONFIG_SMP
106 /* Save boot cpu number */ 109 /* Save boot cpu number */
107 brasl %r14,smp_get_phys_cpu_id 110 brasl %r14,smp_get_phys_cpu_id
@@ -178,6 +181,10 @@ swsusp_arch_resume:
178 /* Activate DAT */ 181 /* Activate DAT */
179 stosm __SF_EMPTY(%r15),0x04 182 stosm __SF_EMPTY(%r15),0x04
180 183
184 /* Make all free pages unstable */
185 lghi %r2,0
186 brasl %r14,arch_set_page_states
187
181 /* Return 0 */ 188 /* Return 0 */
182 lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15) 189 lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15)
183 lghi %r2,0 190 lghi %r2,0