From: Igor Mammedov <imammedo@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, armbru@redhat.com, ehabkost@redhat.com,
pkrempa@redhat.com, david@gibson.dropbear.id.au,
peter.maydell@linaro.org, pbonzini@redhat.com, cohuck@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3 5/9] QAPI: allow to specify valid runstates per command
Date: Wed, 28 Feb 2018 17:17:10 +0100 [thread overview]
Message-ID: <20180228171710.7afb41ad@redhat.com> (raw)
In-Reply-To: <25f9342d-2eea-9b87-d371-b66c4285a78d@redhat.com>
On Tue, 27 Feb 2018 16:10:31 -0600
Eric Blake <eblake@redhat.com> wrote:
> On 02/16/2018 06:37 AM, Igor Mammedov wrote:
> > Add optional 'runstates' parameter in QAPI command definition,
> > which will permit to specify RunState variations in which
> > a command could be exectuted via QMP monitor.
>
> s/exectuted/executed/
>
> >
> > For compatibility reasons, commands, that don't use
>
> s/commands,/commands/
>
> > 'runstates' explicitly, are not permited to run in
>
> s/explicitly,/explicitly/
> s/permited/permitted/
>
> > preconfig state but allowed in all other states.
> >
> > New option will be used to allow commands, which are
> > prepared/need to run this early, to run in preconfig state.
> > It will include query-hotpluggable-cpus and new set-numa-node
> > commands. Other commands that should be able to run in
> > preconfig state, should be ammeded to not expect machine
>
> s/ammeded/amended/
>
> > in initialized state.
> >
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > ---
> > include/qapi/qmp/dispatch.h | 5 +++-
> > monitor.c | 28 +++++++++++++++++---
> > qapi-schema.json | 12 +++++++--
> > qapi/qmp-dispatch.c | 39 ++++++++++++++++++++++++++++
> > qapi/qmp-registry.c | 4 ++-
> > qapi/run-state.json | 6 ++++-
> > scripts/qapi-commands.py | 46 ++++++++++++++++++++++++++-------
> > scripts/qapi-introspect.py | 2 +-
> > scripts/qapi.py | 15 +++++++----
> > scripts/qapi2texi.py | 2 +-
> > tests/qapi-schema/doc-good.out | 4 +--
> > tests/qapi-schema/ident-with-escape.out | 2 +-
> > tests/qapi-schema/indented-expr.out | 4 +--
> > tests/qapi-schema/qapi-schema-test.out | 18 ++++++-------
> > tests/qapi-schema/test-qapi.py | 6 ++---
> > 15 files changed, 151 insertions(+), 42 deletions(-)
>
[...]
> Overall, this is adding a lot of complexity to QMP; are we sure this is
> the interface libvirt wants to use for early NUMA configuration? Can we
> simplify it to just a new bool, similar to 'allow-oob'?
Being unsure if preconfig only specific knob would fly, I was trying
to introduce a generic mechanism that could be used to limit any command
to certain runstates.
I'd gladly to scrape it off and implement something like 'allow-oob'
if that's acceptable. It could be "preconfig-enabled" which defaults
to false and necessary commands would be explicitly marked as preconfig
enabled. Then I could just build into 'set-numa-node' C callback
an extra check to limit it only to preconfig state, like we typically
do in other handlers instead of going for more complex generic approach.
That would significantly simplify series.
next prev parent reply other threads:[~2018-02-28 16:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-16 12:37 [Qemu-devel] [PATCH v3 0/9] enable numa configuration before machine_init() from QMP Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 1/9] numa: postpone options post-processing till machine_run_board_init() Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 2/9] numa: split out NumaOptions parsing into parse_NumaOptions() Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 3/9] CLI: add -preconfig option Igor Mammedov
2018-02-27 20:39 ` Eric Blake
2018-02-28 15:54 ` Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 4/9] HMP: disable monitor in preconfig state Igor Mammedov
2018-03-07 14:01 ` Dr. David Alan Gilbert
2018-03-08 15:47 ` Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 5/9] QAPI: allow to specify valid runstates per command Igor Mammedov
2018-02-27 22:10 ` Eric Blake
2018-02-28 16:17 ` Igor Mammedov [this message]
2018-03-07 14:16 ` Dr. David Alan Gilbert
2018-03-08 15:55 ` Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 6/9] tests: extend qmp test with pereconfig checks Igor Mammedov
2018-02-27 22:13 ` Eric Blake
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 7/9] QMP: permit query-hotpluggable-cpus in preconfig state Igor Mammedov
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 8/9] QMP: add set-numa-node command Igor Mammedov
2018-02-27 22:17 ` Eric Blake
2018-02-16 12:37 ` [Qemu-devel] [PATCH v3 9/9] tests: functional tests for QMP command set-numa-node Igor Mammedov
2018-02-27 22:19 ` Eric Blake
2018-02-27 16:36 ` [Qemu-devel] [PATCH v3 0/9] enable numa configuration before machine_init() from QMP Igor Mammedov
2018-02-27 20:29 ` Eric Blake
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=20180228171710.7afb41ad@redhat.com \
--to=imammedo@redhat.com \
--cc=armbru@redhat.com \
--cc=cohuck@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=pkrempa@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).