From patchwork Mon Jul 6 20:12:50 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 34304 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n66KD1P8007173 for ; Mon, 6 Jul 2009 20:13:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753836AbZGFUMz (ORCPT ); Mon, 6 Jul 2009 16:12:55 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753679AbZGFUMy (ORCPT ); Mon, 6 Jul 2009 16:12:54 -0400 Received: from mx2.redhat.com ([66.187.237.31]:59236 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753442AbZGFUMv (ORCPT ); Mon, 6 Jul 2009 16:12:51 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n66KCtXr016523 for ; Mon, 6 Jul 2009 16:12:55 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n66KCsix031462; Mon, 6 Jul 2009 16:12:54 -0400 Received: from localhost.localdomain (virtlab1.virt.bos.redhat.com [10.16.72.21]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n66KCrSV031854; Mon, 6 Jul 2009 16:12:54 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH v3 3/5] kvm finalize Date: Mon, 6 Jul 2009 16:12:50 -0400 Message-Id: <1246911172-5869-4-git-send-email-glommer@redhat.com> In-Reply-To: <1246911172-5869-3-git-send-email-glommer@redhat.com> References: <1246911172-5869-1-git-send-email-glommer@redhat.com> <1246911172-5869-2-git-send-email-glommer@redhat.com> <1246911172-5869-3-git-send-email-glommer@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Signed-off-by: Glauber Costa --- 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);