summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/swsusp_asm64.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-09-22 22:58:44 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-09-22 22:58:44 +0200
commit846955c8afe5ebca2f8841b042ca3342e08a092b (patch)
tree85584d6f009932c18e55562c3303c6331aebe0ca /arch/s390/kernel/swsusp_asm64.S
parent2e50195f58ec045bc4601ec94478d957974f4aa4 (diff)
downloadop-kernel-dev-846955c8afe5ebca2f8841b042ca3342e08a092b.zip
op-kernel-dev-846955c8afe5ebca2f8841b042ca3342e08a092b.tar.gz
[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 7cd6b09..9a86ccb 100644
--- a/arch/s390/kernel/swsusp_asm64.S
+++ b/arch/s390/kernel/swsusp_asm64.S
@@ -102,6 +102,9 @@ swsusp_arch_resume:
aghi %r15,-STACK_FRAME_OVERHEAD
stg %r1,__SF_BACKCHAIN(%r15)
+ /* Make all free pages stable */
+ lghi %r2,1
+ brasl %r14,arch_set_page_states
#ifdef CONFIG_SMP
/* Save boot cpu number */
brasl %r14,smp_get_phys_cpu_id
@@ -178,6 +181,10 @@ swsusp_arch_resume:
/* Activate DAT */
stosm __SF_EMPTY(%r15),0x04
+ /* Make all free pages unstable */
+ lghi %r2,0
+ brasl %r14,arch_set_page_states
+
/* Return 0 */
lmg %r6,%r15,STACK_FRAME_OVERHEAD + __SF_GPRS(%r15)
lghi %r2,0
OpenPOWER on IntegriCloud