qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] ppc: Stop dumping state on all exceptions in linux-user
@ 2016-08-03 11:44 Benjamin Herrenschmidt
  2016-08-04  2:18 ` David Gibson
  0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2016-08-03 11:44 UTC (permalink / raw)
  To: QEMU Developers
  Cc: qemu-ppc@nongnu.org, Anton Blanchard, David Gibson, Peter Maydell

Other archs don't do it, some programs catch signals just fine
and those dumps just clutter the output. Keep the dumps for cases
that aren't supposed to happen such as unknown codes.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---

v2. Leave the "XXX" comments alone, we can handle them separately

 linux-user/main.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/linux-user/main.c b/linux-user/main.c
index eb9975c..860f394 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -1651,8 +1651,6 @@ void cpu_loop(CPUPPCState *env)
                       "Aborting\n");
             break;
         case POWERPC_EXCP_DSI:      /* Data storage exception                */
-            EXCP_DUMP(env, "Invalid data memory access: 0x" TARGET_FMT_lx "\n",
-                      env->spr[SPR_DAR]);
             /* XXX: check this. Seems bugged */
             switch (env->error_code & 0xFF000000) {
             case 0x40000000:
@@ -1684,8 +1682,6 @@ void cpu_loop(CPUPPCState *env)
             queue_signal(env, info.si_signo, &info);
             break;
         case POWERPC_EXCP_ISI:      /* Instruction storage exception         */
-            EXCP_DUMP(env, "Invalid instruction fetch: 0x\n" TARGET_FMT_lx
-                      "\n", env->spr[SPR_SRR0]);
             /* XXX: check this */
             switch (env->error_code & 0xFF000000) {
             case 0x40000000:
@@ -1716,7 +1712,6 @@ void cpu_loop(CPUPPCState *env)
                       "Aborting\n");
             break;
         case POWERPC_EXCP_ALIGN:    /* Alignment exception                   */
-            EXCP_DUMP(env, "Unaligned memory access\n");
             /* XXX: check this */
             info.si_signo = TARGET_SIGBUS;
             info.si_errno = 0;
@@ -1729,7 +1724,6 @@ void cpu_loop(CPUPPCState *env)
             /* XXX: check this */
             switch (env->error_code & ~0xF) {
             case POWERPC_EXCP_FP:
-                EXCP_DUMP(env, "Floating point program exception\n");
                 info.si_signo = TARGET_SIGFPE;
                 info.si_errno = 0;
                 switch (env->error_code & 0xF) {
@@ -1765,7 +1759,6 @@ void cpu_loop(CPUPPCState *env)
                 }
                 break;
             case POWERPC_EXCP_INVAL:
-                EXCP_DUMP(env, "Invalid instruction\n");
                 info.si_signo = TARGET_SIGILL;
                 info.si_errno = 0;
                 switch (env->error_code & 0xF) {
@@ -1789,7 +1782,6 @@ void cpu_loop(CPUPPCState *env)
                 }
                 break;
             case POWERPC_EXCP_PRIV:
-                EXCP_DUMP(env, "Privilege violation\n");
                 info.si_signo = TARGET_SIGILL;
                 info.si_errno = 0;
                 switch (env->error_code & 0xF) {
@@ -1819,7 +1811,6 @@ void cpu_loop(CPUPPCState *env)
             queue_signal(env, info.si_signo, &info);
             break;
         case POWERPC_EXCP_FPU:      /* Floating-point unavailable exception  */
-            EXCP_DUMP(env, "No floating point allowed\n");
             info.si_signo = TARGET_SIGILL;
             info.si_errno = 0;
             info.si_code = TARGET_ILL_COPROC;
@@ -1831,7 +1822,6 @@ void cpu_loop(CPUPPCState *env)
                       "Aborting\n");
             break;
         case POWERPC_EXCP_APU:      /* Auxiliary processor unavailable       */
-            EXCP_DUMP(env, "No APU instruction allowed\n");
             info.si_signo = TARGET_SIGILL;
             info.si_errno = 0;
             info.si_code = TARGET_ILL_COPROC;
@@ -1859,7 +1849,6 @@ void cpu_loop(CPUPPCState *env)
                       "Aborting\n");
             break;
         case POWERPC_EXCP_SPEU:     /* SPE/embedded floating-point unavail.  */
-            EXCP_DUMP(env, "No SPE/floating-point instruction allowed\n");
             info.si_signo = TARGET_SIGILL;
             info.si_errno = 0;
             info.si_code = TARGET_ILL_COPROC;
@@ -1923,7 +1912,6 @@ void cpu_loop(CPUPPCState *env)
                       "while in user mode. Aborting\n");
             break;
         case POWERPC_EXCP_VPU:      /* Vector unavailable exception          */
-            EXCP_DUMP(env, "No Altivec instructions allowed\n");
             info.si_signo = TARGET_SIGILL;
             info.si_errno = 0;
             info.si_code = TARGET_ILL_COPROC;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH v2] ppc: Stop dumping state on all exceptions in linux-user
  2016-08-03 11:44 [Qemu-devel] [PATCH v2] ppc: Stop dumping state on all exceptions in linux-user Benjamin Herrenschmidt
@ 2016-08-04  2:18 ` David Gibson
  0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2016-08-04  2:18 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: QEMU Developers, qemu-ppc@nongnu.org, Anton Blanchard,
	Peter Maydell

