]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf17558938e0861e8f32e2dac02f4b36d54d0edb1
tree0fc4bc83a0028e464791c35709aabc36eb3feb21
parent975ec60e93d94d67c5ab72e45c5018692f3ee914
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