On Sat, Aug 12, 2023 at 03:47:54PM +0300, Michael Tokarev wrote:
> qemu_init() calls os_parse_cmd_args(), which is obviously a very vl.c-specicic
> piece of code.  It looks like when moving vl.c to softmmu/, os-posix.c 
> should've
> been moved too (together with os-win32.c).  But there are other functions in
> os-posix.c which are used by other parts of the code, eg qemu-nbd or
> qemu-storage-daemon both uses parts from there.  The result is rather ugly.
> One of the side-effects is that even if system build is disabled, we still
> have to compile util/async-teardown.c, since it is used in os-posix.c, - and
> this one can not be built on ia64 due to lack of clone syscall.  But qemu-nbd
> does not need async-teardown, which is also very softmmu-specific.
> 
> This patchset tries to address these defects.  It moves the "bottom half" of
> vl.c options processing back into vl.c, effectively undoing commit 
> 59a5264b99434
> from 2010.  We do not have many os-specific options, and this move makes
> qemu_init() the only function which processes options, all in the single
> place, which is, in my opinion, easier to manage.
> 
> Before this move, lower-level constructs (chroot, runas) are being exported.
> 
> In the end, we have almost no softmmu-related things in os-posix.c, and the
> same functionality can be actually used in qemu-storage-daemon or qemu-nbd.
> For qemu-nbd, it is now possible to switch to using -runas/-chroot/etc the
> same way as qemu-storage-daemon does, instead of having one more abstraction
> named qemu_daemon().

Given that qemu-nbd is affected, I'm happy to queue this through my
NBD tree if no one else picks it up first.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org


Reply via email to