From: Richard Henderson <richard.henderson@linaro.org>
To: Warner Losh <imp@bsdimp.com>, qemu-devel@nongnu.org
Cc: kevans@freebsd.org, Riku Voipio <riku.voipio@iki.fi>,
Mark Johnston <markj@FreeBSD.org>, Juergen Lock <nox@FreeBSD.org>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH v2] tcg: Use correct trap number for page faults on *BSD systems
Date: Thu, 6 May 2021 10:51:14 -0700 [thread overview]
Message-ID: <f8db526d-cb19-c633-1327-2282333c7fe3@linaro.org> (raw)
In-Reply-To: <20210506173826.72832-1-imp@bsdimp.com>
On 5/6/21 10:38 AM, Warner Losh wrote:
> The trap number for a page fault on BSD systems is T_PAGEFLT not 0xe. 0xe is
> used by Linux and represents the intel hardware trap vector. The BSD kernels,
> however, translate this to T_PAGEFLT in their Xpage, Xtrap0e, Xtrap14, etc fault
> handlers. This is true for i386 and x86_64, though the name of the trap hanlder
> can very on the flavor of BSD. As far as I can tell, Linux doesn't provide a
> define for this value. Invent a new one (PAGE_FAULT_TRAP) and use it instead to
> avoid uglier ifdefs.
>
> Signed-off-by: Mark Johnston<markj@FreeBSD.org>
> Signed-off-by: Juergen Lock<nox@FreeBSD.org>
> [ Rework to avoid ifdefs and expand it to i386 ]
> Signed-off-by: Warner Losh<imp@bsdimp.com>
> ---
> accel/tcg/user-exec.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
Queued to tcg-next, thanks.
Looks like this area could use a bit of cleanup...
r~
next prev parent reply other threads:[~2021-05-06 17:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 17:38 [PATCH v2] tcg: Use correct trap number for page faults on *BSD systems Warner Losh
2021-05-06 17:51 ` Richard Henderson [this message]
2021-05-06 17:53 ` Warner Losh
2021-05-14 12:23 ` Richard Henderson
2021-05-14 14:15 ` 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=f8db526d-cb19-c633-1327-2282333c7fe3@linaro.org \
--to=richard.henderson@linaro.org \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=markj@FreeBSD.org \
--cc=nox@FreeBSD.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
/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).