From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:45348) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SX1wv-000112-OQ for qemu-devel@nongnu.org; Tue, 22 May 2012 23:09:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SX1wp-0005l4-6Y for qemu-devel@nongnu.org; Tue, 22 May 2012 23:09:21 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 23 May 2012 05:08:02 +0200 Message-Id: <1337742502-28565-40-git-send-email-afaerber@suse.de> In-Reply-To: <1337742502-28565-1-git-send-email-afaerber@suse.de> References: <1337742502-28565-1-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH qom-next 39/59] target-ppc: Pass PowerPCCPU to cpu_ppc_hypercall List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "open list:PowerPC" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Alexander Graf Adapt emulate_spapr_hypercall() accordingly. Needed for spapr_hypercall(). Signed-off-by: Andreas F=C3=A4rber --- 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 *opaqu= e, uint64_t addr) return (addr & 0x0fffffff) + KERNEL_LOAD_ADDR; } =20 -static void emulate_spapr_hypercall(CPUPPCState *env) +static void emulate_spapr_hypercall(PowerPCCPU *cpu) { + CPUPPCState *env =3D &cpu->env; + env->gpr[3] =3D spapr_hypercall(env, env->gpr[3], &env->gpr[4]); } =20 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) =20 #endif =20 -extern void (*cpu_ppc_hypercall)(CPUPPCState *); +extern void (*cpu_ppc_hypercall)(PowerPCCPU *); =20 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 */ =20 -void (*cpu_ppc_hypercall)(CPUPPCState *); +void (*cpu_ppc_hypercall)(PowerPCCPU *); =20 /***********************************************************************= ******/ /* PowerPC MMU emulation */ @@ -2674,7 +2674,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, in= t excp_model, int excp) dump_syscall(env); lev =3D env->error_code; if ((lev =3D=3D 1) && cpu_ppc_hypercall) { - cpu_ppc_hypercall(env); + cpu_ppc_hypercall(cpu); return; } if (lev =3D=3D 1 || (lpes0 =3D=3D 0 && lpes1 =3D=3D 0)) --=20 1.7.7