]> git.openfabrics.org - ~emulex/infiniband.git/commit
KVM: s390: add architecture compliant guest access functions
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 1 Jan 2014 15:26:52 +0000 (16:26 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 22 Apr 2014 11:24:38 +0000 (13:24 +0200)
commit2293897805c2fea69e45aca31b3589d4590af89d
tree21fc9661bc2936bca9ba3054f02613859c53d663
parentd95fb12ff4d73e897126043bb5d03a068997a2ef
KVM: s390: add architecture compliant guest access functions

The new guest memory access function write_guest() and read_guest() can be
used to access guest memory in an architecture compliant way.
These functions will look at the vcpu's PSW and select the correct address
space for memory access and also perform correct address wrap around.
In case DAT is turned on, page tables will be walked otherwise access will
happen to real or absolute memory.

Any access exception will be recognized and exception data will be stored
in the vcpu's kvm_vcpu_arch.pgm member. Subsequently an exception can be
injected if necessary.

Missing are:
- key protection checks
- access register mode support
- program event recording support

This patch also adds write_guest_real(), read_guest_real(),
write_guest_absolute() and read_guest_absolute() guest functions which can
be used to access real and absolute storage. These functions currently do
not perform any access checks, since there is no use case (yet?).

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reviewed-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/Makefile
arch/s390/kvm/gaccess.c [new file with mode: 0644]
arch/s390/kvm/gaccess.h