diff options
author | Thomas Huth <thuth@linux.vnet.ibm.com> | 2014-02-04 08:48:07 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-05-30 03:39:36 -0400 |
commit | a0465f9ae4758207264a1318bb8aed617c0ea959 (patch) | |
tree | 5ffee52ce78ef810c6ac70fd277eb32046060a78 /arch/s390/kvm/gaccess.h | |
parent | 9fbc02760d61fddc7716f9e6aa6ed1ff33e65405 (diff) |
KVM: s390: Enable DAT support for TPROT handler
The TPROT instruction can be used to check the accessability of storage
for any kind of logical addresses. So far, our handler only supported
real addresses. This patch now also enables support for addresses that
have to be translated via DAT first. And while we're at it, change the
code to use the common KVM function gfn_to_hva_prot() to check for the
validity and writability of the memory page.
Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'arch/s390/kvm/gaccess.h')
-rw-r--r-- | arch/s390/kvm/gaccess.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/kvm/gaccess.h b/arch/s390/kvm/gaccess.h index 2d37a46195e2..0149cf15058a 100644 --- a/arch/s390/kvm/gaccess.h +++ b/arch/s390/kvm/gaccess.h | |||
@@ -327,6 +327,8 @@ int read_guest_real(struct kvm_vcpu *vcpu, unsigned long gra, void *data, | |||
327 | return access_guest_real(vcpu, gra, data, len, 0); | 327 | return access_guest_real(vcpu, gra, data, len, 0); |
328 | } | 328 | } |
329 | 329 | ||
330 | void ipte_lock(struct kvm_vcpu *vcpu); | ||
331 | void ipte_unlock(struct kvm_vcpu *vcpu); | ||
330 | int ipte_lock_held(struct kvm_vcpu *vcpu); | 332 | int ipte_lock_held(struct kvm_vcpu *vcpu); |
331 | int kvm_s390_check_low_addr_protection(struct kvm_vcpu *vcpu, unsigned long ga); | 333 | int kvm_s390_check_low_addr_protection(struct kvm_vcpu *vcpu, unsigned long ga); |
332 | 334 | ||