qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Warner Losh <imp@bsdimp.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: qemu-devel@nongnu.org, ryoon@netbsd.org, kevans@freebsd.org,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Thomas Huth" <thuth@redhat.com>,
	riastradh@netbsd.org, brad@comstyle.com, reinoud@netbsd.org,
	jrtc27@jrtc27.com, "Daniel P. Berrangé" <berrange@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h
Date: Wed, 12 Apr 2023 08:21:08 -0600	[thread overview]
Message-ID: <CANCZdfrWPxfQXBUsTqG9qezuN+qvdfamOJo2rLeO9Ass1PCPyQ@mail.gmail.com> (raw)
In-Reply-To: <7f006fb2-d88c-61e2-d536-ba6369107972@linaro.org>

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

On Wed, Apr 12, 2023 at 4:10 AM Richard Henderson <
richard.henderson@linaro.org> wrote:

> On 4/11/23 19:09, Warner Losh wrote:
> > +++ b/bsd-user/syscallhdr.sh
> > @@ -0,0 +1,7 @@
> > +#!/bin/sh
> > +
> > +in="$1"
> > +out="$2"
> > +bsd="$3"
> > +
> > +awk -v bsd="$3" '{sub("SYS_", "TARGET_" bsd "_NR_", $0); print;}' < $in
> > $out
>
> If the host/guest syscall numbers always match, there's no point in using
> TARGET_freebsd_NR_foo at all -- just use the original SYS_foo symbol from
> <sys/syscall.h>.
>

long term, this is likely correct. Short term, though, changing to SYS_foo
would cause quite a bit
of churn that I'm looking to avoid. bsd-user has two branches, and the
newest branch has problems
with threads we've not been able to completely track down, so we can't
switch to using it just yet.
So we have to still add new system calls to the old code base, which is
made harder as the number
of differences proliferate.

This is the first step, though, towards that goal: not updating the system
call tables as much, and
generating more code where possible to reduce the load we have on
hand-coded stuff.

Warner

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

  reply	other threads:[~2023-04-12 14:21 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 17:09 [PATCH v3 00/20] bsd-user 2023 Q2 first batch Warner Losh
2023-04-11 17:09 ` [PATCH v3 01/20] bsd-user: Make print_* public Warner Losh
2023-04-11 17:09 ` [PATCH v3 02/20] bsd-user: Ifdef a few MAP_ constants for NetBSD / OpenBSD Warner Losh
2023-04-11 17:09 ` [PATCH v3 03/20] bsd-user: Cleanup style Warner Losh
2023-04-11 17:09 ` [PATCH v3 04/20] bsd-user: Move system FreeBSD call table to freebsd/os-syscall.c Warner Losh
2023-04-11 17:09 ` [PATCH v3 05/20] bsd-user: Remove NetBSD specific syscall printing Warner Losh
2023-04-11 17:09 ` [PATCH v3 06/20] bsd-user: Remove OpenBSD " Warner Losh
2023-04-11 17:09 ` [PATCH v3 07/20] bsd-user: Move system call include to os-syscall.h Warner Losh
2023-04-11 17:09 ` [PATCH v3 08/20] bsd-user: Remove useless mmap definitions Warner Losh
2023-04-11 17:09 ` [PATCH v3 09/20] bsd-user: h2g_rusage Warner Losh
2023-04-11 17:09 ` [PATCH v3 10/20] bsd-user: Implement do_sysctl_kern_getprocs Warner Losh
2023-04-11 17:09 ` [PATCH v3 11/20] bsd-user: Implement do_sysctl_kern_proc_filedesc Warner Losh
2023-04-11 17:09 ` [PATCH v3 12/20] bsd-user: Implement do_sysctl_kern_proc_vmmap Warner Losh
2023-04-11 17:09 ` [PATCH v3 13/20] bsd-user: Implement sysctl kern.proc, except kern.proc.full_path Warner Losh
2023-04-11 17:09 ` [PATCH v3 14/20] bsd-user: Implement core dumps Warner Losh
2023-04-11 17:09 ` [PATCH v3 15/20] bsd-user: Add SIGSYS to core dump signals Warner Losh
2023-04-11 17:09 ` [PATCH v3 16/20] bsd-user: Implement SIGSYS on arm Warner Losh
2023-04-11 17:09 ` [PATCH v3 17/20] bsd-user: Remove host-os.h Warner Losh
2023-04-11 17:09 ` [PATCH v3 18/20] bsd-user: Automatically generate syscall_nr.h Warner Losh
2023-04-12 10:10   ` Richard Henderson
2023-04-12 14:21     ` Warner Losh [this message]
2023-04-13  9:53       ` Richard Henderson
2023-04-11 17:09 ` [PATCH v3 19/20] bsd-user: remove syscall_nr.h Warner Losh
2023-04-11 17:09 ` [PATCH v3 20/20] bsd-user: Eliminate USE_ELF_CORE_DUMP 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=CANCZdfrWPxfQXBUsTqG9qezuN+qvdfamOJo2rLeO9Ass1PCPyQ@mail.gmail.com \
    --to=imp@bsdimp.com \
    --cc=berrange@redhat.com \
    --cc=brad@comstyle.com \
    --cc=jrtc27@jrtc27.com \
    --cc=kevans@freebsd.org \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=reinoud@netbsd.org \
    --cc=riastradh@netbsd.org \
    --cc=richard.henderson@linaro.org \
    --cc=ryoon@netbsd.org \
    --cc=thuth@redhat.com \
    /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).