From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: [PATCH 31/37] kvm: Drop return values from kvm_arch_pre/post_run Date: Mon, 14 Feb 2011 13:23:00 -0200 Message-ID: <7a39fe588251ba042c91bf23d53b0ba820bf964c.1297696986.git.mtosatti@redhat.com> References: Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org, Jan Kiszka , Alexander Graf , Marcelo Tosatti To: Anthony Liguori Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50617 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755772Ab1BNPZE (ORCPT ); Mon, 14 Feb 2011 10:25:04 -0500 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: From: Jan Kiszka 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 Signed-off-by: Marcelo Tosatti --- 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) -- 1.7.4 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57984 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pp0IU-0000FK-8K for qemu-devel@nongnu.org; Mon, 14 Feb 2011 10:25:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pp0IM-000434-V9 for qemu-devel@nongnu.org; Mon, 14 Feb 2011 10:25:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:22688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pp0IM-00041j-Ii for qemu-devel@nongnu.org; Mon, 14 Feb 2011 10:24:58 -0500 From: Marcelo Tosatti Date: Mon, 14 Feb 2011 13:23:00 -0200 Message-Id: <7a39fe588251ba042c91bf23d53b0ba820bf964c.1297696986.git.mtosatti@redhat.com> In-Reply-To: References: Subject: [Qemu-devel] [PATCH 31/37] kvm: Drop return values from kvm_arch_pre/post_run List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Jan Kiszka , Marcelo Tosatti , qemu-devel@nongnu.org, kvm@vger.kernel.org, Alexander Graf From: Jan Kiszka 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 Signed-off-by: Marcelo Tosatti --- 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) -- 1.7.4