aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2012-05-03 06:13:14 +0200
committerAndreas Färber <afaerber@suse.de>2012-10-31 01:02:45 +0100
commitaa100fa4c9901c6a88d24f48d485dbe0147b317d (patch)
tree21dc0254c23e767ad6b1a58fa0859a50a6240403 /hw
parent1b14670a38a2265d3dd573b5e2d611621a5929f0 (diff)
downloadqemu-aa100fa4c9901c6a88d24f48d485dbe0147b317d.zip
qemu-aa100fa4c9901c6a88d24f48d485dbe0147b317d.tar.gz
qemu-aa100fa4c9901c6a88d24f48d485dbe0147b317d.tar.bz2
spapr: Pass PowerPCCPU to spapr_hypercall()
Needed for changing the hypercall handlers' argument type to PowerPCCPU. Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw')
-rw-r--r--hw/spapr.c2
-rw-r--r--hw/spapr.h2
-rw-r--r--hw/spapr_hcall.c4
3 files changed, 5 insertions, 3 deletions
diff --git a/hw/spapr.c b/hw/spapr.c
index 30707ee..ad3f0ea 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -584,7 +584,7 @@ static void emulate_spapr_hypercall(PowerPCCPU *cpu)
hcall_dprintf("Hypercall made with MSR[PR]=1\n");
env->gpr[3] = H_PRIVILEGE;
} else {
- env->gpr[3] = spapr_hypercall(env, env->gpr[3], &env->gpr[4]);
+ env->gpr[3] = spapr_hypercall(cpu, env->gpr[3], &env->gpr[4]);
}
}
diff --git a/hw/spapr.h b/hw/spapr.h
index 51c709e..f11028d 100644
--- a/hw/spapr.h
+++ b/hw/spapr.h
@@ -291,7 +291,7 @@ typedef target_ulong (*spapr_hcall_fn)(CPUPPCState *env, sPAPREnvironment *spapr
target_ulong *args);
void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn);
-target_ulong spapr_hypercall(CPUPPCState *env, target_ulong opcode,
+target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode,
target_ulong *args);
int spapr_allocate_irq(int hint, bool lsi);
diff --git a/hw/spapr_hcall.c b/hw/spapr_hcall.c
index 621dabd..b1e8704 100644
--- a/hw/spapr_hcall.c
+++ b/hw/spapr_hcall.c
@@ -679,9 +679,11 @@ void spapr_register_hypercall(target_ulong opcode, spapr_hcall_fn fn)
*slot = fn;
}
-target_ulong spapr_hypercall(CPUPPCState *env, target_ulong opcode,
+target_ulong spapr_hypercall(PowerPCCPU *cpu, target_ulong opcode,
target_ulong *args)
{
+ CPUPPCState *env = &cpu->env;
+
if ((opcode <= MAX_HCALL_OPCODE)
&& ((opcode & 0x3) == 0)) {
spapr_hcall_fn fn = papr_hypercall_table[opcode / 4];