From patchwork Fri Jul 24 17:46:37 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Glauber Costa X-Patchwork-Id: 37161 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 n6OHkfGb004855 for ; Fri, 24 Jul 2009 17:46:41 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753351AbZGXRqj (ORCPT ); Fri, 24 Jul 2009 13:46:39 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753345AbZGXRqj (ORCPT ); Fri, 24 Jul 2009 13:46:39 -0400 Received: from mx2.redhat.com ([66.187.237.31]:51583 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753143AbZGXRqi (ORCPT ); Fri, 24 Jul 2009 13:46:38 -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 n6OHkcF3009539 for ; Fri, 24 Jul 2009 13:46:38 -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 n6OHkbuD017151; Fri, 24 Jul 2009 13:46:38 -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 n6OHkb4J019622; Fri, 24 Jul 2009 13:46:37 -0400 From: Glauber Costa To: kvm@vger.kernel.org Cc: avi@redhat.com Subject: [PATCH] remove useless wrappers around functions Date: Fri, 24 Jul 2009 13:46:37 -0400 Message-Id: <1248457597-436-1-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 Some more cleanup from the libkvm era. Functions that starts with kvm_qemu_yyy just to wrap a kvm_yyy. I'm removing it, and changing the name of one of them to match upstream. Signed-off-by: Glauber Costa --- qemu-kvm-ia64.c | 2 +- qemu-kvm-x86.c | 2 +- qemu-kvm.c | 12 +----------- qemu-kvm.h | 5 +---- 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/qemu-kvm-ia64.c b/qemu-kvm-ia64.c index b8a2587..062fbd4 100644 --- a/qemu-kvm-ia64.c +++ b/qemu-kvm-ia64.c @@ -25,7 +25,7 @@ void kvm_arch_save_regs(CPUState *env) { } -int kvm_arch_qemu_init_env(CPUState *cenv) +int kvm_arch_init_vcpu(CPUState *cenv) { return 0; } diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c index 0a42455..2af9e3f 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -1257,7 +1257,7 @@ static void kvm_trim_features(uint32_t *features, uint32_t supported) } } -int kvm_arch_qemu_init_env(CPUState *cenv) +int kvm_arch_init_vcpu(CPUState *cenv) { struct kvm_cpuid_entry2 cpuid_ent[100]; #ifdef KVM_CPUID_SIGNATURE diff --git a/qemu-kvm.c b/qemu-kvm.c index fdf71a8..b9164ee 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -1890,7 +1890,7 @@ static int kvm_main_loop_cpu(CPUState *env) pthread_mutex_lock(&qemu_mutex); - kvm_qemu_init_env(env); + kvm_arch_init_vcpu(env); #ifdef TARGET_I386 kvm_tpr_vcpu_start(env); #endif @@ -2336,16 +2336,6 @@ int kvm_setup_guest_memory(void *area, unsigned long size) return ret; } -int kvm_qemu_check_extension(int ext) -{ - return kvm_check_extension(kvm_state, ext); -} - -int kvm_qemu_init_env(CPUState *cenv) -{ - return kvm_arch_qemu_init_env(cenv); -} - #ifdef KVM_CAP_SET_GUEST_DEBUG struct kvm_set_guest_debug_data { diff --git a/qemu-kvm.h b/qemu-kvm.h index 5eb1ee5..1e5d89a 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -938,7 +938,6 @@ struct kvm_pit_state { }; int kvm_main_loop(void); -int kvm_qemu_init(void); int kvm_init_ap(void); int kvm_vcpu_inited(CPUState *env); void kvm_load_registers(CPUState *env); @@ -952,8 +951,6 @@ int kvm_remove_breakpoint(CPUState *current_env, target_ulong addr, target_ulong len, int type); void kvm_remove_all_breakpoints(CPUState *current_env); int kvm_update_guest_debug(CPUState *env, unsigned long reinject_trap); -int kvm_qemu_init_env(CPUState *env); -int kvm_qemu_check_extension(int ext); void kvm_apic_init(CPUState *env); /* called from vcpu initialization */ void qemu_kvm_load_lapic(CPUState *env); @@ -992,7 +989,7 @@ void kvm_arch_save_regs(CPUState *env); void kvm_arch_load_regs(CPUState *env); void kvm_arch_load_mpstate(CPUState *env); void kvm_arch_save_mpstate(CPUState *env); -int kvm_arch_qemu_init_env(CPUState *cenv); +int kvm_arch_init_vcpu(CPUState *cenv); void kvm_arch_pre_kvm_run(void *opaque, CPUState *env); void kvm_arch_post_kvm_run(void *opaque, CPUState *env); int kvm_arch_has_work(CPUState *env);