KVM: s390/mm: Fix storage key corruption during swapping
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 28 Aug 2014 19:21:41 +0000 (21:21 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 2 Sep 2014 08:30:43 +0000 (10:30 +0200)
commit3e03d4c46daa849880837d802e41c14132a03ef9
tree758d0d843efe23586a2546ee9edf04e506231c25
parentab3f285f227fec62868037e9b1b1fd18294a83b8
KVM: s390/mm: Fix storage key corruption during swapping

Since 3.12 or more precisely  commit 0944fe3f4a32 ("s390/mm:
implement software referenced bits") guest storage keys get
corrupted during paging. This commit added another valid->invalid
translation for page tables - namely ptep_test_and_clear_young.
We have to transfer the storage key into the pgste in that case.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: stable@vger.kernel.org # v3.12+
arch/s390/include/asm/pgtable.h