[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qom-next 39/59] target-ppc: Pass PowerPCCPU to cpu_p
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH qom-next 39/59] target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall |
Date: |
Wed, 23 May 2012 05:08:02 +0200 |
Adapt emulate_spapr_hypercall() accordingly.
Needed for spapr_hypercall().
Signed-off-by: Andreas Färber <address@hidden>
---
hw/spapr.c | 4 +++-
target-ppc/cpu.h | 2 +-
target-ppc/helper.c | 4 ++--
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/hw/spapr.c b/hw/spapr.c
index d0bddbc..70068b4 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -477,8 +477,10 @@ static uint64_t translate_kernel_address(void *opaque,
uint64_t addr)
return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR;
}
-static void emulate_spapr_hypercall(CPUPPCState *env)
+static void emulate_spapr_hypercall(PowerPCCPU *cpu)
{
+ CPUPPCState *env = &cpu->env;
+
env->gpr[3] = spapr_hypercall(env, env->gpr[3], &env->gpr[4]);
}
diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h
index 77a2858..9b38529 100644
--- a/target-ppc/cpu.h
+++ b/target-ppc/cpu.h
@@ -2182,7 +2182,7 @@ static inline uint32_t booke206_tlbnps(CPUPPCState *env,
const int tlbn)
#endif
-extern void (*cpu_ppc_hypercall)(CPUPPCState *);
+extern void (*cpu_ppc_hypercall)(PowerPCCPU *);
static inline bool cpu_has_work(CPUPPCState *env)
{
diff --git a/target-ppc/helper.c b/target-ppc/helper.c
index f947684..7747674 100644
--- a/target-ppc/helper.c
+++ b/target-ppc/helper.c
@@ -67,7 +67,7 @@
/*****************************************************************************/
/* PowerPC Hypercall emulation */
-void (*cpu_ppc_hypercall)(CPUPPCState *);
+void (*cpu_ppc_hypercall)(PowerPCCPU *);
/*****************************************************************************/
/* PowerPC MMU emulation */
@@ -2674,7 +2674,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int
excp_model, int excp)
dump_syscall(env);
lev = env->error_code;
if ((lev == 1) && cpu_ppc_hypercall) {
- cpu_ppc_hypercall(env);
+ cpu_ppc_hypercall(cpu);
return;
}
if (lev == 1 || (lpes0 == 0 && lpes1 == 0))
--
1.7.7
- [Qemu-devel] [PATCH qom-next 26/59] sun4m: Pass SPARCCPU to cpu_kick_irq(), (continued)
- [Qemu-devel] [PATCH qom-next 26/59] sun4m: Pass SPARCCPU to cpu_kick_irq(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 36/59] cpus: Pass CPUState to flush_queued_work(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 28/59] sun4u: Pass SPARCCPU to cpu_kick_irq(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 15/59] cpus: Pass CPUState to cpu_is_stopped(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 37/59] cpus: Pass CPUState to qemu_wait_io_event_common(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 25/59] sun4m: Pass SPARCCPU to cpu_set_irq(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 19/59] cpus: Pass CPUState to qemu_tcg_init_vcpu(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 38/59] target-ppc: Pass PowerPCCPU to powerpc_excp(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 34/59] cpus: Pass CPUState to qemu_cpu_kick(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 31/59] s390-virtio: Use cpu_s390x_init() to obtain S390CPU, Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 39/59] target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall,
Andreas Färber <=
- [Qemu-devel] [PATCH qom-next 42/59] xtensa_pic: Pass XtensaCPU to xtensa_ccompare_cb(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 35/59] cpu: Move queued_work_{first, last} to CPUState, Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 50/59] target-i386: Pass X86CPU to kvm_get_mp_state(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 58/59] xen_machine_pv: Use cpu_x86_init() to obtain X86CPU, Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 43/59] cpus: Pass CPUState to [qemu_]cpu_has_work(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 54/59] target-mips: Pass MIPSCPU to mips_tc_sleep(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 44/59] target-i386: Pass X86CPU to kvm_mce_inject(), Andreas Färber, 2012/05/22
- [Qemu-devel] [PATCH qom-next 57/59] cpu: Introduce mandatory tlb_flush callback, Andreas Färber, 2012/05/22