From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:32774) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TTMfz-0000Ki-2O for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:01:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TTMft-0005Py-4a for qemu-devel@nongnu.org; Tue, 30 Oct 2012 21:00:58 -0400 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Wed, 31 Oct 2012 01:59:57 +0100 Message-Id: <1351645206-3041-27-git-send-email-afaerber@suse.de> In-Reply-To: <1351645206-3041-1-git-send-email-afaerber@suse.de> References: <1351645206-3041-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 26/35] 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: Alexander Graf , "open list:sPAPR" , =?UTF-8?q?Andreas=20F=C3=A4rber?= , anthony@codemonkey.ws, David Gibson Adapt emulate_spapr_hypercall() accordingly. Needed for changing spapr_hypercall() argument type to PowerPCCPU. Signed-off-by: Andreas F=C3=A4rber --- hw/spapr.c | 4 +++- target-ppc/cpu.h | 2 +- target-ppc/excp_helper.c | 4 ++-- 3 Dateien ge=C3=A4ndert, 6 Zeilen hinzugef=C3=BCgt(+), 4 Zeilen entfernt= (-) diff --git a/hw/spapr.c b/hw/spapr.c index 8d0ad3c..30707ee 100644 --- a/hw/spapr.c +++ b/hw/spapr.c @@ -576,8 +576,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; + if (msr_pr) { hcall_dprintf("Hypercall made with MSR[PR]=3D1\n"); env->gpr[3] =3D H_PRIVILEGE; diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 286f42a..5574042 100644 --- a/target-ppc/cpu.h +++ b/target-ppc/cpu.h @@ -2220,7 +2220,7 @@ static inline bool msr_is_64bit(CPUPPCState *env, t= arget_ulong msr) return msr & (1ULL << MSR_SF); } =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/excp_helper.c b/target-ppc/excp_helper.c index d19a46b..5e34ad0 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -33,7 +33,7 @@ /***********************************************************************= ******/ /* PowerPC Hypercall emulation */ =20 -void (*cpu_ppc_hypercall)(CPUPPCState *); +void (*cpu_ppc_hypercall)(PowerPCCPU *); =20 /***********************************************************************= ******/ /* Exception processing */ @@ -239,7 +239,7 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int = 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.10.4