On 5/6/21 12:53 PM, Warner Losh wrote:


On Thu, May 6, 2021 at 11:51 AM Richard Henderson <richard.hender...@linaro.org <mailto:richard.hender...@linaro.org>> wrote:

    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<ma...@freebsd.org>
     > Signed-off-by: Juergen Lock<n...@freebsd.org>
     > [ Rework to avoid ifdefs and expand it to i386 ]
     > Signed-off-by: Warner Losh<i...@bsdimp.com <mailto:i...@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...


No arguments from me there... Thanks!

Dequeueing.

This doesn't work on our "make vm-build-{freebsd,openbsd} images, as Peter helpfully pointed out after I sent the pull request. I don't know enough about any of the BSDs to know what's expected.


r~

Reply via email to