qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

util/async-teardown.c: is it really needed for --disable-system build?


From: Michael Tokarev
Subject: util/async-teardown.c: is it really needed for --disable-system build?
Date: Sat, 12 Aug 2023 12:38:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0

Hi!

On Debian we're building qemu tools (eg qemu-img &Co) on systems which don't
support qemu-system.  And after commit c891c24b1a "os-posix: asynchronous
teardown for shutdown on Linux", this fails on certain architectures too,
notable on ia64.  This is because ia64 does not have the "traditional"
linux clone system call, it has clone2 with different stack setup.

But I wonder why this file is being compiled to begin with, when 
--disable-system
is specified?

os-posix.c (which calls init_async_teardown() from os_parse_cmd_args()) is 
marked
as part of blockdev_ss, not just system_ss.

qemu-nbd calls os_setup_early_signal_handling() from os-posix.c.  This is, I 
guess,
why os-posix.c is part of blockdev_ss.

qemu-storage-daemon uses: os_set_daemonize(), os_setup_signal_handling(), 
os_setup_post().

And util/async-teardown.c is always built on linux.

It smells like, at the very least, os-posix.c should be split. We shouldn't 
include
a ton of qemu-system functionality (like very specific option parsing) into 
qemu-nbd
for example.

How about splitting os-posix.c into a few files in util/ (not in the root dir), 
and
adding them to util_ss in case of posix-os?  Ditto for os-win32.c, I guess, but 
I
haven't looked at this.

And for the question in $subj, this one needs to be guarded by CONFIG_SOFTMMU.

Thanks,

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]