qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: Warner Losh <imp@freebsd.org>
Cc: Juergen Lock <nox@freebsd.org>, Sean Bruno <sbruno@freebsd.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH 2/4] tcg: Additional Trap type for FreeBSD
Date: Fri, 18 Dec 2020 16:12:15 -0700	[thread overview]
Message-ID: <CANCZdfrqDc15eGYSrPQjYHdZyH6_2AMt1oYK__fU5Nbghi1kUA@mail.gmail.com> (raw)
In-Reply-To: <20201218205451.10559-3-imp@freebsd.org>

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

On Fri, Dec 18, 2020 at 1:55 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,
>

I'd like to withdraw this patch. After I posted it I talked to our x86
expert and he's convinced it's bogus.

We'll run without it for a while and see if we need to revisit this or not.
But for now, please don't consider this change.

Warner


>                               &MASK_sig(uc));
>  }
>
> --
> 2.22.1
>
>

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

  reply	other threads:[~2020-12-18 23:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 20:54 [PATCH 0/4] A few preliminary bsd-user patches imp
2020-12-18 20:54 ` [PATCH 1/4] bsd-user: regenerate FreeBSD's system call numbers imp
2020-12-18 20:54 ` [PATCH 2/4] tcg: Additional Trap type for FreeBSD imp
2020-12-18 23:12   ` Warner Losh [this message]
2020-12-18 20:54 ` [PATCH 3/4] bsd-user: move strace OS/arch dependent code to host/arch dirs imp
2020-12-18 20:54 ` [PATCH 4/4] bsd-user: Update strace.list for FreeBSD's latest syscalls imp
2021-01-05  2:27 ` [PATCH 0/4] A few preliminary bsd-user patches Warner Losh
  -- strict thread matches above, loose matches on Subject: below --
2020-12-18 20:52 imp
2020-12-18 20:52 ` [PATCH 2/4] tcg: Additional Trap type for FreeBSD imp
2020-12-19 23:22   ` 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=CANCZdfrqDc15eGYSrPQjYHdZyH6_2AMt1oYK__fU5Nbghi1kUA@mail.gmail.com \
    --to=imp@bsdimp.com \
    --cc=imp@freebsd.org \
    --cc=nox@freebsd.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sbruno@freebsd.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).