All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Yonggang Luo <luoyonggang@gmail.com>
Cc: qemu-devel@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	qemu-arm@nongnu.org, "Song Gao" <17746591750@163.com>,
	"Matthew Rosato" <mjrosato@linux.ibm.com>,
	"Philippe Mathieu-Daude" <philmd@mailo.com>,
	"David Hildenbrand" <david@kernel.org>,
	"Philippe Mathieu-Daudé" <philmd@oss.qualcomm.com>,
	"Fam Zheng" <fam@euphon.net>, "Max Filippov" <jcmvbkbc@gmail.com>,
	qemu-s390x@nongnu.org, "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
	"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
	"Eric Farman" <farman@linux.ibm.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Cornelia Huck" <cohuck@redhat.com>,
	"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>
Subject: Re: [PATCH v2 09/12] hw/virtio: register s390x virtio-blk-pci and virtio-net-pci variants
Date: Thu, 5 Nov 2026 11:03:28 +0000	[thread overview]
Message-ID: <auxigHswmymEQogo@redhat.com> (raw)
In-Reply-To: <20261031164009.2048-10-luoyonggang@gmail.com>

On Sun, Nov 01, 2026 at 12:40:04AM +0800, Yonggang Luo wrote:
> virtio-blk-pci and virtio-net-pci added the s390x loadparm property
> from class_init when target_s390x() was true. Register each
> VirtioPCIDeviceTypeInfo twice. The s390x variant calls
> pci_qdev_property_add_specifics(), which now always adds loadparm,
> and the other variant does not. target_s390x() and target_not_s390x() select
> the two.
> 
> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  hw/pci/pci.c               | 13 +++++--------
>  hw/virtio/virtio-blk-pci.c | 27 ++++++++++++++++++++++++++-
>  hw/virtio/virtio-net-pci.c | 27 ++++++++++++++++++++++++++-
>  3 files changed, 57 insertions(+), 10 deletions(-)
> 
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 2d2fe02c68e..b5ea0b049aa 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -2901,14 +2901,11 @@ void pci_qdev_property_add_specifics(DeviceClass *dc)
>  {
>      ObjectClass *oc = OBJECT_CLASS(dc);
>  
> -    /* The loadparm property is only supported on s390x */
> -    if (target_s390x()) {
> -        object_class_property_add_str(oc, "loadparm",
> -                                      pci_qdev_property_get_loadparm,
> -                                      pci_qdev_property_set_loadparm);
> -        object_class_property_set_description(oc, "loadparm",
> -                                              "load parameter (s390x only)");
> -    }
> +    object_class_property_add_str(oc, "loadparm",
> +                                  pci_qdev_property_get_loadparm,
> +                                  pci_qdev_property_set_loadparm);
> +    object_class_property_set_description(oc, "loadparm",
> +                                          "load parameter (s390x only)");
>  }
>  
>  MemoryRegion *pci_address_space(PCIDevice *dev)

Again this is the only bit that we need IMHO, as it is harmless to
register these properties unconditionally.

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-11-05 11:04 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-31 16:39 [PATCH v2 00/12] qom: resolve type name conflicts, avoid target_info() in class_init or type_init Yonggang Luo
2026-10-31 16:39 ` [PATCH v2 01/12] target-info: add target_loongarch() Yonggang Luo
2026-10-31 16:39 ` [PATCH v2 02/12] hw/loongarch/virt: select virt machine types with is_available Yonggang Luo
2026-10-31 16:39 ` [PATCH v2 03/12] target-info: add target_xtensa() Yonggang Luo
2026-10-31 16:39 ` [PATCH v2 04/12] hw/xtensa: expand DEFINE_MACHINE in virt.c Yonggang Luo
2026-11-01  3:15   ` Yonggang Luo
2026-10-31 16:40 ` [PATCH v2 05/12] hw/xtensa/virt: select virt machine types with is_available Yonggang Luo
2026-10-31 16:40 ` [PATCH v2 06/12] target/arm: register separate max-v8 CPU types for arm and aarch64 Yonggang Luo
2026-11-05 10:55   ` Daniel P. Berrangé
2026-11-05 11:14     ` Yonggang Luo
2026-11-05 12:42       ` Daniel P. Berrangé
2026-11-05 13:25         ` Yonggang Luo
2026-11-05 14:16           ` Daniel P. Berrangé
2026-11-05 13:45         ` Peter Maydell
2026-11-05 13:48           ` Daniel P. Berrangé
2026-11-05 13:56             ` Peter Maydell
2026-11-05 14:03               ` Daniel P. Berrangé
2026-10-31 16:40 ` [PATCH v2 07/12] hw/scsi/scsi-disk: register s390x scsi-hd and scsi-cd variants Yonggang Luo
2026-11-05 11:02   ` Daniel P. Berrangé
2026-10-31 16:40 ` [PATCH v2 08/12] hw/virtio/virtio-pci: pass is_available through VirtioPCIDeviceTypeInfo Yonggang Luo
2026-10-31 16:40 ` [PATCH v2 09/12] hw/virtio: register s390x virtio-blk-pci and virtio-net-pci variants Yonggang Luo
2026-11-05 11:03   ` Daniel P. Berrangé [this message]
2026-11-05 11:20     ` Yonggang Luo
2026-11-05 11:38       ` Daniel P. Berrangé
2026-10-31 16:40 ` [PATCH v2 10/12] target-info: add target_base_i386() Yonggang Luo
2026-10-31 16:40 ` [PATCH v2 11/12] hw/virtio/virtio-mem: register legacy-guest variant with is_available Yonggang Luo
2026-11-05 11:07   ` Daniel P. Berrangé
2026-10-31 16:40 ` [PATCH v2 12/12] hw/microblaze: defer PetaLogix endianness default until init Yonggang Luo

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=auxigHswmymEQogo@redhat.com \
    --to=berrange@redhat.com \
    --cc=17746591750@163.com \
    --cc=cohuck@redhat.com \
    --cc=david@kernel.org \
    --cc=edgar.iglesias@gmail.com \
    --cc=fam@euphon.net \
    --cc=farman@linux.ibm.com \
    --cc=jcmvbkbc@gmail.com \
    --cc=jiaxun.yang@flygoat.com \
    --cc=luoyonggang@gmail.com \
    --cc=mjrosato@linux.ibm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@mailo.com \
    --cc=philmd@oss.qualcomm.com \
    --cc=pierrick.bouvier@oss.qualcomm.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@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.