qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Damien Hedde <damien.hedde@greensocs.com>
To: "Michal Prívozník" <mprivozn@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
	qemu-devel@nongnu.org, Igor Mammedov <imammedo@redhat.com>
Subject: Re: [PATCH] qmp: Stabilize preconfig
Date: Wed, 10 Nov 2021 14:23:09 +0100	[thread overview]
Message-ID: <ca9fedf8-92bc-cb74-8448-74793429eaad@greensocs.com> (raw)
In-Reply-To: <40bc6df2-496f-b303-2c10-f28ab4f9608c@redhat.com>



On 11/10/21 13:54, Michal Prívozník wrote:
> On 11/3/21 9:02 AM, Markus Armbruster wrote:
>> Daniel P. Berrangé <berrange@redhat.com> writes:
>>
>>> On Mon, Nov 01, 2021 at 03:37:58PM +0100, Michal Prívozník wrote:
>>>> On 10/25/21 2:19 PM, Markus Armbruster wrote:
>>>>> Michal Privoznik <mprivozn@redhat.com> writes:
>>>>>
>>>>>> The -preconfig option and exit-preconfig command are around for
>>>>>> quite some time now. However, they are still marked as unstable.
>>>>>> This is suboptimal because it may block some upper layer in
>>>>>> consuming it. In this specific case - Libvirt avoids using
>>>>>> experimental features.
>>>>>>
>>>>>> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
>>>>>
>>>>> If I remember correctly, the motivation for -preconfig was NUMA
>>>>> configuration via QMP.  More uses may have appeared since.
>>>>>
>>>>> Back then, I questioned the need for yet another option and yet another
>>>>> state: why not -S?
>>>>>
>>>>> The answer boiled down to
>>>>>
>>>>> 0. Yes, having just one would be a simpler and cleaner interface, but
>>>>>
>>>>> 1. the godawful mess QEMU startup has become makes -S unsuitable for
>>>>>     some things we want to do, so we need -preconfig,
>>>>>
>>>>> 2. which is in turn unsuitable for other things we want to do, so we
>>>>>     still need -S".
>>>>>
>>>>> 3. Cleaning up the mess to the point where "simpler and cleaner" becomes
>>>>>     viable again is not in the cards right now.
>>>>
>>>> I see a difference between the two. -preconfig starts QEMU in such a way
>>>> that its configuration can still be changed (in my particular use case
>>>> vCPUs can be assigned to NUMA nodes), while -S does not allow that. If
>>>> we had one state for both, then some commands must be forbidden from
>>>> executing as soon as 'cont' is issued. Moreover, those commands would
>>>> need to do much more than they are doing now (e.g. regenerate ACPI table
>>>> after each run). Subsequently, validating configuration would need to be
>>>> postponed until the first 'cont' because with just one state QEMU can't
>>>> know when the last config command was issued.
>>
>> Doesn't all this apply to x-exit-preconfig already?
>>
>> * Some commands are only allowed before x-exit-preconfig,
>>    e.g. set-numa-node.
>>
>> * The complete (pre-)configuration is only available at
>>    x-exit-preconfig.  In particular, ACPI tables can be fixed only then.
> 
> So why was preconfig introduced in the first place? I mean, from
> libvirt's POV it doesn't really matter whether it needs to use both
> -preconfig and -S or just -S (or some new -option). But ideally, we
> would start QEMU with nothing but monitor config and then pass whole
> configuration via the monitor. I thought it would be simpler for QEMU if
> it had three states.
> 
> Michal
> 
> 

IMHO only introducing preconfig allowed to pause qemu at an early-enough 
stage to do qemu configuration. '-S' was just way too late.

We can hope being able, some day, to start with only preconfig and 
monitor setup and do all the rest using the monitor. AFAIK, right now 
accelerator, machine and device options cannot be configured on the 
monitor even with preconfig. For the devices it should be doable soon.

Damien


  reply	other threads:[~2021-11-10 13:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25 11:08 [PATCH] qmp: Stabilize preconfig Michal Privoznik
2021-10-25 12:19 ` Markus Armbruster
2021-10-25 17:01   ` Paolo Bonzini
2021-11-01 14:37   ` Michal Prívozník
2021-11-01 14:57     ` Daniel P. Berrangé
2021-11-03  8:02       ` Markus Armbruster
2021-11-03  9:27         ` Daniel P. Berrangé
2021-11-10 12:54         ` Michal Prívozník
2021-11-10 13:23           ` Damien Hedde [this message]
2021-11-10 21:56         ` Paolo Bonzini
2021-11-11  6:11           ` Markus Armbruster
2021-11-11  8:15             ` Paolo Bonzini
2021-11-11 14:37               ` Markus Armbruster
2021-11-11 19:22                 ` Paolo Bonzini
2021-11-12 11:48                   ` Markus Armbruster
2021-11-12 22:18                     ` Paolo Bonzini
2021-11-13  7:52                       ` Markus Armbruster
2021-11-15 12:37                         ` Paolo Bonzini
2021-11-15 15:40                           ` Markus Armbruster
2021-11-16  6:50                             ` Paolo Bonzini

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=ca9fedf8-92bc-cb74-8448-74793429eaad@greensocs.com \
    --to=damien.hedde@greensocs.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mprivozn@redhat.com \
    --cc=pbonzini@redhat.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).