KVM: s390: fix in memory copy of facility lists
authorMichael Mueller <mimu@linux.vnet.ibm.com>
Thu, 26 Feb 2015 11:12:40 +0000 (12:12 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 4 Mar 2015 09:33:24 +0000 (10:33 +0100)
The facility lists were not fully copied.

Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/kvm-s390.c

index 18965f91d39e24e201d7308c119fd6eb78a657b1..76894c8db4d73e0cbad2c8df1f05a5753db139f0 100644 (file)
@@ -579,7 +579,7 @@ static int kvm_s390_get_machine(struct kvm *kvm, struct kvm_device_attr *attr)
        memcpy(&mach->fac_mask, kvm_s390_fac_list_mask,
               kvm_s390_fac_list_mask_size() * sizeof(u64));
        memcpy((unsigned long *)&mach->fac_list, S390_lowcore.stfle_fac_list,
-              S390_ARCH_FAC_LIST_SIZE_U64);
+              S390_ARCH_FAC_LIST_SIZE_BYTE);
        if (copy_to_user((void __user *)attr->addr, mach, sizeof(*mach)))
                ret = -EFAULT;
        kfree(mach);
@@ -903,7 +903,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
                goto out_nofac;
 
        memcpy(kvm->arch.model.fac->kvm, S390_lowcore.stfle_fac_list,
-              S390_ARCH_FAC_LIST_SIZE_U64);
+              S390_ARCH_FAC_LIST_SIZE_BYTE);
 
        /*
         * If this KVM host runs *not* in a LPAR, relax the facility bits