From: Murilo Opsfelder Araujo <muriloo@linux.ibm.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org, "Eduardo Habkost" <ehabkost@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Markus Armbruster" <armbru@redhat.com>,
"Hervé Poussineau" <hpoussin@reactos.org>,
qemu-ppc@nongnu.org,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <rth@twiddle.net>,
"Eric Blake" <eblake@redhat.com>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] add QemuSupportState
Date: Tue, 30 Oct 2018 14:30:02 -0300 [thread overview]
Message-ID: <20181030173002.GA4914@kermit-br-ibm-com.br.ibm.com> (raw)
In-Reply-To: <20181030111348.14713-2-kraxel@redhat.com>
Hi, Gerd.
On Tue, Oct 30, 2018 at 12:13:45PM +0100, Gerd Hoffmann wrote:
> Indicates support state for somerhing (device, backend, subsystem, ...)
> in qemu. Modeled roughly after the "S:" states we have in MAINTANERS.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> include/qemu/support-state.h | 17 +++++++++++++++++
> util/support-state.c | 23 +++++++++++++++++++++++
> qapi/common.json | 16 ++++++++++++++++
> util/Makefile.objs | 1 +
> 4 files changed, 57 insertions(+)
> create mode 100644 include/qemu/support-state.h
> create mode 100644 util/support-state.c
>
> diff --git a/include/qemu/support-state.h b/include/qemu/support-state.h
> new file mode 100644
> index 0000000000..5fd3c83eee
> --- /dev/null
> +++ b/include/qemu/support-state.h
> @@ -0,0 +1,17 @@
> +#ifndef QEMU_SUPPORT_STATE_H
> +#define QEMU_SUPPORT_STATE_H
> +
> +#include "qapi/qapi-types-common.h"
> +
> +typedef struct QemuSupportState {
> + SupportState state;
> + const char *reason;
> +} QemuSupportState;
> +
> +void qemu_warn_support_state(const char *type, const char *name,
> + QemuSupportState *state);
> +
> +bool qemu_is_deprecated(QemuSupportState *state);
> +bool qemu_is_obsolete(QemuSupportState *state);
> +
> +#endif /* QEMU_SUPPORT_STATE_H */
> diff --git a/util/support-state.c b/util/support-state.c
> new file mode 100644
> index 0000000000..7966fa0fc7
> --- /dev/null
> +++ b/util/support-state.c
> @@ -0,0 +1,23 @@
> +#include "qemu/osdep.h"
> +#include "qemu/error-report.h"
> +#include "qemu/support-state.h"
> +
> +void qemu_warn_support_state(const char *type, const char *name,
> + QemuSupportState *state)
> +{
> + warn_report("%s %s is %s%s%s%s", type, name,
> + SupportState_str(state->state),
> + state->reason ? " (" : "",
> + state->reason ? state->reason : "",
> + state->reason ? ")" : "");
> +}
> +
> +bool qemu_is_deprecated(QemuSupportState *state)
> +{
> + return state->state == SUPPORT_STATE_DEPRECATED;
> +}
> +
> +bool qemu_is_obsolete(QemuSupportState *state)
> +{
> + return state->state == SUPPORT_STATE_OBSOLETE;
> +}
> diff --git a/qapi/common.json b/qapi/common.json
> index 021174f04e..78176151af 100644
> --- a/qapi/common.json
> +++ b/qapi/common.json
> @@ -151,3 +151,19 @@
> 'ppc64', 'riscv32', 'riscv64', 's390x', 'sh4',
> 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
> 'x86_64', 'xtensa', 'xtensaeb' ] }
> +
> +##
> +# @SupportState:
> +#
> +# Indicate Support level of qemu devices, backends, subsystems, ...
> +#
> +# Since: 3.2
> +##
> +{ 'enum': 'SupportState',
> + 'data': [ 'unknown',
> + 'supported',
> + 'maintained',
> + 'odd-fixes',
> + 'orphan',
> + 'obsolete',
> + 'deprecated' ] }
Regardless how fine-grained we decide to be here, is it possible that
you describe in the documentation comment where each state shall be
used?
--
Murilo
next prev parent reply other threads:[~2018-10-30 17:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-30 11:13 [Qemu-devel] [PATCH 0/4] Introducing QemuSupportState Gerd Hoffmann
2018-10-30 11:13 ` [Qemu-devel] [PATCH 1/4] add QemuSupportState Gerd Hoffmann
2018-10-30 13:32 ` Philippe Mathieu-Daudé
2018-10-30 14:00 ` Gerd Hoffmann
2018-10-30 14:13 ` Philippe Mathieu-Daudé
2018-10-30 15:46 ` Cornelia Huck
2018-10-30 17:37 ` Philippe Mathieu-Daudé
2018-10-30 23:15 ` Eduardo Habkost
2018-10-31 9:22 ` Cornelia Huck
2018-11-05 7:30 ` Gerd Hoffmann
2018-11-05 13:49 ` Eduardo Habkost
2018-11-06 6:56 ` Gerd Hoffmann
2018-10-31 16:04 ` John Snow
2018-10-31 18:06 ` Eduardo Habkost
2018-10-31 18:37 ` John Snow
2018-10-31 18:58 ` Eduardo Habkost
2018-10-31 20:05 ` John Snow
2018-11-05 7:46 ` Gerd Hoffmann
2018-10-30 14:54 ` Eduardo Habkost
2018-10-30 15:02 ` Eduardo Habkost
2018-10-30 17:30 ` Murilo Opsfelder Araujo [this message]
2018-10-30 11:13 ` [Qemu-devel] [PATCH 2/4] add QemuSupportState to DeviceClass Gerd Hoffmann
2018-10-30 11:13 ` [Qemu-devel] [PATCH 3/4] tag cirrus as obsolete Gerd Hoffmann
2018-10-30 11:22 ` Paolo Bonzini
2018-10-30 11:13 ` [Qemu-devel] [PATCH 4/4] switch machine types to QemuSupportState Gerd Hoffmann
2018-10-30 11:22 ` [Qemu-devel] [PATCH 0/4] Introducing QemuSupportState Paolo Bonzini
2018-10-30 14:34 ` Eduardo Habkost
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=20181030173002.GA4914@kermit-br-ibm-com.br.ibm.com \
--to=muriloo@linux.ibm.com \
--cc=armbru@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=eblake@redhat.com \
--cc=ehabkost@redhat.com \
--cc=hpoussin@reactos.org \
--cc=kraxel@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/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).