All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
	Anton Blanchard <anton@au1.ibm.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	David Gibson <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH] ppc: Stop dumping state on all exceptions in linux-user
Date: Wed, 03 Aug 2016 21:28:52 +1000	[thread overview]
Message-ID: <1470223732.12584.88.camel@kernel.crashing.org> (raw)
In-Reply-To: <CAFEAcA-QDTgzTsqT3x9FnCHOmLgho+AXwvxVct3M3=9qRjw1Vw@mail.gmail.com>

On Wed, 2016-08-03 at 12:05 +0100, Peter Maydell wrote:
> On 3 August 2016 at 09:02, Benjamin Herrenschmidt
> > <benh@kernel.crashing.org> 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>
> > ---
> >  linux-user/main.c | 14 --------------
> >  1 file changed, 14 deletions(-)
> > 
> > diff --git a/linux-user/main.c b/linux-user/main.c
> > index eb9975c..8fbc5a6 100644
> > --- a/linux-user/main.c
> > +++ b/linux-user/main.c
> > @@ -1651,9 +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 */
> 
> Are you removing these XXX comments because you've checked the
> error code cases below? If so it would be useful to say so
> in the commit message...

Well I fix some of it in another patch...

To the best of my understanding we only ever generate
0x40000000 and 0x42000000 via ppc_cpu_handle_mmu_fault()
in user_only_helper.c unless there's another path to DSI
in user mode that I missed.

That being said, the comment isn't useful anyway. Nobody
looks at it :-)

I can respin with the comment back in or do put some blurb
in the cset comment, let me know.

BTW. I noticed, the generic path from the original signal
coming from the host kernel through to here loses the
information that would allow us to differenciate between
a map error (no mapping) or a protection fault.

It's a bit unfortunate, not sure if we can do much about it
though without stopping to hijack the existing MMU translate
hook in the CPU class and using a user mode dediated one that
takes that sort of info as an argument.

Cheers,
Ben.

  reply	other threads:[~2016-08-03 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  8:02 [Qemu-devel] [PATCH] ppc: Stop dumping state on all exceptions in linux-user Benjamin Herrenschmidt
2016-08-03 11:05 ` Peter Maydell
2016-08-03 11:28   ` Benjamin Herrenschmidt [this message]
2016-08-03 11:32     ` Peter Maydell
2016-08-03 11:39       ` Benjamin Herrenschmidt
2016-08-06  9:53         ` Richard Henderson
2016-08-07  0:50           ` Benjamin Herrenschmidt
2016-08-08  6:59             ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470223732.12584.88.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=anton@au1.ibm.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.