[-- Attachment #1: Type: text/plain, Size: 4973 bytes --]

On Wed, Aug 03, 2016 at 09:44:08PM +1000, Benjamin Herrenschmidt wrote:
> Other archs don't do it, some programs catch signals just fine
> and those dumps just clutter the output. Keep the dumps for cases
> that aren't supposed to happen such as unknown codes.
> 
> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> ---
> 
> v2. Leave the "XXX" comments alone, we can handle them separately

Applied to ppc-for-2.8.

> 
>  linux-user/main.c | 12 ------------
>  1 file changed, 12 deletions(-)
> 
> diff --git a/linux-user/main.c b/linux-user/main.c
> index eb9975c..860f394 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -1651,8 +1651,6 @@ void cpu_loop(CPUPPCState *env)
>                        "Aborting\n");
>              break;
>          case POWERPC_EXCP_DSI:      /* Data storage exception                */
> -            EXCP_DUMP(env, "Invalid data memory access: 0x" TARGET_FMT_lx "\n",
> -                      env->spr[SPR_DAR]);
>              /* XXX: check this. Seems bugged */
>              switch (env->error_code & 0xFF000000) {
>              case 0x40000000:
> @@ -1684,8 +1682,6 @@ void cpu_loop(CPUPPCState *env)
>              queue_signal(env, info.si_signo, &info);
>              break;
>          case POWERPC_EXCP_ISI:      /* Instruction storage exception         */
> -            EXCP_DUMP(env, "Invalid instruction fetch: 0x\n" TARGET_FMT_lx
> -                      "\n", env->spr[SPR_SRR0]);
>              /* XXX: check this */
>              switch (env->error_code & 0xFF000000) {
>              case 0x40000000:
> @@ -1716,7 +1712,6 @@ void cpu_loop(CPUPPCState *env)
>                        "Aborting\n");
>              break;
>          case POWERPC_EXCP_ALIGN:    /* Alignment exception                   */
> -            EXCP_DUMP(env, "Unaligned memory access\n");
>              /* XXX: check this */
>              info.si_signo = TARGET_SIGBUS;
>              info.si_errno = 0;
> @@ -1729,7 +1724,6 @@ void cpu_loop(CPUPPCState *env)
>              /* XXX: check this */
>              switch (env->error_code & ~0xF) {
>              case POWERPC_EXCP_FP:
> -                EXCP_DUMP(env, "Floating point program exception\n");
>                  info.si_signo = TARGET_SIGFPE;
>                  info.si_errno = 0;
>                  switch (env->error_code & 0xF) {
> @@ -1765,7 +1759,6 @@ void cpu_loop(CPUPPCState *env)
>                  }
>                  break;
>              case POWERPC_EXCP_INVAL:
> -                EXCP_DUMP(env, "Invalid instruction\n");
>                  info.si_signo = TARGET_SIGILL;
>                  info.si_errno = 0;
>                  switch (env->error_code & 0xF) {
> @@ -1789,7 +1782,6 @@ void cpu_loop(CPUPPCState *env)
>                  }
>                  break;
>              case POWERPC_EXCP_PRIV:
> -                EXCP_DUMP(env, "Privilege violation\n");
>                  info.si_signo = TARGET_SIGILL;
>                  info.si_errno = 0;
>                  switch (env->error_code & 0xF) {
> @@ -1819,7 +1811,6 @@ void cpu_loop(CPUPPCState *env)
>              queue_signal(env, info.si_signo, &info);
>              break;
>          case POWERPC_EXCP_FPU:      /* Floating-point unavailable exception  */
> -            EXCP_DUMP(env, "No floating point allowed\n");
>              info.si_signo = TARGET_SIGILL;
>              info.si_errno = 0;
>              info.si_code = TARGET_ILL_COPROC;
> @@ -1831,7 +1822,6 @@ void cpu_loop(CPUPPCState *env)
>                        "Aborting\n");
>              break;
>          case POWERPC_EXCP_APU:      /* Auxiliary processor unavailable       */
> -            EXCP_DUMP(env, "No APU instruction allowed\n");
>              info.si_signo = TARGET_SIGILL;
>              info.si_errno = 0;
>              info.si_code = TARGET_ILL_COPROC;
> @@ -1859,7 +1849,6 @@ void cpu_loop(CPUPPCState *env)
>                        "Aborting\n");
>              break;
>          case POWERPC_EXCP_SPEU:     /* SPE/embedded floating-point unavail.  */
> -            EXCP_DUMP(env, "No SPE/floating-point instruction allowed\n");
>              info.si_signo = TARGET_SIGILL;
>              info.si_errno = 0;
>              info.si_code = TARGET_ILL_COPROC;
> @@ -1923,7 +1912,6 @@ void cpu_loop(CPUPPCState *env)
>                        "while in user mode. Aborting\n");
>              break;
>          case POWERPC_EXCP_VPU:      /* Vector unavailable exception          */
> -            EXCP_DUMP(env, "No Altivec instructions allowed\n");
>              info.si_signo = TARGET_SIGILL;
>              info.si_errno = 0;
>              info.si_code = TARGET_ILL_COPROC;
> 

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-04  3:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03 11:44 [Qemu-devel] [PATCH v2] ppc: Stop dumping state on all exceptions in linux-user Benjamin Herrenschmidt
2016-08-04  2:18 ` David Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).