aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2014-01-01 10:52:47 -0500
committerChristian Borntraeger <borntraeger@de.ibm.com>2014-04-22 07:24:43 -0400
commitf748f4a7ec549febb76e86082d9445beff1e9b01 (patch)
tree6bf3de28d2a3c1a33fa4e555c39c1183f701c330
parent0e7a3f9405d327bdc55ef1cdca7b63486b1916a0 (diff)
KVM: s390: convert handle_store_prefix()
Convert handle_store_prefix() to new guest access functions. 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>
-rw-r--r--arch/s390/kvm/priv.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c
index 9648504d7818..306caa27b962 100644
--- a/arch/s390/kvm/priv.c
+++ b/arch/s390/kvm/priv.c
@@ -106,6 +106,7 @@ static int handle_store_prefix(struct kvm_vcpu *vcpu)
106{ 106{
107 u64 operand2; 107 u64 operand2;
108 u32 address; 108 u32 address;
109 int rc;
109 110
110 vcpu->stat.instruction_stpx++; 111 vcpu->stat.instruction_stpx++;
111 112
@@ -122,8 +123,9 @@ static int handle_store_prefix(struct kvm_vcpu *vcpu)
122 address = address & 0x7fffe000u; 123 address = address & 0x7fffe000u;
123 124
124 /* get the value */ 125 /* get the value */
125 if (put_guest(vcpu, address, (u32 __user *)operand2)) 126 rc = write_guest(vcpu, operand2, &address, sizeof(address));
126 return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); 127 if (rc)
128 return kvm_s390_inject_prog_cond(vcpu, rc);
127 129
128 VCPU_EVENT(vcpu, 5, "storing prefix to %x", address); 130 VCPU_EVENT(vcpu, 5, "storing prefix to %x", address);
129 trace_kvm_s390_handle_prefix(vcpu, 0, address); 131 trace_kvm_s390_handle_prefix(vcpu, 0, address);