qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Michael Roth" <michael.roth@amd.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: [PATCH v2 0/4] qapi: generalize special features
Date: Fri, 18 Oct 2024 11:17:20 +0100	[thread overview]
Message-ID: <20241018101724.1221152-1-berrange@redhat.com> (raw)

This series is a spin-off from

  https://lists.nongnu.org/archive/html/qemu-devel/2024-06/msg00807.html

That series introduced a pragma allowing a schema to declare extra
features that would be exposed to code.

Following Markus' suggestion:

  https://lists.nongnu.org/archive/html/qemu-devel/2024-07/msg03765.html

I've changed impl such that we expose all features to the code
regardless of whether they are special, and don't require any pragma.

I've split it from the QGA patches since it makes more sense to work
on this bit in isolation.

Changed in v2:

 * Reference QapiSpecialFeature enums constants when defining
   QapiFeature enums constants for deprecated & unstable

 * Don't expose qapi-features.h in qapi-types.h, to avoid
   global namespace pollution, instead pull it into only the
   .c files that need it. This avoids the need to add a 'prefix'
   to enum constants

 * Collect all features during parse time, rather than
   generate time, to allow earlier error reporting of the
   64 feature limit

Daniel P. Berrangé (4):
  qapi: cope with  feature names containing a '-'
  qapi: change 'unsigned special_features' to 'uint64_t features'
  qapi: rename 'special_features' to 'features'
  qapi: expose all schema features to code

 include/qapi/compat-policy.h  |  2 +-
 include/qapi/qmp/dispatch.h   |  4 +--
 include/qapi/util.h           |  2 +-
 include/qapi/visitor-impl.h   |  4 +--
 include/qapi/visitor.h        | 12 +++----
 meson.build                   |  1 +
 qapi/qapi-forward-visitor.c   |  8 ++---
 qapi/qapi-util.c              |  6 ++--
 qapi/qapi-visit-core.c        | 12 +++----
 qapi/qmp-dispatch.c           |  2 +-
 qapi/qmp-registry.c           |  4 +--
 qapi/qobject-input-visitor.c  |  4 +--
 qapi/qobject-output-visitor.c |  6 ++--
 scripts/qapi/commands.py      |  5 +--
 scripts/qapi/features.py      | 62 +++++++++++++++++++++++++++++++++++
 scripts/qapi/gen.py           |  9 ++---
 scripts/qapi/main.py          |  2 ++
 scripts/qapi/schema.py        | 19 ++++++++++-
 scripts/qapi/types.py         | 18 +++++-----
 scripts/qapi/visit.py         | 17 +++++-----
 20 files changed, 143 insertions(+), 56 deletions(-)
 create mode 100644 scripts/qapi/features.py

-- 
2.46.0



             reply	other threads:[~2024-10-18 10:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-18 10:17 Daniel P. Berrangé [this message]
2024-10-18 10:17 ` [PATCH v2 1/4] qapi: cope with feature names containing a '-' Daniel P. Berrangé
2024-10-18 10:17 ` [PATCH v2 2/4] qapi: change 'unsigned special_features' to 'uint64_t features' Daniel P. Berrangé
2024-10-21  5:50   ` Philippe Mathieu-Daudé
2024-10-18 10:17 ` [PATCH v2 3/4] qapi: rename 'special_features' to 'features' Daniel P. Berrangé
2024-10-21  5:50   ` Philippe Mathieu-Daudé
2024-11-13 13:20   ` Markus Armbruster
2024-10-18 10:17 ` [PATCH v2 4/4] qapi: expose all schema features to code Daniel P. Berrangé
2024-11-14 12:48   ` Markus Armbruster
2024-11-14 13:25     ` Daniel P. Berrangé
2024-11-15  7:47       ` Markus Armbruster
2024-11-15 18:30         ` Daniel P. Berrangé

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=20241018101724.1221152-1-berrange@redhat.com \
    --to=berrange@redhat.com \
    --cc=armbru@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --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).