Signed-off-by: Glauber Costa <glommer@xxxxxxxxxx> --- qemu-kvm.c | 11 +++-------- qemu-kvm.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-) 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); -- 1.6.2.2 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html