aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kvm/kvm-s390.c6
-rw-r--r--arch/s390/kvm/kvm-s390.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 49292869a5cd..8093e6f47f49 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -341,11 +341,13 @@ struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm,
341 341
342 rc = kvm_vcpu_init(vcpu, kvm, id); 342 rc = kvm_vcpu_init(vcpu, kvm, id);
343 if (rc) 343 if (rc)
344 goto out_free_cpu; 344 goto out_free_sie_block;
345 VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu, 345 VM_EVENT(kvm, 3, "create cpu %d at %p, sie block at %p", id, vcpu,
346 vcpu->arch.sie_block); 346 vcpu->arch.sie_block);
347 347
348 return vcpu; 348 return vcpu;
349out_free_sie_block:
350 free_page((unsigned long)(vcpu->arch.sie_block));
349out_free_cpu: 351out_free_cpu:
350 kfree(vcpu); 352 kfree(vcpu);
351out_nomem: 353out_nomem:
@@ -750,7 +752,7 @@ gfn_t unalias_gfn(struct kvm *kvm, gfn_t gfn)
750static int __init kvm_s390_init(void) 752static int __init kvm_s390_init(void)
751{ 753{
752 int ret; 754 int ret;
753 ret = kvm_init(NULL, sizeof(struct kvm_vcpu), THIS_MODULE); 755 ret = kvm_init(NULL, sizeof(struct kvm_vcpu), 0, THIS_MODULE);
754 if (ret) 756 if (ret)
755 return ret; 757 return ret;
756 758
diff --git a/arch/s390/kvm/kvm-s390.h b/arch/s390/kvm/kvm-s390.h
index 60f09ab3672c..cfa9d1777457 100644
--- a/arch/s390/kvm/kvm-s390.h
+++ b/arch/s390/kvm/kvm-s390.h
@@ -72,7 +72,7 @@ static inline void kvm_s390_vcpu_set_mem(struct kvm_vcpu *vcpu)
72 struct kvm_memslots *memslots; 72 struct kvm_memslots *memslots;
73 73
74 idx = srcu_read_lock(&vcpu->kvm->srcu); 74 idx = srcu_read_lock(&vcpu->kvm->srcu);
75 memslots = rcu_dereference(vcpu->kvm->memslots); 75 memslots = kvm_memslots(vcpu->kvm);
76 76
77 mem = &memslots->memslots[0]; 77 mem = &memslots->memslots[0];
78 78