kvm: Drop return values from kvm_arch_pre/post_run

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 <jan.kiszka@siemens.com>
CC: Alexander Graf <agraf@suse.de>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
This commit is contained in:
Jan Kiszka 2011-02-07 12:19:20 +01:00 committed by Marcelo Tosatti
parent db1669bcca
commit 7a39fe5882
4 changed files with 8 additions and 17 deletions

5
kvm.h
View file

@ -99,12 +99,11 @@ int kvm_vcpu_ioctl(CPUState *env, int type, ...);
extern const KVMCapabilityInfo kvm_arch_required_capabilities[]; 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_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_process_irqchip_events(CPUState *env);
int kvm_arch_get_registers(CPUState *env); int kvm_arch_get_registers(CPUState *env);

View file

@ -1440,7 +1440,7 @@ int kvm_arch_get_registers(CPUState *env)
return 0; 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 */ /* Inject NMI */
if (env->interrupt_request & CPU_INTERRUPT_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"); DPRINTF("setting tpr\n");
run->cr8 = cpu_get_apic_tpr(env->apic_state); 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) { if (run->if_flag) {
env->eflags |= IF_MASK; 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_tpr(env->apic_state, run->cr8);
cpu_set_apic_base(env->apic_state, run->apic_base); cpu_set_apic_base(env->apic_state, run->apic_base);
return 0;
} }
int kvm_arch_process_irqchip_events(CPUState *env) int kvm_arch_process_irqchip_events(CPUState *env)

View file

@ -256,14 +256,12 @@ int kvm_arch_pre_run(CPUState *env, struct kvm_run *run)
return 0; 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) static int kvmppc_handle_halt(CPUState *env)

View file

@ -169,14 +169,12 @@ int kvm_arch_remove_sw_breakpoint(CPUState *env, struct kvm_sw_breakpoint *bp)
return 0; 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) int kvm_arch_process_irqchip_events(CPUState *env)