From: Glauber Costa <[email protected]>

All it does is call kvm_finalize(); call that directly.

Signed-off-by: Glauber Costa <[email protected]>
Signed-off-by: Avi Kivity <[email protected]>

diff --git a/qemu-kvm.c b/qemu-kvm.c
index e4af96e..3b5326e 100644
--- a/qemu-kvm.c
+++ b/qemu-kvm.c
@@ -2262,12 +2262,12 @@ int kvm_qemu_create_context(void)
         kvm_disable_pit_creation(kvm_context);
     }
     if (kvm_create(kvm_context, 0, NULL) < 0) {
-       kvm_qemu_destroy();
-       return -1;
+       kvm_finalize(kvm_context);
+       return -1;
     }
     r = kvm_arch_qemu_create_context();
     if(r <0)
-       kvm_qemu_destroy();
+       kvm_finalize(kvm_context);
     if (kvm_pit && !kvm_pit_reinject) {
         if (kvm_reinject_control(kvm_context, 0)) {
             fprintf(stderr, "failure to disable in-kernel PIT reinjection\n");
@@ -2286,11 +2286,6 @@ int kvm_qemu_create_context(void)
     return 0;
 }
 
-void kvm_qemu_destroy(void)
-{
-    kvm_finalize(kvm_context);
-}
-
 #ifdef TARGET_I386
 static int must_use_aliases_source(target_phys_addr_t addr)
 {
diff --git a/qemu-kvm.h b/qemu-kvm.h
index 0322feb..10f0a80 100644
--- a/qemu-kvm.h
+++ b/qemu-kvm.h
@@ -19,7 +19,6 @@ int kvm_qemu_init(void);
 int kvm_qemu_create_context(void);
 int kvm_init_ap(void);
 int kvm_vcpu_inited(CPUState *env);
-void kvm_qemu_destroy(void);
 void kvm_load_registers(CPUState *env);
 void kvm_save_registers(CPUState *env);
 void kvm_load_mpstate(CPUState *env);
--
To unsubscribe from this list: send the line "unsubscribe kvm-commits" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to