KVM: s390: convert handle_stfl()
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 1 Jan 2014 15:56:41 +0000 (16:56 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 22 Apr 2014 11:24:40 +0000 (13:24 +0200)
Convert handle_stfl() 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>
arch/s390/kvm/priv.c

index 4792f1df921a70bbab9c853985d66706851197ad..7066fc5bf48a64632c970dd5346ec6d9ab9179bb 100644 (file)
@@ -318,10 +318,10 @@ static int handle_stfl(struct kvm_vcpu *vcpu)
        if (vcpu->arch.sie_block->gpsw.mask & PSW_MASK_PSTATE)
                return kvm_s390_inject_program_int(vcpu, PGM_PRIVILEGED_OP);
 
-       rc = copy_to_guest(vcpu, offsetof(struct _lowcore, stfl_fac_list),
-                          vfacilities, 4);
+       rc = write_guest_lc(vcpu, offsetof(struct _lowcore, stfl_fac_list),
+                           vfacilities, 4);
        if (rc)
-               return kvm_s390_inject_program_int(vcpu, PGM_ADDRESSING);
+               return rc;
        VCPU_EVENT(vcpu, 5, "store facility list value %x",
                   *(unsigned int *) vfacilities);
        trace_kvm_s390_handle_stfl(vcpu, *(unsigned int *) vfacilities);