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(-)
TYPE_VFIO_PCI doesn't have property use-legacy-x86-rom, but
TYPE_VFIO_PCI_NOHOTPLUG has. The compatibility config leads to
SIGABRT on new QEMU.
The default value of element use_legacy_x86_rom for TYPE_VFIO_PCI is
already false, so no need extra processing.
Fixes: d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.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 fa20c29b9f..c19334ff25 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 d6b2240fc2..bd47527479 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 d90b69a162..94d22a232a 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 ad5caff3a5..c03324281b 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 9b9519fa02..b309b2b378 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 e72d514a4c..0c4606d9cb 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.47.1
Hello Zhenzhong,
On 7/28/25 14:29, Zhenzhong Duan wrote:
> TYPE_VFIO_PCI doesn't have property use-legacy-x86-rom, but
> TYPE_VFIO_PCI_NOHOTPLUG has. The compatibility config leads to
> SIGABRT on new QEMU.
>
> The default value of element use_legacy_x86_rom for TYPE_VFIO_PCI is
> already false, so no need extra processing.
>
> Fixes: d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")
> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Fix is here :
https://lore.kernel.org/qemu-devel/20250723062714.1245826-1-clg@redhat.com/
Thanks,
C.
> ---
> 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 fa20c29b9f..c19334ff25 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 d6b2240fc2..bd47527479 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 d90b69a162..94d22a232a 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 ad5caff3a5..c03324281b 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 9b9519fa02..b309b2b378 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 e72d514a4c..0c4606d9cb 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;
>
>-----Original Message-----
>From: Cédric Le Goater <clg@redhat.com>
>Subject: Re: [PATCH] vfio/pci: Fix regression due to unexisting property
>use-legacy-x86-rom
>
>Hello Zhenzhong,
>
>On 7/28/25 14:29, Zhenzhong Duan wrote:
>> TYPE_VFIO_PCI doesn't have property use-legacy-x86-rom, but
>> TYPE_VFIO_PCI_NOHOTPLUG has. The compatibility config leads to
>> SIGABRT on new QEMU.
>>
>> The default value of element use_legacy_x86_rom for TYPE_VFIO_PCI is
>> already false, so no need extra processing.
>>
>> Fixes: d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")
>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>
>
>Fix is here :
>
>
>https://lore.kernel.org/qemu-devel/20250723062714.1245826-1-clg@redhat
>.com/
Ah, thanks Cédric, good to see this, I should have checked vfio-next first.
BRs,
Zhenzhong
On 7/28/25 14:53, Duan, Zhenzhong wrote:
>
>
>> -----Original Message-----
>> From: Cédric Le Goater <clg@redhat.com>
>> Subject: Re: [PATCH] vfio/pci: Fix regression due to unexisting property
>> use-legacy-x86-rom
>>
>> Hello Zhenzhong,
>>
>> On 7/28/25 14:29, Zhenzhong Duan wrote:
>>> TYPE_VFIO_PCI doesn't have property use-legacy-x86-rom, but
>>> TYPE_VFIO_PCI_NOHOTPLUG has. The compatibility config leads to
>>> SIGABRT on new QEMU.
>>>
>>> The default value of element use_legacy_x86_rom for TYPE_VFIO_PCI is
>>> already false, so no need extra processing.
>>>
>>> Fixes: d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")
>>> Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
>>
>>
>> Fix is here :
>>
>>
>> https://lore.kernel.org/qemu-devel/20250723062714.1245826-1-clg@redhat
>> .com/
>
> Ah, thanks Cédric, good to see this, I should have checked vfio-next first.
I have been waiting a bit (too long) to send the fix upstream because
people were in vacations and I would like to possibly send Steve's
fixes too. I should send a PR today or tomorrow.
Thanks,
C.
© 2016 - 2025 Red Hat, Inc.