qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Sriram Yagnaraman" <sriram.yagnaraman@ericsson.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Keith Busch" <kbusch@kernel.org>,
	"Klaus Jensen" <its@irrelevant.dk>,
	"Markus Armbruster" <armbru@redhat.com>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 3/4] hw/pci: Convert rom_bar into OnOffAuto
Date: Mon, 8 Jul 2024 09:00:50 +0100	[thread overview]
Message-ID: <ZoucsqZBEjrlWYC8@redhat.com> (raw)
In-Reply-To: <20240706-rombar-v1-3-802daef2aec1@daynix.com>

On Sat, Jul 06, 2024 at 06:29:23PM +0900, Akihiko Odaki wrote:
> rom_bar is tristate but was defined as uint32_t so convert it into
> OnOffAuto to clarify that. For compatibility, a uint32 value set via
> QOM will be converted into OnOffAuto.
> 
> Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> ---
>  docs/igd-assign.txt               |  2 +-
>  include/hw/pci/pci_device.h       |  2 +-
>  hw/pci/pci.c                      | 57 +++++++++++++++++++++++++++++++++++++--
>  hw/vfio/pci-quirks.c              |  2 +-
>  hw/vfio/pci.c                     | 11 ++++----
>  hw/xen/xen_pt_load_rom.c          |  4 +--
>  tests/qtest/virtio-net-failover.c | 32 +++++++++++-----------
>  7 files changed, 81 insertions(+), 29 deletions(-)

> +static void rom_bar_set(Object *obj, Visitor *v, const char *name, void *opaque,
> +                        Error **errp)
> +{
> +    Property *prop = opaque;
> +    Error *local_err = NULL;
> +    int *ptr = object_field_prop_ptr(obj, prop);
> +    uint32_t value;
> +
> +    visit_type_enum(v, name, ptr, prop->info->enum_table, &local_err);
> +    if (!local_err) {
> +        return;
> +    }
> +
> +    if (visit_type_uint32(v, name, &value, NULL)) {
> +        if (value) {
> +            *ptr = ON_OFF_AUTO_ON;
> +            warn_report("Specifying a number for rombar is deprecated; replace a non-zero value with 'on'");
> +        } else {
> +            *ptr = ON_OFF_AUTO_OFF;
> +            warn_report("Specifying a number for rombar is deprecated; replace 0 with 'off'");
> +        }

If you're going to say something is deprecated, you need to update
the deprecated.rst docs to make this visible to users.

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  reply	other threads:[~2024-07-08  8:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-06  9:29 [PATCH 0/4] hw/pci: Convert rom_bar into OnOffAuto Akihiko Odaki
2024-07-06  9:29 ` [PATCH 1/4] qapi: Add visit_type_str_preserving() Akihiko Odaki
2024-07-06  9:29 ` [PATCH 2/4] qapi: Do not consume a value when visit_type_enum() fails Akihiko Odaki
2024-07-06  9:29 ` [PATCH 3/4] hw/pci: Convert rom_bar into OnOffAuto Akihiko Odaki
2024-07-08  8:00   ` Daniel P. Berrangé [this message]
2024-07-06  9:29 ` [PATCH 4/4] hw/qdev: Remove opts member Akihiko Odaki

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=ZoucsqZBEjrlWYC8@redhat.com \
    --to=berrange@redhat.com \
    --cc=akihiko.odaki@daynix.com \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=clg@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=its@irrelevant.dk \
    --cc=jasowang@redhat.com \
    --cc=kbusch@kernel.org \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sriram.yagnaraman@ericsson.com \
    /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).