OSDN Git Service

s390/mm: set change and reference bit on lazy key enablement
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 6 Jul 2017 08:12:58 +0000 (10:12 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 13 Jul 2017 09:28:29 +0000 (11:28 +0200)
commit97ca7bfc19605bc08e9183441b8b8545e84032d6
tree0fc4bc83a0028e464791c35709aabc36eb3feb21
parent2daace78a8c94e2cd20164b8efc18171c56e92ec
s390/mm: set change and reference bit on lazy key enablement

When we enable storage keys for a guest lazily, we reset the ACC and F
values. That is correct assuming that these are 0 on a clear reset and
the guest obviously has not used any key setting instruction.

We also zero out the change and reference bit. This is not correct as
the architecture prefers over-indication instead of under-indication
for the keyless->keyed transition.

This patch fixes the behaviour and always sets guest change and guest
reference for all guest storage keys on the keyless -> keyed switch.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pgtable.c