hw/i386: Fix 'use-legacy-x86-rom' property compatibility
PATCH 1/1 hw/i386: Fix 'use-legacy-x86-rom' property compatibility
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.
--- 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(-)
hw/vfio/types.h +2 -0
@@ -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 */
hw/core/machine.c +1 -1
@@ -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);
hw/i386/microvm.c +1 -1
@@ -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)
hw/i386/pc_piix.c +1 -1
@@ -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);
hw/i386/pc_q35.c +1 -1
@@ -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);
hw/vfio/pci.c +0 -2
@@ -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;
Signature · 1 line
2.50.1
Shaoqin,
Quoted 4 lines · Cédric Le Goater
Commit
350785d41d8b("ramfb: Add property to control if load the romfile") introduced theuse-legacy-x86-romproperty for thevfio-pci-nohotplugdevice, allowing control over VGA BIOS ROM loading.
Could you please send a patch adding a property description for use-legacy-x86-rom ?
Thanks,
C.
Quoted 8 lines · Cédric Le Goater
Commit
350785d41d8b("ramfb: Add property to control if load the romfile") introduced theuse-legacy-x86-romproperty for thevfio-pci-nohotplugdevice, allowing control over VGA BIOS ROM loading. However, the property compatibility setting was incorrectly applied to thevfio-pcidevice instead, which causes allvfio-pcidevices to fail to load. This change fixes the issue by ensuring the property is set on the correct device.
Quoted 4 lines
Fixes d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")Cc Gerd Hoffmann <[email protected]>Cc Shaoqin Huang <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>
Quoted 8 lines · Cédric Le Goater
Commit
350785d41d8b("ramfb: Add property to control if load the romfile") introduced theuse-legacy-x86-romproperty for thevfio-pci-nohotplugdevice, allowing control over VGA BIOS ROM loading. However, the property compatibility setting was incorrectly applied to thevfio-pcidevice instead, which causes allvfio-pcidevices to fail to load. This change fixes the issue by ensuring the property is set on the correct device.
Quoted 4 lines
Fixes d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")Cc Gerd Hoffmann <[email protected]>Cc Shaoqin Huang <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>
Quoted 87 lines
--- 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(-)hw/vfio/types.h +2
-0@@ -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 */ hw/core/machine.c +1
-1@@ -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);hw/i386/microvm.c +1
-1@@ -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)hw/i386/pc_piix.c +1
-1@@ -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);hw/i386/pc_q35.c +1
-1@@ -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);hw/vfio/pci.c +0
-2@@ -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;Signature · 1 line
2.50.1
Quoted 8 lines · Cédric Le Goater
Commit
350785d41d8b("ramfb: Add property to control if load the romfile") introduced theuse-legacy-x86-romproperty for thevfio-pci-nohotplugdevice, allowing control over VGA BIOS ROM loading. However, the property compatibility setting was incorrectly applied to thevfio-pcidevice instead, which causes allvfio-pcidevices to fail to load. This change fixes the issue by ensuring the property is set on the correct device.
Quoted 5 lines
Fixes d5fcf0d960d8 ("hw/i386: Add the ramfb romfile compatibility")Cc Gerd Hoffmann <[email protected]>Cc Shaoqin Huang <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>---
Thanks, this looks like the right way to fix it to me:
Quoted 16 lines · Cédric Le Goater
Date: Wed, 23 Jul 2025 08:27:14 +0200
From: Cédric Le Goater <[email protected]>
Subject: [PATCH] hw/i386: Fix 'use-legacy-x86-rom' property compatibilityCommit
350785d41d8b("ramfb: Add property to control if load the romfile") introduced theuse-legacy-x86-romproperty for thevfio-pci-nohotplugdevice, allowing control over VGA BIOS ROM loading. However, the property compatibility setting was incorrectly applied to thevfio-pcidevice instead, which causes allvfio-pcidevices 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 <[email protected]>Cc Shaoqin Huang <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>
Quoted 8 lines
--- 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(-)
LGTM. Thanks!
Cédric Le Goater
AppliedQuoted 89 lines · Cédric Le Goater
Commit
350785d41d8b("ramfb: Add property to control if load the romfile") introduced theuse-legacy-x86-romproperty for thevfio-pci-nohotplugdevice, allowing control over VGA BIOS ROM loading. However, the property compatibility setting was incorrectly applied to thevfio-pcidevice instead, which causes allvfio-pcidevices 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 <[email protected]>Cc Shaoqin Huang <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>--- 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(-)hw/vfio/types.h +2
-0@@ -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 */ hw/core/machine.c +1
-1@@ -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);hw/i386/microvm.c +1
-1@@ -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)hw/i386/pc_piix.c +1
-1@@ -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);hw/i386/pc_q35.c +1
-1@@ -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);hw/vfio/pci.c +0
-0
hw/vfio/pci.c line 54
Quoted 8 lines
hw/vfio/pci.c +0
-2@@ -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;
Applied to vfio-next.
Thanks,
C.