All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>
Cc: "Warner Losh" <imp@bsdimp.com>,
	qemu-devel@nongnu.org, "Kyle Evans" <kevans@freebsd.org>,
	"Stacey Son" <sson@freebsd.org>,
	"Jessica Clarke" <jrtc27@jrtc27.com>,
	"Mikaël Urankar" <mikael.urankar@gmail.com>,
	"Michal Meloun" <mmel@freebsd.org>,
	"Sean Bruno" <sbruno@freebsd.org>,
	"Karim Taha" <kariem.taha2.7@gmail.com>,
	"Alexander Kabaev" <kan@freebsd.org>
Subject: Re: [PATCH v2 00/37] bsd-user: Upstream most of the remaining system calls
Date: Wed, 3 Jun 2026 10:18:46 +0100	[thread overview]
Message-ID: <ah_xdtRTzzlch5jD@redhat.com> (raw)
In-Reply-To: <586de8e4-428c-4e05-99d1-574f09b89f15@oss.qualcomm.com>

On Fri, May 22, 2026 at 06:19:16PM -0700, Pierrick Bouvier wrote:
> On 5/22/2026 5:40 PM, Warner Losh wrote:
> > 
> > 
> > On Fri, May 22, 2026 at 6:04 PM Pierrick Bouvier
> > <pierrick.bouvier@oss.qualcomm.com
> > <mailto:pierrick.bouvier@oss.qualcomm.com>> wrote:
> > 
> >     On 5/18/2026 2:27 PM, Warner Losh wrote:
> >     > Upstream the file, thread, socket and remaining signal system
> >     calls (too
> >     > numerous to list here).
> >     >
> >     > This series is an ambitous use of claude to help me upstream all the
> >     > remaining system calls. I've batched them together in what I think are
> >     > reasonable chunks, and had claude do the grunt work of copying the
> >     code
> >     > over and attributing the commits from our complex branching
> >     history. The
> >     > chopping up was a bit arbitrary, but I think it's good. The commit
> >     > messages may be a little weak, but may also be OK. I've also double
> >     > checked the style and made fixes upstream for them as well. Claude
> >     also
> >     > reviewed all these changes and found a few bugs that I've fixed. I've
> >     > personally read through them all and haven't found anything glaring. I
> >     > fixed all the bugs that were found, in most cases differently than
> >     > claude's suggestions.
> >     >
> >     > I've added 'Assisted-by: Claude...' to all these commits to reflect my
> >     > leaning on Claude so hard. This use falls within the 'non-
> >     creative' use
> >     > that the Qemu project has said is OK. If that's not the right thing to
> >     > do, I can remove them.
> >     >
> >     > This leaves sysctl translation, the powerpc architecture support,
> >     > coredumps and a transition to 'truss' based system call tracing. With
> >     > these changes applied we'er down from a high of about 30k lines of
> >     diffs
> >     > to only 5k (not counting genereted, but checked in files in
> >     blitz). The
> >     > changes are 8k, so maybe a bit ambitious from that perspective as
> >     well.
> >     >
> >     > There's a few lines over 80 that I've not cleaned up. Let me know if
> >     > that's a problem. The other warnings are about adding files, and
> >     there's
> >     > no new MAINTAINERS entry needed. And the 'arch dependent defines
> >     should
> >     > be avoided' are needed to cope with different FreeBSD build systems
> >     > having different system calls.
> >     >
> >     > Note, this is called out below too, but in v2 I've folded back all the
> >     > fixes based on some out-of-band feedback I recieved to do this the
> >     > normal way and the qemu project isn't interested in the fixes to
> >     fixes.
> >     >
> >     > This is a big experiment, in many ways, for me, so I'm interested in
> >     > whatever feedback you may have to make things better in the future.
> >     >
> >     > Signed-off-by: Warner Losh <imp@bsdimp.com <mailto:imp@bsdimp.com>>

snip

