diff options
author | Zhang Xiantao <xiantao.zhang@intel.com> | 2007-11-18 07:43:21 -0500 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:53:05 -0500 |
commit | 56c6d28a9afdca0d48dd618276e055f19c0306bb (patch) | |
tree | ca06fb0be0c107ab3031c66bfd5ecfaf651d0e04 /drivers/kvm/kvm_main.c | |
parent | 5bb064dcdeb7ab341e2f8a3e2fc34faa63b1662c (diff) |
KVM: Portability: MMU initialization and teardown split
Move out kvm_mmu init and exit functionality from kvm_main.c
Signed-off-by: Zhang Xiantao <xiantao.zhang@intel.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm_main.c')
-rw-r--r-- | drivers/kvm/kvm_main.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c index 5f11e6b09458..595ed323fc53 100644 --- a/drivers/kvm/kvm_main.c +++ b/drivers/kvm/kvm_main.c | |||
@@ -1383,10 +1383,6 @@ int kvm_init(void *opaque, unsigned int vcpu_size, | |||
1383 | int r; | 1383 | int r; |
1384 | int cpu; | 1384 | int cpu; |
1385 | 1385 | ||
1386 | r = kvm_mmu_module_init(); | ||
1387 | if (r) | ||
1388 | goto out4; | ||
1389 | |||
1390 | kvm_init_debug(); | 1386 | kvm_init_debug(); |
1391 | 1387 | ||
1392 | r = kvm_arch_init(opaque); | 1388 | r = kvm_arch_init(opaque); |
@@ -1446,8 +1442,6 @@ int kvm_init(void *opaque, unsigned int vcpu_size, | |||
1446 | kvm_preempt_ops.sched_in = kvm_sched_in; | 1442 | kvm_preempt_ops.sched_in = kvm_sched_in; |
1447 | kvm_preempt_ops.sched_out = kvm_sched_out; | 1443 | kvm_preempt_ops.sched_out = kvm_sched_out; |
1448 | 1444 | ||
1449 | kvm_mmu_set_nonpresent_ptes(0ull, 0ull); | ||
1450 | |||
1451 | return 0; | 1445 | return 0; |
1452 | 1446 | ||
1453 | out_free: | 1447 | out_free: |
@@ -1466,7 +1460,6 @@ out_free_0: | |||
1466 | out: | 1460 | out: |
1467 | kvm_arch_exit(); | 1461 | kvm_arch_exit(); |
1468 | kvm_exit_debug(); | 1462 | kvm_exit_debug(); |
1469 | kvm_mmu_module_exit(); | ||
1470 | out4: | 1463 | out4: |
1471 | return r; | 1464 | return r; |
1472 | } | 1465 | } |
@@ -1485,6 +1478,5 @@ void kvm_exit(void) | |||
1485 | kvm_arch_exit(); | 1478 | kvm_arch_exit(); |
1486 | kvm_exit_debug(); | 1479 | kvm_exit_debug(); |
1487 | __free_page(bad_page); | 1480 | __free_page(bad_page); |
1488 | kvm_mmu_module_exit(); | ||
1489 | } | 1481 | } |
1490 | EXPORT_SYMBOL_GPL(kvm_exit); | 1482 | EXPORT_SYMBOL_GPL(kvm_exit); |