@@ -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)
{
@@ -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);
Signed-off-by: Glauber Costa <glommer@redhat.com> --- qemu-kvm.c | 11 +++-------- qemu-kvm.h | 1 - 2 files changed, 3 insertions(+), 9 deletions(-)