Received: from eggs.gnu.org ([2001:4830:134:3::10]:35314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c6ToH-00039O-Du for qemu-devel@nongnu.org; Mon, 14 Nov 2016 21:49:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c6ToG-0000AF-DA for qemu-devel@nongnu.org; Mon, 14 Nov 2016 21:49:21 -0500 From: David Gibson Date: Tue, 15 Nov 2016 13:48:58 +1100 Message-Id: <1479178144-28153-14-git-send-email-david@gibson.dropbear.id.au> In-Reply-To: <1479178144-28153-1-git-send-email-david@gibson.dropbear.id.au> References: <1479178144-28153-1-git-send-email-david@gibson.dropbear.id.au> Subject: [Qemu-devel] [PULL 13/19] FU exceptions should carry a cause (IC) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.maydell@linaro.org Cc: agraf@suse.de, aik@ozlabs.ru, mdroth@linux.vnet.ibm.com, clg@kaod.org, qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Balbir Singh , David Gibson From: Balbir Singh As per the ISA we need a cause and executing a tabort r9 in libc for example causes a EXCP_FU exception, we don't wire up the IC (cause) when we post the exception. The cause is required for the kernel to do the right thing. The fix applies only to 64 bit ppc targets. Signed-off-by: Balbir singh Signed-off-by: David Gibson --- target-ppc/excp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c index 808760b..93369d4 100644 --- a/target-ppc/excp_helper.c +++ b/target-ppc/excp_helper.c @@ -427,6 +427,9 @@ static inline void powerpc_excp(PowerPCCPU *cpu, int excp_model, int excp) case POWERPC_EXCP_VPU: /* Vector unavailable exception */ case POWERPC_EXCP_VSXU: /* VSX unavailable exception */ case POWERPC_EXCP_FU: /* Facility unavailable exception */ +#ifdef TARGET_PPC64 + env->spr[SPR_FSCR] |= ((target_ulong)env->error_code << 56); +#endif break; case POWERPC_EXCP_PIT: /* Programmable interval timer interrupt */ LOG_EXCP("PIT exception\n"); -- 2.7.4