|
@@ -2843,16 +2843,13 @@ static int alloc_mmu_pages(struct kvm_vcpu *vcpu)
|
|
*/
|
|
*/
|
|
page = alloc_page(GFP_KERNEL | __GFP_DMA32);
|
|
page = alloc_page(GFP_KERNEL | __GFP_DMA32);
|
|
if (!page)
|
|
if (!page)
|
|
- goto error_1;
|
|
|
|
|
|
+ return -ENOMEM;
|
|
|
|
+
|
|
vcpu->arch.mmu.pae_root = page_address(page);
|
|
vcpu->arch.mmu.pae_root = page_address(page);
|
|
for (i = 0; i < 4; ++i)
|
|
for (i = 0; i < 4; ++i)
|
|
vcpu->arch.mmu.pae_root[i] = INVALID_PAGE;
|
|
vcpu->arch.mmu.pae_root[i] = INVALID_PAGE;
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
-
|
|
|
|
-error_1:
|
|
|
|
- free_mmu_pages(vcpu);
|
|
|
|
- return -ENOMEM;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
int kvm_mmu_create(struct kvm_vcpu *vcpu)
|
|
int kvm_mmu_create(struct kvm_vcpu *vcpu)
|