KVM: Hoist kvm_create_lapic() into kvm_vcpu_init()
commit76fafa5e22bd82e92d2734852ba23f17322d675a
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 8 Oct 2007 00:50:48 +0000 (8 10:50 +1000)
committerAvi Kivity <avi@qumranet.com>
Wed, 30 Jan 2008 15:52:50 +0000 (30 17:52 +0200)
treef7b81035e86b5b26cbb2d2d13958c805f4990589
parentd589444e924bc72e42fa94853f9096589d69374d
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 <rusty@rustcorp.com.au>
Signed-off-by: Avi Kivity <avi@qumranet.com>
drivers/kvm/kvm_main.c
drivers/kvm/svm.c
drivers/kvm/vmx.c