> >     After reviewing (what I can) two thirds of the series, I don't feel very
> >     at ease with validating the rest. Not that there is problem in itself,
> >     but it's a massive add, and I'm not sure how we can ensure it's
> >     implemented correctly without any test exercising it.
> >     It's not particular to bsd-user, linux-user does not have test for all
> >     syscalls implemented neither.
> > 
> > 
> > Yes. I'd like a low-level test like that. The upstream bsd-user has been too
> > incomplete to run real programs prior to this series. And there's still some
> > issues that remain after these system calls (which is next up on my list: I
> > think elfload needs some patches for PIE).

snip

> In the real world, seems like we don't really have another option than
> taking it, except if you're ready to spend 6 months to add tests for
> this series. I'll let other reviewers finish the work for this series.
> 
> I'm not against the pragmatic approach of taking it, and let it be
> tested on the field. It would be unfair considering how the rest of QEMU
> is not always tested.

Yep, as a general rule we have no requirement for formal functional
tests for contributions to QEMU. The expectation is that the person
submitting the code has tested that it does what they claim. Anything
beyond that is a "nice to have". Especially  for brand new features,
we don't need to worry about regressions either.

This bsd-user code has had a complex history out of tree, so it is an
unusual situation compared to most other contributions we receive.
The FreeBSD maintainers have had a long term burden carrying this out
of tree for too long but it was actually used, while we've shipped a
non-functional version upstream that no one used.

In terms of code review we can assume that this is all already peer
reviewed by multiple people in the FreeBSD community. So unless someone
in QEMU community happens to have specific FreeBSD knowledge, I don't
think we really need to review this from a functional correctness POV.
The multiple Signed-off-bys already indicate sufficient functional
review IMHO.

Rather my expectation for merge is that we're doing more of a "sanity
check" that the patches are something that looks reasonable to accept,
following the normal QEMU coding practices/styles/etc.

Some formal in tree tests would be nice, but I'd say we should focus
on getting the current out of tree backlog merged, and worry about
tests later once the burden of merging the backlog is eliminated.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



      parent reply	other threads:[~2026-06-03  9:19 UTC|newest]

