From: Paolo Bonzini <pbonzini@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Damien Hedde" <damien.hedde@greensocs.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Mark Burton" <mark.burton@greensocs.com>,
qemu-devel@nongnu.org,
"Mirela Grujic" <mirela.grujic@greensocs.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: Redesign of QEMU startup & initial configuration
Date: Mon, 13 Dec 2021 18:37:44 +0100 [thread overview]
Message-ID: <16cd5683-4f97-d24c-dd19-24febcab7ba8@redhat.com> (raw)
In-Reply-To: <878rwozfqm.fsf@dusky.pond.sub.org>
On 12/13/21 16:28, Markus Armbruster wrote:
> Paolo Bonzini <pbonzini@redhat.com> writes:
>
>> On 12/10/21 14:54, Markus Armbruster wrote:
>>> I want an open path to a single binary. Taking years to get there is
>>> fine.
>>
>> The single binary is a distraction in my opinion. Imagine
>> instead of vl.c you have this in your second binary:
>
> [...]
>
>> static void open_socket_and_monitor(void)
>> {
>> int nfds = check_socket_activation();
>> Chardev *chardev;
>> if (nfds > 1) {
>> error_report("QEMU only supports listening on one socket");
>> exit(1);
>> }
>> if (!nfds) {
>> ChardevBackend backend = {
>> .type = CHARDEV_BACKEND_KIND_STDIO,
>> .u.stdio.data = &(ChardevStdio) {
>> .has_signal = true,
>> .signal = false
>> }
>> };
>> chardev = qemu_chardev_new("#qmp0", TYPE_CHARDEV_STDIO, &backend, NULL, &error_fatal);
>> } else {
>> ChardevBackend backend = {
>> .type = CHARDEV_BACKEND_KIND_SOCKET,
>> .u.socket.data = &(ChardevSocket) {
>> .addr = &(SocketAddressLegacy) {
>> .type = SOCKET_ADDRESS_LEGACY_KIND_FD,
>> .u.fd.data = &(String){
>> .str = (char *) stringify(FIRST_SOCKET_ACTIVATION_FD)
>> }
>> }
>> }
>> };
>> chardev = qemu_chardev_new("#qmp0", TYPE_CHARDEV_SOCKET, &backend, NULL, &error_fatal);
>> }
>> monitor_init_qmp(chardev, true, &error_fatal);
>> }
>>
>> void qemu_init(int argc, char **argv, char **envp)
>> {
>> error_init(argv[0]);
>> qemu_init_exec_dir(argv[0]);
>> qemu_init_subsystems();
>>
>> /* Missing: parse -name, -sandbox, -trace, -L */
>>
>> loc_set_none();
>> rcu_disable_atfork();
>> qemu_init_main_loop(&error_fatal);
>> cpu_timers_init();
>> open_socket_and_monitor();
>> init_displaystate();
>> os_setup_signal_handling();
>> }
>>
>> This is the ultimate QEMU startup code. If we can get this code to
>> actually build a machine, you've reached the point where you don't care
>> about what is in the command line parser; and consequently you don't care
>> if there is one binary or two.
>
> Define "you". Also explain why it should include me, because I think it
> doesn't :)
Impersonal you. :)
> By when can we have this second binary in master? Opinion, please, not
> promise.
Define "have":
- a binary that builds
- a binary that builds a bootable guest
- a binary that builds any guest that the current well-maintained
targets can build, using a given (but roughly full-featured) subset of
options
Estimates for the first are easy (it's in my tree), estimates for the
second depends on somebody helping (upstreaming -M smp took months
between me being busy, reviewers being busy, and releases freezing
development), estimates for the third are hard.
> Would you object to me expanding the CLI here to the point where I think
> we can deprecate the old binary?
>
> If yes, why?
Yes, for two reasons.
First, because there will be usually differences between the command
lines as mentioned elsewhere in the thread. qemu-system-* is a good
name, but one that is already taken by 15 years of docs using the
existing command line.
Second, because a command line is really hard to get right as complexity
increases. QMP is the way to go to get as clean as possible a
configuration mechanism. There *will* be a second set of warts layered
on top of the above code, and I don't want that.
Paolo
> If no, the file names climain.c and qmpmain.c you mentioned upthread
> won't last. Recommend to pick better names.
>
>
next prev parent reply other threads:[~2021-12-13 17:39 UTC|newest]
Thread overview: 68+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 6:57 Redesign of QEMU startup & initial configuration Markus Armbruster
2021-12-09 19:11 ` Daniel P. Berrangé
2021-12-09 20:01 ` Mark Burton
2021-12-09 20:28 ` Daniel P. Berrangé
2021-12-10 8:34 ` Paolo Bonzini
2021-12-10 11:25 ` Daniel P. Berrangé
2021-12-10 14:15 ` Mark Burton
2021-12-10 14:26 ` Daniel P. Berrangé
2021-12-10 14:42 ` Mark Burton
2021-12-10 15:13 ` Paolo Bonzini
2021-12-10 15:26 ` Markus Armbruster
2021-12-10 15:39 ` Daniel P. Berrangé
2021-12-13 15:19 ` Markus Armbruster
2021-12-13 17:30 ` Paolo Bonzini
2021-12-13 17:59 ` Daniel P. Berrangé
2021-12-13 20:22 ` Mark Burton
2021-12-14 13:05 ` Daniel P. Berrangé
2021-12-14 13:11 ` Mark Burton
2021-12-14 13:21 ` Daniel P. Berrangé
2021-12-14 13:36 ` Mark Burton
2021-12-14 13:48 ` Daniel P. Berrangé
2021-12-14 14:42 ` Mark Burton
2021-12-14 14:56 ` Daniel P. Berrangé
2021-12-14 15:12 ` Markus Armbruster
2021-12-14 15:14 ` Mark Burton
2021-12-10 13:54 ` Markus Armbruster
2021-12-10 15:38 ` Paolo Bonzini
2021-12-13 15:28 ` Markus Armbruster
2021-12-13 17:37 ` Paolo Bonzini [this message]
2021-12-13 18:07 ` Daniel P. Berrangé
2021-12-13 18:37 ` Paolo Bonzini
2021-12-13 18:53 ` Daniel P. Berrangé
2021-12-14 7:09 ` Meeting today? Mark Burton
2021-12-14 11:37 ` Markus Armbruster
2021-12-14 11:39 ` Mark Burton
2021-12-14 12:49 ` Daniel P. Berrangé
2021-12-14 14:49 ` Markus Armbruster
2022-01-04 9:29 ` Edgar E. Iglesias
2022-01-06 11:21 ` "Startup" meeting (was Re: Meeting today?) Mark Burton
2022-01-06 11:23 ` Daniel P. Berrangé
2022-01-11 10:20 ` Philippe Mathieu-Daudé
2022-01-11 10:22 ` Mark Burton
2022-01-17 17:13 ` Kevin Wolf
2022-01-17 19:02 ` Markus Armbruster
2022-01-23 20:49 ` Mark Burton
2022-01-25 8:50 ` Juan Quintela
2022-01-25 10:45 ` Philippe Mathieu-Daudé via
2022-01-25 10:58 ` Juan Quintela
2022-02-08 11:52 ` Mark Burton
2022-02-08 12:35 ` Juan Quintela
2022-01-11 10:28 ` Daniel P. Berrangé
2021-12-15 18:46 ` Redesign of QEMU startup & initial configuration Paolo Bonzini
2021-12-15 18:50 ` Daniel P. Berrangé
2021-12-14 11:48 ` Markus Armbruster
2021-12-14 13:00 ` Mark Burton
2021-12-14 14:54 ` Markus Armbruster
2021-12-15 20:00 ` Paolo Bonzini
2021-12-15 20:14 ` Mark Burton
2021-12-16 10:24 ` Markus Armbruster
2021-12-16 15:28 ` Paolo Bonzini
2021-12-16 15:40 ` Daniel P. Berrangé
2021-12-16 16:00 ` Mark Burton
2021-12-16 16:15 ` Daniel P. Berrangé
2021-12-16 16:27 ` Mark Burton
2021-12-13 10:51 ` Damien Hedde
2021-12-13 15:47 ` Markus Armbruster
2022-01-04 12:40 ` Richard W.M. Jones
2022-01-13 16:10 ` Markus Armbruster
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=16cd5683-4f97-d24c-dd19-24febcab7ba8@redhat.com \
--to=pbonzini@redhat.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=damien.hedde@greensocs.com \
--cc=edgar.iglesias@gmail.com \
--cc=marcandre.lureau@redhat.com \
--cc=mark.burton@greensocs.com \
--cc=mirela.grujic@greensocs.com \
--cc=qemu-devel@nongnu.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 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).