You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
committed by
Avi Kivity
parent
d589444e92
commit
76fafa5e22
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user