qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Fam Zheng" <fam@euphon.net>,
	"Daniel P. Berrange" <berrange@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Richard Henderson" <richard.henderson@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Aurelien Jarno" <aurelien@aurel32.net>,
	"Laurent Vivier" <laurent@vivier.eu>
Subject: Re: [RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery
Date: Wed, 21 Apr 2021 20:56:40 +0100	[thread overview]
Message-ID: <CAFEAcA8stoqKwtLZZsXkr59PkwFExb6wZ2cXCkb5KDYw1MzNFw@mail.gmail.com> (raw)
In-Reply-To: <8735vj8llf.fsf@linaro.org>

On Wed, 21 Apr 2021 at 20:51, Alex Bennée <alex.bennee@linaro.org> wrote:
>
>
> Alex Bennée <alex.bennee@linaro.org> writes:
> > To further document my confusion:
> >
> >   gdb --args $QEMU ./tests/tcg/$ARCH/signals
> >
> > will SEGV in generated code for every target I've run. This seems to be
> > some sort of change of behaviour by running inside a debug
> > environment.
>
> This bit at least seems to be triggered by the page protections for
> detecting SMC - I think. If you skip past them it triggers:
>
>     if (is_write && info->si_signo == SIGSEGV && info->si_code == SEGV_ACCERR &&
>         h2g_valid(address)) {
>         switch (page_unprotect(h2g(address), pc)) {
>
> and runs.

Yeah, for linux-user code SEGV in generated code is expected and
handled -- it's how we catch things like SMC and other cases that
in softmmu we handle via the softmmu slowpath.

thanks
-- PMM


      reply	other threads:[~2021-04-21 19:59 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-21 13:29 [RFC PATCH] tests/tcg: add a multiarch signals test to stress test signal delivery Alex Bennée
2021-04-21 13:41 ` Philippe Mathieu-Daudé
2021-04-21 16:21 ` Alex Bennée
     [not found] ` <0edb902de3407d276c264a87335550d4d0e8f93af530ff196e5bd69064b92a74@mu>
2021-04-21 19:47   ` Alex Bennée
2021-04-21 19:56     ` Peter Maydell [this message]

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=CAFEAcA8stoqKwtLZZsXkr59PkwFExb6wZ2cXCkb5KDYw1MzNFw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=berrange@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=fam@euphon.net \
    --cc=laurent@vivier.eu \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    /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 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).