KVM: s390: split kvm_s390_logical_to_effective
authorClaudio Imbrenda <imbrenda@linux.ibm.com>
Tue, 2 Mar 2021 12:36:44 +0000 (13:36 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 9 Mar 2021 09:16:56 +0000 (10:16 +0100)
commitf85f1baaa18932a041fd2b1c2ca6cfd9898c7d2b
tree6f1f071911202ff07ba25eec9906daf5b73c63da
parent87e28a15c42cc592009c32a8c20e5789059027c2
KVM: s390: split kvm_s390_logical_to_effective

Split kvm_s390_logical_to_effective to a generic function called
_kvm_s390_logical_to_effective. The new function takes a PSW and an address
and returns the address with the appropriate bits masked off. The old
function now calls the new function with the appropriate PSW from the vCPU.

This is needed to avoid code duplication for vSIE.

Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: stable@vger.kernel.org # for VSIE: correctly handle MVPG when in VSIE
Link: https://lore.kernel.org/r/20210302174443.514363-2-imbrenda@linux.ibm.com
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/gaccess.h