qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2] tcg: Use correct trap number for page faults on *BSD syst


From: Richard Henderson
Subject: Re: [PATCH v2] tcg: Use correct trap number for page faults on *BSD systems
Date: Thu, 6 May 2021 10:51:14 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

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~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]