From patchwork Fri May 13 12:14:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 782772 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4DCEeGm012211 for ; Fri, 13 May 2011 12:14:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932409Ab1EMMOg (ORCPT ); Fri, 13 May 2011 08:14:36 -0400 Received: from thoth.sbs.de ([192.35.17.2]:15253 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758877Ab1EMMOU (ORCPT ); Fri, 13 May 2011 08:14:20 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p4DCEBhU031680; Fri, 13 May 2011 14:14:11 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p4DCEAvD019933; Fri, 13 May 2011 14:14:11 +0200 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Cc: kvm@vger.kernel.org Subject: [PATCH 08/16] qemu-kvm: Make some private functions static Date: Fri, 13 May 2011 14:14:02 +0200 Message-Id: <76c6f911200a07cda6d6e73b4a0c7ee1159c2391.1305288845.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 13 May 2011 12:14:40 +0000 (UTC) Signed-off-by: Jan Kiszka --- qemu-kvm.c | 12 ++++++------ qemu-kvm.h | 32 -------------------------------- 2 files changed, 6 insertions(+), 38 deletions(-) diff --git a/qemu-kvm.c b/qemu-kvm.c index 8b98ec8..48c92e6 100644 --- a/qemu-kvm.c +++ b/qemu-kvm.c @@ -350,12 +350,12 @@ static int handle_mmio(CPUState *env) return 0; } -int handle_io_window(kvm_context_t kvm) +static int handle_io_window(kvm_context_t kvm) { return 1; } -int handle_shutdown(kvm_context_t kvm, CPUState *env) +static int handle_shutdown(kvm_context_t kvm, CPUState *env) { /* stop the current vcpu from going back to guest mode */ env->stopped = 1; @@ -371,14 +371,14 @@ static inline void push_nmi(kvm_context_t kvm) #endif /* KVM_CAP_USER_NMI */ } -void post_kvm_run(kvm_context_t kvm, CPUState *env) +static void post_kvm_run(kvm_context_t kvm, CPUState *env) { pthread_mutex_lock(&qemu_mutex); kvm_arch_post_run(env, env->kvm_run); cpu_single_env = env; } -int pre_kvm_run(kvm_context_t kvm, CPUState *env) +static int pre_kvm_run(kvm_context_t kvm, CPUState *env) { kvm_arch_pre_run(env, env->kvm_run); @@ -391,7 +391,7 @@ int kvm_is_ready_for_interrupt_injection(CPUState *env) return env->kvm_run->ready_for_interrupt_injection; } -int kvm_run(CPUState *env) +static int kvm_run(CPUState *env) { int r; kvm_context_t kvm = &env->kvm_state->kvm_context; @@ -984,7 +984,7 @@ int kvm_cpu_exec(CPUState *env) return 0; } -int kvm_cpu_is_stopped(CPUState *env) +static int kvm_cpu_is_stopped(CPUState *env) { return !vm_running || env->stopped; } diff --git a/qemu-kvm.h b/qemu-kvm.h index 693d554..cd9bb37 100644 --- a/qemu-kvm.h +++ b/qemu-kvm.h @@ -66,40 +66,9 @@ typedef struct kvm_context *kvm_context_t; int kvm_arch_run(CPUState *env); -int handle_halt(CPUState *env); - -int handle_shutdown(kvm_context_t kvm, CPUState *env); -void post_kvm_run(kvm_context_t kvm, CPUState *env); -int pre_kvm_run(kvm_context_t kvm, CPUState *env); -int handle_io_window(kvm_context_t kvm); -int try_push_interrupts(kvm_context_t kvm); - int kvm_create_irqchip(kvm_context_t kvm); /*! - * \brief Start the VCPU - * - * This starts the VCPU and virtualization is started.\n - * \n - * This function will not return until any of these conditions are met: - * - An IO/MMIO handler does not return "0" - * - An exception that neither the guest OS, nor KVM can handle occurs - * - * \note This function will call the callbacks registered in kvm_init() - * to emulate those functions - * \note If you at any point want to interrupt the VCPU, kvm_run() will - * listen to the EINTR signal. This allows you to simulate external interrupts - * and asyncronous IO. - * - * \param kvm Pointer to the current kvm_context - * \param vcpu Which virtual CPU should be started - * \return 0 on success, but you really shouldn't expect this function to - * return except for when an error has occured, or when you have sent it - * an EINTR signal. - */ -int kvm_run(CPUState *env); - -/*! * \brief Check if a vcpu is ready for interrupt injection * * This checks if vcpu interrupts are not masked by mov ss or sti. @@ -487,7 +456,6 @@ struct KVMState { int kvm_tpr_enable_vapic(CPUState *env); unsigned long kvm_get_thread_id(void); -int kvm_cpu_is_stopped(CPUState *env); #endif