From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Cédric Le Goater" <clg@redhat.com>
Cc: qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Williamson" <alex.williamson@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Shaoqin Huang" <shahuang@redhat.com>
Subject: Re: [PATCH] hw/i386: Fix 'use-legacy-x86-rom' property compatibility
Date: Wed, 23 Jul 2025 05:12:09 -0400 [thread overview]
Message-ID: <20250723051203-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <20250723062714.1245826-1-clg@redhat.com>
On Wed, Jul 23, 2025 at 08:27:14AM +0200, Cédric Le Goater wrote:
> Commit 350785d41d8b ("ramfb: Add property to control if load the
> romfile") introduced the `use-legacy-x86-rom` property for the
> `vfio-pci-nohotplug` device, allowing control over VGA BIOS ROM
> loading. However, the property compatibility setting was incorrectly
> applied to the `vfio-pci` device instead, which causes all `vfio-pci`
> devices to fail to load. This change fixes the issue by ensuring the
> property is set on the correct device.
>
> Fixes: d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Shaoqin Huang <shahuang@redhat.com>
> Signed-off-by: Cédric Le Goater <clg@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/vfio/types.h | 2 ++
> hw/core/machine.c | 2 +-
> hw/i386/microvm.c | 2 +-
> hw/i386/pc_piix.c | 2 +-
> hw/i386/pc_q35.c | 2 +-
> hw/vfio/pci.c | 2 --
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/hw/vfio/types.h b/hw/vfio/types.h
> index fa20c29b9fbbf51ddad4f6cb0535a70152224a94..c19334ff25ae2f5221f08ed863553ce7f8e3be98 100644
> --- a/hw/vfio/types.h
> +++ b/hw/vfio/types.h
> @@ -18,4 +18,6 @@
> #define TYPE_VFIO_PCI "vfio-pci"
> /* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */
>
> +#define TYPE_VFIO_PCI_NOHOTPLUG "vfio-pci-nohotplug"
> +
> #endif /* HW_VFIO_VFIO_TYPES_H */
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index d6b2240fc250d2d1194dee62e5356c0c214f1069..bd47527479a7947ca293a47c9a6f49916d24bad3 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -41,7 +41,7 @@ GlobalProperty hw_compat_10_0[] = {
> { "scsi-hd", "dpofua", "off" },
> { "vfio-pci", "x-migration-load-config-after-iter", "off" },
> { "ramfb", "use-legacy-x86-rom", "true"},
> - { "vfio-pci", "use-legacy-x86-rom", "true" },
> + { "vfio-pci-nohotplug", "use-legacy-x86-rom", "true" },
> };
> const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0);
>
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index d90b69a162007af8af1b8596be590126fb00fb59..94d22a232aca1f82590d80c2ac6cc279bb9ff808 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -635,7 +635,7 @@ GlobalProperty microvm_properties[] = {
> */
> { "pcie-root-port", "io-reserve", "0" },
> { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
> - { TYPE_VFIO_PCI, "use-legacy-x86-rom", "true" },
> + { TYPE_VFIO_PCI_NOHOTPLUG, "use-legacy-x86-rom", "true" },
> };
>
> static void microvm_class_init(ObjectClass *oc, const void *data)
> diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
> index ad5caff3a5d251671db591c68bed3b69a5e45d17..c03324281bdb356e17d434b156e4080865867f4f 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -80,7 +80,7 @@ static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
>
> static GlobalProperty pc_piix_compat_defaults[] = {
> { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
> - { TYPE_VFIO_PCI, "use-legacy-x86-rom", "true" },
> + { TYPE_VFIO_PCI_NOHOTPLUG, "use-legacy-x86-rom", "true" },
> };
> static const size_t pc_piix_compat_defaults_len =
> G_N_ELEMENTS(pc_piix_compat_defaults);
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index 9b9519fa02d506393058c085178924156e9e0d10..b309b2b378db4741b72828c1f34d2edc2e057a1d 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -69,7 +69,7 @@
> static GlobalProperty pc_q35_compat_defaults[] = {
> { TYPE_VIRTIO_IOMMU_PCI, "aw-bits", "39" },
> { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
> - { TYPE_VFIO_PCI, "use-legacy-x86-rom", "true" },
> + { TYPE_VFIO_PCI_NOHOTPLUG, "use-legacy-x86-rom", "true" },
> };
> static const size_t pc_q35_compat_defaults_len =
> G_N_ELEMENTS(pc_q35_compat_defaults);
> diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
> index e72d514a4cb91946f7c79332492bf5d709c308f2..0c4606d9cb5e163b8c533ed9b89d4d73eafaae24 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -49,8 +49,6 @@
> #include "vfio-migration-internal.h"
> #include "vfio-helpers.h"
>
> -#define TYPE_VFIO_PCI_NOHOTPLUG "vfio-pci-nohotplug"
> -
> /* Protected by BQL */
> static KVMRouteChange vfio_route_change;
>
> --
> 2.50.1
next prev parent reply other threads:[~2025-07-23 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 6:27 [PATCH] hw/i386: Fix 'use-legacy-x86-rom' property compatibility Cédric Le Goater
2025-07-23 6:32 ` Cédric Le Goater
2025-07-23 8:45 ` Gerd Hoffmann
2025-07-23 9:12 ` Michael S. Tsirkin [this message]
2025-07-28 11:06 ` Thomas Huth
2025-07-28 14:50 ` Zhao Liu
2025-07-28 17:25 ` Cédric Le Goater
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=20250723051203-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=clg@redhat.com \
--cc=kraxel@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=shahuang@redhat.com \
--cc=zhao1.liu@intel.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 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.