[PATCH 0/5] bsd-user: Generate system call numbers

Warner Losh posted 5 patches 2 weeks, 2 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260413-syscall-nr-v1-0-f70408d042ea@bsdimp.com
Maintainers: Warner Losh <imp@bsdimp.com>, Kyle Evans <kevans@freebsd.org>, Paolo Bonzini <pbonzini@redhat.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>
There is a newer version of this series
bsd-user/bsd-mem.h             |   2 +
bsd-user/freebsd/meson.build   |   4 +
bsd-user/freebsd/os-syscall.c  |   4 +
bsd-user/freebsd/os-syscall.h  |  21 ++
bsd-user/freebsd/strace.list   |   4 +
bsd-user/freebsd/syscall_nr.h  | 515 -----------------------------------------
bsd-user/freebsd/syscallhdr.sh |   9 +
bsd-user/syscall_defs.h        |  18 +-
meson.build                    |   2 +
9 files changed, 47 insertions(+), 532 deletions(-)
[PATCH 0/5] bsd-user: Generate system call numbers
Posted by Warner Losh 2 weeks, 2 days ago
FreeBSD has a system call number header, sys/syscall.h, that's installed
on every system that can compile qemu. Generate the system call numbers
from that table rather than re-regenerating it yet again.

To do this, I have to clean up a few stragglers for system calls we've
removed. But these returned not supported anyway, so there's no net
change.

I also tried to do this in a way that the other bsds can coexist with
should they show up again in the future. To that end, I moved the
definition of time_t into os-syscall.h, where I noticed it was wrong for
amd64 targets (which is little used and missing features, so it went
unnoticed for a long time).

More will be generated in the future, but this is the first steps.

Signed-off-by: Warner Losh <imp@bsdimp.com>
---
Warner Losh (5):
      bsd-user: Add syscall header generator for FreeBSD
      bsd-user: Generate the system call numbers in meson build.
      bsd-user: Conditionally use old system calls
      bsd-user: Create os-syscall.h
      bsd-user: Switch to generated syscall_nr.h

 bsd-user/bsd-mem.h             |   2 +
 bsd-user/freebsd/meson.build   |   4 +
 bsd-user/freebsd/os-syscall.c  |   4 +
 bsd-user/freebsd/os-syscall.h  |  21 ++
 bsd-user/freebsd/strace.list   |   4 +
 bsd-user/freebsd/syscall_nr.h  | 515 -----------------------------------------
 bsd-user/freebsd/syscallhdr.sh |   9 +
 bsd-user/syscall_defs.h        |  18 +-
 meson.build                    |   2 +
 9 files changed, 47 insertions(+), 532 deletions(-)
---
base-commit: becd22fdc2a071783d9e04421526633772b3b98c
change-id: 20260412-syscall-nr-a0a831fce9a0

Best regards,
-- 
Warner Losh <imp@bsdimp.com>