On 11 July 2014 16:18, Joakim Tjernlund <joakim.tjernl...@transmode.se> wrote: > ppc logs every type of Invalid instruction. This generates a lot > of garbage on console when sshd/ssh_keygen executes as > they try various insn to optimize its performance. > The invalid operation log is still there so an unknown insn > will still be logged. > > Signed-off-by: Joakim Tjernlund <joakim.tjernl...@transmode.se> > --- > linux-user/main.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/linux-user/main.c b/linux-user/main.c > index b453a39..71a33c7 100644 > --- a/linux-user/main.c > +++ b/linux-user/main.c > @@ -1698,7 +1698,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) {
Rather than just deleting this EXCP_DUMP, I would suggest changing the EXCP_DUMP macro so it only does anything if the user has passed the "-d int" debug logging flag: #define EXCP_DUMP(env, fmt, ...) \ do { \ CPUState *cs = ENV_GET_CPU(env); \ qemu_log_mask(CPU_LOG_INT, fmt, ## __VA_ARGS__); \ log_cpu_state_mask(CPU_LOG_INT, cs, 0); \ } while (0) (untested code!). Some applications (like QEMU itself!) use SIGSEGV as well as SIGILL intentionally, for instance. (cc'd qemu-ppc to see if they have an opinion.) thanks -- PMM