Thread overview: 73+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-18 21:27 [PATCH v2 00/37] bsd-user: Upstream most of the remaining system calls Warner Losh
2026-05-18 21:27 ` [PATCH v2 01/37] bsd-user: catchup to locking / mapping routines in bsd-misc Warner Losh
2026-05-19 15:00   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 02/37] bsd-user: Rename cpu_env to env throughout bsd-user Warner Losh
2026-05-19 14:59   ` Pierrick Bouvier
2026-05-19 15:05   ` Pierrick Bouvier
2026-05-19 17:32     ` Warner Losh
2026-05-18 21:27 ` [PATCH v2 03/37] bsd-user: Add bsd-signal.h with sigaction through sigreturn Warner Losh
2026-05-22 22:39   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 04/37] bsd-user: Add signal shims sigwait through kill and os-signal.h Warner Losh
2026-05-22 22:42   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 05/37] bsd-user: Add signal system call dispatch Warner Losh
2026-05-22 22:45   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 06/37] bsd-user: Add poll, lseek, pipe, and swap system call shims Warner Losh
2026-05-22 22:51   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 07/37] bsd-user: Add os-file.h with pipe2, chflagsat, close_range, and more Warner Losh
2026-05-22 22:54   ` Pierrick Bouvier
2026-05-25 21:32     ` Warner Losh
2026-05-18 21:27 ` [PATCH v2 08/37] bsd-user: Add file operation system call dispatch Warner Losh
2026-05-22 22:57   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 09/37] bsd-user: Add bsd-socket.h with bind through getsockname Warner Losh
2026-05-22 23:04   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 10/37] bsd-user: Add socket shims socketpair through shutdown Warner Losh
2026-05-22 23:08   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 11/37] bsd-user: Add os-socket.h with sendrecvmsg and message structures Warner Losh
2026-05-22 23:10   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 12/37] bsd-user: Add do_bsd_setsockopt and socket option definitions Warner Losh
2026-05-22 23:28   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 13/37] bsd-user: Add do_bsd_getsockopt Warner Losh
2026-05-22 23:28   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 14/37] bsd-user: Add FreeBSD socket helpers and sockaddr conversion Warner Losh
2026-05-22 23:29   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 15/37] bsd-user: Add os-socket.c with cmsg conversion functions Warner Losh
2026-05-22 23:31   ` Pierrick Bouvier
2026-05-23  4:35     ` Warner Losh
2026-05-18 21:27 ` [PATCH v2 16/37] bsd-user: Add socket system call dispatch Warner Losh
2026-05-22 23:31   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 17/37] bsd-user: Add os-time.h with clock and time-of-day functions Warner Losh
2026-05-22 23:32   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 18/37] bsd-user: Add utimes, futimes, and ktimer functions to os-time.h Warner Losh
2026-05-22 23:38   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 19/37] bsd-user: Add select, pselect, and ppoll " Warner Losh
2026-05-22 23:46   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 20/37] bsd-user: Add kqueue and kevent functions " Warner Losh
2026-05-22 23:49   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 21/37] bsd-user: Add sigtimedwait, itimer, and futimens " Warner Losh
2026-05-22 23:50   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 22/37] bsd-user: Add os-time.c and time-related type definitions Warner Losh
2026-05-22 23:52   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 23/37] bsd-user: Add time system call dispatch Warner Losh
2026-05-22 23:52   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 24/37] bsd-user: Add thread, umtx, and ACL type definitions Warner Losh
2026-05-22 23:53   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 25/37] bsd-user: Add cpu_copy and make init_task_state non-static Warner Losh
2026-05-22 23:53   ` Pierrick Bouvier
2026-05-18 21:27 ` [PATCH v2 26/37] bsd-user: Add os-thread.h with thr and context functions Warner Losh
2026-05-18 21:27 ` [PATCH v2 27/37] bsd-user: Add do_freebsd__umtx_op to os-thread.h Warner Losh
2026-05-18 21:27 ` [PATCH v2 28/37] bsd-user: Add os-thread.c with umtx, mutex, and thread creation Warner Losh
2026-05-18 21:27 ` [PATCH v2 29/37] bsd-user: Add thread system call dispatch Warner Losh
2026-05-18 21:27 ` [PATCH v2 30/37] bsd-user: Add os-extattr.h with file and fd extattr functions Warner Losh
2026-05-18 21:27 ` [PATCH v2 31/37] bsd-user: Add link and list extattr functions to os-extattr.h Warner Losh
2026-05-18 21:27 ` [PATCH v2 32/37] bsd-user: Add ACL system call shims " Warner Losh
2026-05-18 21:27 ` [PATCH v2 33/37] bsd-user: Add os-extattr.c with ACL conversion functions Warner Losh
2026-05-18 21:27 ` [PATCH v2 34/37] bsd-user: Add extended attribute and ACL system call dispatch Warner Losh
2026-05-18 21:27 ` [PATCH v2 35/37] bsd-user: Add scheduler and cpuset functions to os-misc.h Warner Losh
2026-05-18 21:27 ` [PATCH v2 36/37] bsd-user: Add kmod, posix, and misc " Warner Losh
2026-05-18 21:27 ` [PATCH v2 37/37] bsd-user: Add scheduler, cpuset, kmod, and misc syscall dispatch Warner Losh
2026-05-23  0:03 ` [PATCH v2 00/37] bsd-user: Upstream most of the remaining system calls Pierrick Bouvier
2026-05-23  0:40   ` Warner Losh
2026-05-23  1:19     ` Pierrick Bouvier
2026-05-23 18:56       ` Helge Deller
2026-05-25  2:17         ` Warner Losh
2026-06-03  9:18       ` Daniel P. Berrangé [this message]

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=ah_xdtRTzzlch5jD@redhat.com \
    --to=berrange@redhat.com \
    --cc=imp@bsdimp.com \
    --cc=jrtc27@jrtc27.com \
    --cc=kan@freebsd.org \
    --cc=kariem.taha2.7@gmail.com \
    --cc=kevans@freebsd.org \
    --cc=mikael.urankar@gmail.com \
    --cc=mmel@freebsd.org \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sbruno@freebsd.org \
    --cc=sson@freebsd.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.