qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 2/4] tcg: Additional Trap type for FreeBSD
Date: Sat, 19 Dec 2020 16:22:52 -0700	[thread overview]
Message-ID: <CANCZdfpW_aC1vMRztEFPCCZ2Ka2fUuQPGGM=MxbgGunxyOFF7g@mail.gmail.com> (raw)
In-Reply-To: <20201218205250.86382-3-imp@freebsd.org>

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

Again, this turns out to be bogus, for reasons I enumerated the first time
it sent...

Warner

On Sat, Dec 19, 2020 at 1:54 PM <imp@freebsd.org> wrote:

> From: Sean Bruno <sbruno@freebsd.org>
>
> FreeBSD can generate a trap 0xc as well as 0xe when writing to a
> read-only page.
>
> Signed-off-by: Juergen Lock <nox@FreeBSD.org>
> [imp rewored commit message for clarity]
> Signed-off-by: Warner Losh <imp@FreeBSD.org>
> ---
>  accel/tcg/user-exec.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/accel/tcg/user-exec.c b/accel/tcg/user-exec.c
> index 4ebe25461a..1f5befa9f9 100644
> --- a/accel/tcg/user-exec.c
> +++ b/accel/tcg/user-exec.c
> @@ -343,7 +343,13 @@ int cpu_signal_handler(int host_signum, void *pinfo,
>
>      pc = PC_sig(uc);
>      return handle_cpu_signal(pc, info,
> -                             TRAP_sig(uc) == 0xe ? (ERROR_sig(uc) >> 1) &
> 1 : 0,
> +#if defined(__FreeBSD__) || defined(__DragonFly__)
> +                             (TRAP_sig(uc) == 0xe ||
> +                              TRAP_sig(uc) == 0xc) ?
> +#else
> +                             TRAP_sig(uc) == 0xe ?
> +#endif
> +                             (ERROR_sig(uc) >> 1) & 1 : 0,
>                               &MASK_sig(uc));
>  }
>
> --
> 2.22.1
>
>
>

[-- Attachment #2: Type: text/html, Size: 1886 bytes --]

  reply	other threads:[~2020-12-19 23:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 20:52 [PATCH 0/4] A few preliminary bsd-user patches imp
2020-12-18 20:52 ` [PATCH 1/4] bsd-user: regenerate FreeBSD's system call numbers imp
2020-12-18 20:52 ` [PATCH 2/4] tcg: Additional Trap type for FreeBSD imp
2020-12-19 23:22   ` Warner Losh [this message]
2020-12-18 20:52 ` [PATCH 3/4] bsd-user: move strace OS/arch dependent code to host/arch dirs imp
2020-12-18 20:52 ` [PATCH 4/4] bsd-user: Update strace.list for FreeBSD's latest syscalls imp
2020-12-19 23:21 ` [PATCH 0/4] A few preliminary bsd-user patches Warner Losh
2020-12-18 20:54 imp
2020-12-18 20:54 ` [PATCH 2/4] tcg: Additional Trap type for FreeBSD imp
2020-12-18 23:12   ` Warner Losh

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='CANCZdfpW_aC1vMRztEFPCCZ2Ka2fUuQPGGM=MxbgGunxyOFF7g@mail.gmail.com' \
    --to=imp@bsdimp.com \
    --cc=qemu-devel@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 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).