]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: add kvm_s390_logical_to_effective() helper
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 1 Jan 2014 15:21:47 +0000 (16:21 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 22 Apr 2014 11:24:36 +0000 (13:24 +0200)
commit3589fb812e106e6fe7922bfd497b55d37462e2a3
tree1115e696a1e8470e8bb2941b21ef68f4542a26e7
parent3ad52c3f3d8e03d1f10c7e4ab1675f5cb9d4859d
KVM: s390: add kvm_s390_logical_to_effective() helper

Add kvm_s390_logical_to_effective() helper which converts a guest vcpu's
logical storage address to a guest vcpu effective address by applying the
rules of the vcpu's addressing mode defined by PSW bits 31 and 32
(extendended and basic addressing mode).
Depending on the vcpu's addressing mode the upper 40 bits (24 bit addressing
mode), 33 bits (31 bit addressing mode) or no bits (64 bit addressing mode)
will be zeroed and the remaining bits will be returned.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/gaccess.h