From patchwork Mon Feb 7 11:19:20 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 82227 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 937E2B7143 for ; Tue, 8 Feb 2011 10:22:50 +1100 (EST) Received: from localhost ([127.0.0.1]:60714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmPXz-0006bF-5Z for incoming@patchwork.ozlabs.org; Mon, 07 Feb 2011 06:46:23 -0500 Received: from [140.186.70.92] (port=45778 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PmP82-0006py-BM for qemu-devel@nongnu.org; Mon, 07 Feb 2011 06:19:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PmP7y-0007wk-8Q for qemu-devel@nongnu.org; Mon, 07 Feb 2011 06:19:34 -0500 Received: from thoth.sbs.de ([192.35.17.2]:17928) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PmP7x-0007vO-NX for qemu-devel@nongnu.org; Mon, 07 Feb 2011 06:19:30 -0500 Received: from mail1.siemens.de (localhost [127.0.0.1]) by thoth.sbs.de (8.13.6/8.13.6) with ESMTP id p17BJSk6011457; Mon, 7 Feb 2011 12:19:28 +0100 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p17BJQKQ027537; Mon, 7 Feb 2011 12:19:28 +0100 From: Jan Kiszka To: Avi Kivity , Marcelo Tosatti Date: Mon, 7 Feb 2011 12:19:20 +0100 Message-Id: <1407f55f19dd8f193ee33495014fd2985ec7a88c.1297077507.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.2 Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Alexander Graf Subject: [Qemu-devel] [PATCH 09/15] kvm: Drop return values from kvm_arch_pre/post_run X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We do not check them, and the only arch with non-empty implementations always returns 0 (this is also true for qemu-kvm). Signed-off-by: Jan Kiszka CC: Alexander Graf --- kvm.h | 5 ++--- target-i386/kvm.c | 8 ++------ target-ppc/kvm.c | 6 ++---- target-s390x/kvm.c | 6 ++---- 4 files changed, 8 insertions(+), 17 deletions(-) diff --git a/kvm.h b/kvm.h index b2fb5c6..7a4d550 100644 --- a/kvm.h +++ b/kvm.h @@ -99,12 +99,11 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...); extern const KVMCapabilityInfo kvm_arch_required_capabilities[]; -int kvm_arch_post_run(CPUState *env, struct kvm_run *run); +void kvm_arch_pre_run(CPUState *env, struct kvm_run *run); +void kvm_arch_post_run(CPUState *env, struct kvm_run *run); int kvm_arch_handle_exit(CPUState *env, struct kvm_run *run); -int kvm_arch_pre_run(CPUState *env, struct kvm_run *run); - int kvm_arch_process_irqchip_events(CPUState *env); int kvm_arch_get_registers(CPUState *env); diff --git a/target-i386/kvm.c b/target-i386/kvm.c index f02f478..8668cb3 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -1440,7 +1440,7 @@ int kvm_arch_get_registers(CPUState *env) return 0; } -int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) +void kvm_arch_pre_run(CPUState *env, struct kvm_run *run) { /* Inject NMI */ if (env->interrupt_request & CPU_INTERRUPT_NMI) { @@ -1486,11 +1486,9 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) DPRINTF("setting tpr\n"); run->cr8 = cpu_get_apic_tpr(env->apic_state); } - - return 0; } -int kvm_arch_post_run(CPUState *env, struct kvm_run *run) +void kvm_arch_post_run(CPUState *env, struct kvm_run *run) { if (run->if_flag) { env->eflags |= IF_MASK; @@ -1499,8 +1497,6 @@ int kvm_arch_post_run(CPUState *env, struct kvm_run *run) } cpu_set_apic_tpr(env->apic_state, run->cr8); cpu_set_apic_base(env->apic_state, run->apic_base); - - return 0; } int kvm_arch_process_irqchip_events(CPUState *env) diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 93ecc57..bd4012a 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -256,14 +256,12 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) return 0; } -int kvm_arch_post_run(CPUState *env, struct kvm_run *run) +void kvm_arch_post_run(CPUState *env, struct kvm_run *run) { - return 0; } -int kvm_arch_process_irqchip_events(CPUState *env) +void kvm_arch_process_irqchip_events(CPUState *env) { - return 0; } static int kvmppc_handle_halt(CPUState *env) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c index 1702c46..b349812 100644 --- a/target-s390x/kvm.c +++ b/target-s390x/kvm.c @@ -169,14 +169,12 @@ int kvm_arch_remove_sw_breakpoint(CPUState *env, struct kvm_sw_breakpoint *bp) return 0; } -int kvm_arch_pre_run(CPUState *env, struct kvm_run *run) +void kvm_arch_pre_run(CPUState *env, struct kvm_run *run) { - return 0; } -int kvm_arch_post_run(CPUState *env, struct kvm_run *run) +void kvm_arch_post_run(CPUState *env, struct kvm_run *run) { - return 0; } int kvm_arch_process_irqchip_events(CPUState *env)