All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Marc-André Lureau" <marcandre.lureau@gmail.com>,
	QEMU <qemu-devel@nongnu.org>, "John Snow" <jsnow@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: About query-qmp-schema
Date: Wed, 22 Apr 2026 13:56:33 +0100	[thread overview]
Message-ID: <aejFgQ53UHf72v5Y@redhat.com> (raw)
In-Reply-To: <87ldefz0qk.fsf@pond.sub.org>

On Wed, Apr 22, 2026 at 01:35:31PM +0200, Markus Armbruster wrote:
> Marc-André Lureau <marcandre.lureau@gmail.com> writes:
> 

snip

> >>                       and it may be a type that is not even used by
> >> qmp commands/events.
> 
> Yes, because query-qmp-schema returns the *QMP* schema.
> 
> >>                      A quick test shows the current schema is about
> >> ~243kb of json. With all types, it grows to ~273kb. Unmask it grows to
> >> ~308kb.
> >>
> >> Could we send the full version? Eventually, we could have a "flavour":
> >> "full" argument.
> >>
> >> Another option is to compress the schema. A "full-gz" in baes64 would be 51kb.


> 
> > - At runtime, query-qmp-schema decompresses it and parses the JSON to
> > keep compatibility with existing commands, applying filtering and
> > typename substitution
> > - Add a query-qmp-schema-data, which returns the unmodified compressed
> > JSON schema blob (~35kb in base64)
> 
> If we expose QAPI schema type names externally, they become ABI.  The
> design decision not to has enabled schema refactorings time and again.
> Changing that feels like a bad idea.

Yeah the ability to change our type names has been surprisingly
useful and common, in fact because it allows more than just
type name changes. A single type exposed in QMP can map to
multiple types in QAPI, thanks to the inheritance from the
'base' keyword.  That inheritance is flattended in what we
expose in QMP.



With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



      reply	other threads:[~2026-04-22 12:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21  8:11 About query-qmp-schema Marc-André Lureau
2026-04-21 20:19 ` Marc-André Lureau
2026-04-22 11:35   ` Markus Armbruster
2026-04-22 12:56     ` Daniel P. Berrangé [this message]

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=aejFgQ53UHf72v5Y@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=marcandre.lureau@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.