diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2014-01-01 10:58:16 -0500 |
---|---|---|
committer | Christian Borntraeger <borntraeger@de.ibm.com> | 2014-04-22 07:24:45 -0400 |
commit | 7d777d78241d98bbd75886a8d09a3c793eafc807 (patch) | |
tree | 5b83065c53e55365251f91a70178eefcc0f5d072 /arch/s390/kvm | |
parent | 2d8bcaeda1576ddd970629a6afb9a188c83cd409 (diff) |
KVM: s390: convert handle_stidp()
Convert handle_stidp() 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>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r-- | arch/s390/kvm/priv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 2de74543bd07..bc969722a293 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c | |||
@@ -428,7 +428,9 @@ static int handle_lpswe(struct kvm_vcpu *vcpu) | |||
428 | 428 | ||
429 | static int handle_stidp(struct kvm_vcpu *vcpu) | 429 | static int handle_stidp(struct kvm_vcpu *vcpu) |
430 | { | 430 | { |
431 | u64 stidp_data = vcpu->arch.stidp_data; | ||
431 | u64 operand2; | 432 | u64 operand2; |
433 | int rc; | ||
432 | 434 | ||
433 | vcpu->stat.instruction_stidp++; | 435 | vcpu->stat.instruction_stidp++; |
434 | 436 | ||
@@ -440,8 +442,9 @@ static int handle_stidp(struct kvm_vcpu *vcpu) | |||
440 | if (operand2 & 7) | 442 | if (operand2 & 7) |
441 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); | 443 | return kvm_s390_inject_program_int(vcpu, PGM_SPECIFICATION); |
442 | 444 | ||
443 | if (put_guest(vcpu, vcpu->arch.stidp_data, (u64 __user *)operand2)) | 445 | rc = write_guest(vcpu, operand2, &stidp_data, sizeof(stidp_data)); |
444 | return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING); | 446 | if (rc) |
447 | return kvm_s390_inject_prog_cond(vcpu, rc); | ||
445 | 448 | ||
446 | VCPU_EVENT(vcpu, 5, "%s", "store cpu id"); | 449 | VCPU_EVENT(vcpu, 5, "%s", "store cpu id"); |
447 | return 0; | 450 | return 0; |