From 76fafa5e22bd82e92d2734852ba23f17322d675a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 8 Oct 2007 10:50:48 +1000 Subject: KVM: Hoist kvm_create_lapic() into kvm_vcpu_init() Move kvm_create_lapic() into kvm_vcpu_init(), rather than having svm and vmx do it. And make it return the error rather than a fairly random -ENOMEM. This also solves the problem that neither svm.c nor vmx.c actually handles the error path properly. Signed-off-by: Rusty Russell Signed-off-by: Avi Kivity --- drivers/kvm/svm.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'drivers/kvm/svm.c') diff --git a/drivers/kvm/svm.c b/drivers/kvm/svm.c index f268bd51f337..fb2e591d5397 100644 --- a/drivers/kvm/svm.c +++ b/drivers/kvm/svm.c @@ -588,12 +588,6 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) if (err) goto free_svm; - if (irqchip_in_kernel(kvm)) { - err = kvm_create_lapic(&svm->vcpu); - if (err < 0) - goto free_svm; - } - page = alloc_page(GFP_KERNEL); if (!page) { err = -ENOMEM; -- cgit v1.2.2