Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=97db56ce6cc2a0766b536cc227a1da20acc5d82f
Commit:     97db56ce6cc2a0766b536cc227a1da20acc5d82f
Parent:     75e68e607896c84310dee37c783c45220e56ce8c
Author:     Avi Kivity <[EMAIL PROTECTED]>
AuthorDate: Sun Jan 13 13:23:56 2008 +0200
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 18:01:22 2008 +0200

    KVM: Initialize the mmu caches only after verifying cpu support
    
    Otherwise we re-initialize the mmu caches, which will fail since the
    caches are already registered, which will cause us to deinitialize said 
caches.
    
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 arch/x86/kvm/x86.c |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 8a90403..77d57ff 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -2187,12 +2187,6 @@ int kvm_arch_init(void *opaque)
        int r;
        struct kvm_x86_ops *ops = (struct kvm_x86_ops *)opaque;
 
-       r = kvm_mmu_module_init();
-       if (r)
-               goto out_fail;
-
-       kvm_init_msr_list();
-
        if (kvm_x86_ops) {
                printk(KERN_ERR "kvm: already loaded the other module\n");
                r = -EEXIST;
@@ -2210,13 +2204,17 @@ int kvm_arch_init(void *opaque)
                goto out;
        }
 
+       r = kvm_mmu_module_init();
+       if (r)
+               goto out;
+
+       kvm_init_msr_list();
+
        kvm_x86_ops = ops;
        kvm_mmu_set_nonpresent_ptes(0ull, 0ull);
        return 0;
 
 out:
-       kvm_mmu_module_exit();
-out_fail:
        return r;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to