|
@@ -514,7 +514,7 @@ static int kvm_s390_set_tod_high(struct kvm *kvm, struct kvm_device_attr *attr)
|
|
|
|
|
|
if (gtod_high != 0)
|
|
|
return -EINVAL;
|
|
|
- VM_EVENT(kvm, 3, "SET: TOD extension: 0x%x\n", gtod_high);
|
|
|
+ VM_EVENT(kvm, 3, "SET: TOD extension: 0x%x", gtod_high);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -527,7 +527,7 @@ static int kvm_s390_set_tod_low(struct kvm *kvm, struct kvm_device_attr *attr)
|
|
|
return -EFAULT;
|
|
|
|
|
|
kvm_s390_set_tod_clock(kvm, gtod);
|
|
|
- VM_EVENT(kvm, 3, "SET: TOD base: 0x%llx\n", gtod);
|
|
|
+ VM_EVENT(kvm, 3, "SET: TOD base: 0x%llx", gtod);
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -559,7 +559,7 @@ static int kvm_s390_get_tod_high(struct kvm *kvm, struct kvm_device_attr *attr)
|
|
|
if (copy_to_user((void __user *)attr->addr, >od_high,
|
|
|
sizeof(gtod_high)))
|
|
|
return -EFAULT;
|
|
|
- VM_EVENT(kvm, 3, "QUERY: TOD extension: 0x%x\n", gtod_high);
|
|
|
+ VM_EVENT(kvm, 3, "QUERY: TOD extension: 0x%x", gtod_high);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -571,7 +571,7 @@ static int kvm_s390_get_tod_low(struct kvm *kvm, struct kvm_device_attr *attr)
|
|
|
gtod = kvm_s390_get_tod_clock_fast(kvm);
|
|
|
if (copy_to_user((void __user *)attr->addr, >od, sizeof(gtod)))
|
|
|
return -EFAULT;
|
|
|
- VM_EVENT(kvm, 3, "QUERY: TOD base: 0x%llx\n", gtod);
|
|
|
+ VM_EVENT(kvm, 3, "QUERY: TOD base: 0x%llx", gtod);
|
|
|
|
|
|
return 0;
|
|
|
}
|
|
@@ -1098,7 +1098,9 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
|
|
|
if (!kvm->arch.sca)
|
|
|
goto out_err;
|
|
|
spin_lock(&kvm_lock);
|
|
|
- sca_offset = (sca_offset + 16) & 0x7f0;
|
|
|
+ sca_offset += 16;
|
|
|
+ if (sca_offset + sizeof(struct sca_block) > PAGE_SIZE)
|
|
|
+ sca_offset = 0;
|
|
|
kvm->arch.sca = (struct sca_block *) ((char *) kvm->arch.sca + sca_offset);
|
|
|
spin_unlock(&kvm_lock);
|
|
|
|