aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kvm/x86.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8a90403272e2..77d57ff3d74e 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2187,12 +2187,6 @@ int kvm_arch_init(void *opaque)
2187 int r; 2187 int r;
2188 struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque; 2188 struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
2189 2189
2190 r = kvm_mmu_module_init();
2191 if (r)
2192 goto out_fail;
2193
2194 kvm_init_msr_list();
2195
2196 if (kvm_x86_ops) { 2190 if (kvm_x86_ops) {
2197 printk(KERN_ERR "kvm: already loaded the other module\n"); 2191 printk(KERN_ERR "kvm: already loaded the other module\n");
2198 r = -EEXIST; 2192 r = -EEXIST;
@@ -2210,13 +2204,17 @@ int kvm_arch_init(void *opaque)
2210 goto out; 2204 goto out;
2211 } 2205 }
2212 2206
2207 r = kvm_mmu_module_init();
2208 if (r)
2209 goto out;
2210
2211 kvm_init_msr_list();
2212
2213 kvm_x86_ops = ops; 2213 kvm_x86_ops = ops;
2214 kvm_mmu_set_nonpresent_ptes(0ull, 0ull); 2214 kvm_mmu_set_nonpresent_ptes(0ull, 0ull);
2215 return 0; 2215 return 0;
2216 2216
2217out: 2217out:
2218 kvm_mmu_module_exit();
2219out_fail:
2220 return r; 2218 return r;
2221} 2219}
2222 2220