aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kvm/powerpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
-rw-r--r--arch/powerpc/kvm/powerpc.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c
index 8d0aaf96d838..237f3ba68d27 100644
--- a/arch/powerpc/kvm/powerpc.c
+++ b/arch/powerpc/kvm/powerpc.c
@@ -171,31 +171,12 @@ void kvm_arch_flush_shadow(struct kvm *kvm)
171 171
172struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id) 172struct kvm_vcpu *kvm_arch_vcpu_create(struct kvm *kvm, unsigned int id)
173{ 173{
174 struct kvm_vcpu *vcpu; 174 return kvmppc_core_vcpu_create(kvm, id);
175 int err;
176
177 vcpu = kmem_cache_zalloc(kvm_vcpu_cache, GFP_KERNEL);
178 if (!vcpu) {
179 err = -ENOMEM;
180 goto out;
181 }
182
183 err = kvm_vcpu_init(vcpu, kvm, id);
184 if (err)
185 goto free_vcpu;
186
187 return vcpu;
188
189free_vcpu:
190 kmem_cache_free(kvm_vcpu_cache, vcpu);
191out:
192 return ERR_PTR(err);
193} 175}
194 176
195void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu) 177void kvm_arch_vcpu_free(struct kvm_vcpu *vcpu)
196{ 178{
197 kvm_vcpu_uninit(vcpu); 179 kvmppc_core_vcpu_free(vcpu);
198 kmem_cache_free(kvm_vcpu_cache, vcpu);
199} 180}
200 181
201void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu) 182void kvm_arch_vcpu_destroy(struct kvm_vcpu *vcpu)