KVM: s390: pv: properly handle page flags for protected guests
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Mon, 20 Sep 2021 13:24:54 +0000 (15:24 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 27 Oct 2021 05:55:53 +0000 (07:55 +0200)
commit380d97bd02fca7b9b41aec2d1c767874d602bc78
tree8e9f822ec608744ebcb9f4e5ddb293936e59393a
parent85f517b29418158d3e6e90c3f0fc01b306d2f1a1
KVM: s390: pv: properly handle page flags for protected guests

Introduce variants of the convert and destroy page functions that also
clear the PG_arch_1 bit used to mark them as secure pages.

The PG_arch_1 flag is always allowed to overindicate; using the new
functions introduced here allows to reduce the extent of overindication
and thus improve performance.

These new functions can only be called on pages for which a reference
is already being held.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Link: https://lore.kernel.org/r/20210920132502.36111-7-imbrenda@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/pgtable.h
arch/s390/include/asm/uv.h
arch/s390/kernel/uv.c
arch/s390/mm/gmap.c