* [PULL 0/3] Display 20250718 patches
@ 2025-07-18 19:43 Gerd Hoffmann
2025-07-18 19:43 ` [PULL 1/3] ramfb: Add property to control if load the romfile Gerd Hoffmann
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2025-07-18 19:43 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Cédric Le Goater,
Gerd Hoffmann, Alex Williamson, Sergio Lopez, Marcel Apfelbaum,
Zhao Liu, Yanan Wang
The following changes since commit c079d3a31e45093286c65f8ca5350beb3a4404a9:
Merge tag 'pull-10.1-rc0-maintainer-140725-1' of https://gitlab.com/stsquad/qemu into staging (2025-07-15 00:12:07 -0400)
are available in the Git repository at:
https://gitlab.com/kraxel/qemu.git tags/display-20250718-pull-request
for you to fetch changes up to d5fcf0d960d893b1765e6388cefca9c690839267:
hw/i386: Add the ramfb romfile compatibility (2025-07-18 21:41:57 +0200)
----------------------------------------------------------------
Load ramfb vgabios on x86 only.
----------------------------------------------------------------
Shaoqin Huang (3):
ramfb: Add property to control if load the romfile
vfio: Move the TYPE_* to hw/vfio/types.h
hw/i386: Add the ramfb romfile compatibility
hw/vfio/pci.h | 11 ++---------
hw/vfio/types.h | 21 +++++++++++++++++++++
include/hw/display/ramfb.h | 2 +-
hw/core/machine.c | 2 ++
hw/display/ramfb-standalone.c | 5 ++++-
hw/display/ramfb-stubs.c | 2 +-
hw/display/ramfb.c | 6 ++++--
hw/i386/microvm.c | 3 +++
hw/i386/pc_piix.c | 10 ++++++++++
hw/i386/pc_q35.c | 3 +++
hw/vfio/display.c | 4 ++--
hw/vfio/pci.c | 2 ++
12 files changed, 55 insertions(+), 16 deletions(-)
create mode 100644 hw/vfio/types.h
--
2.50.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PULL 1/3] ramfb: Add property to control if load the romfile
2025-07-18 19:43 [PULL 0/3] Display 20250718 patches Gerd Hoffmann
@ 2025-07-18 19:43 ` Gerd Hoffmann
2025-07-18 19:43 ` [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Gerd Hoffmann @ 2025-07-18 19:43 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Cédric Le Goater,
Gerd Hoffmann, Alex Williamson, Sergio Lopez, Marcel Apfelbaum,
Zhao Liu, Yanan Wang, Shaoqin Huang, Eric Auger
From: Shaoqin Huang <shahuang@redhat.com>
Currently the ramfb device loads the vgabios-ramfb.bin unconditionally,
but only the x86 need the vgabios-ramfb.bin, this can cause that when
use the release package on arm64 it can't find the vgabios-ramfb.bin.
Because only seabios will use the vgabios-ramfb.bin, load the rom logic
is x86-specific. For other !x86 platforms, the edk2 ships an EFI driver
for ramfb, so they don't need to load the romfile.
So add a new property use-legacy-x86-rom in both ramfb and vfio_pci
device, because the vfio display also use the ramfb_setup() to load
the vgabios-ramfb.bin file.
After have this property, the machine type can set the compatibility to
not load the vgabios-ramfb.bin if the arch doesn't need it.
For now the default value is true but it will be turned off by default
in subsequent patch when compats get properly handled.
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Message-ID: <20250717100941.2230408-2-shahuang@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/vfio/pci.h | 1 +
include/hw/display/ramfb.h | 2 +-
hw/display/ramfb-standalone.c | 5 ++++-
hw/display/ramfb-stubs.c | 2 +-
hw/display/ramfb.c | 6 ++++--
hw/vfio/display.c | 4 ++--
hw/vfio/pci.c | 2 ++
7 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 495fae737d3a..826db8c1319b 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -188,6 +188,7 @@ struct VFIOPCIDevice {
bool no_kvm_ioeventfd;
bool no_vfio_ioeventfd;
bool enable_ramfb;
+ bool use_legacy_x86_rom;
OnOffAuto ramfb_migrate;
bool defer_kvm_irq_routing;
bool clear_parent_atomics_on_exit;
diff --git a/include/hw/display/ramfb.h b/include/hw/display/ramfb.h
index a7e00191445e..172aa6dc89e8 100644
--- a/include/hw/display/ramfb.h
+++ b/include/hw/display/ramfb.h
@@ -6,7 +6,7 @@
/* ramfb.c */
typedef struct RAMFBState RAMFBState;
void ramfb_display_update(QemuConsole *con, RAMFBState *s);
-RAMFBState *ramfb_setup(Error **errp);
+RAMFBState *ramfb_setup(bool romfile, Error **errp);
extern const VMStateDescription ramfb_vmstate;
diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
index 08f2d5db4eca..82d8c69f8903 100644
--- a/hw/display/ramfb-standalone.c
+++ b/hw/display/ramfb-standalone.c
@@ -17,6 +17,7 @@ struct RAMFBStandaloneState {
QemuConsole *con;
RAMFBState *state;
bool migrate;
+ bool use_legacy_x86_rom;
};
static void display_update_wrapper(void *dev)
@@ -39,7 +40,7 @@ static void ramfb_realizefn(DeviceState *dev, Error **errp)
RAMFBStandaloneState *ramfb = RAMFB(dev);
ramfb->con = graphic_console_init(dev, 0, &wrapper_ops, dev);
- ramfb->state = ramfb_setup(errp);
+ ramfb->state = ramfb_setup(ramfb->use_legacy_x86_rom, errp);
}
static bool migrate_needed(void *opaque)
@@ -62,6 +63,8 @@ static const VMStateDescription ramfb_dev_vmstate = {
static const Property ramfb_properties[] = {
DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate, true),
+ DEFINE_PROP_BOOL("use-legacy-x86-rom", RAMFBStandaloneState,
+ use_legacy_x86_rom, true),
};
static void ramfb_class_initfn(ObjectClass *klass, const void *data)
diff --git a/hw/display/ramfb-stubs.c b/hw/display/ramfb-stubs.c
index cf64733b10cd..b83551357bb3 100644
--- a/hw/display/ramfb-stubs.c
+++ b/hw/display/ramfb-stubs.c
@@ -8,7 +8,7 @@ void ramfb_display_update(QemuConsole *con, RAMFBState *s)
{
}
-RAMFBState *ramfb_setup(Error **errp)
+RAMFBState *ramfb_setup(bool romfile, Error **errp)
{
error_setg(errp, "ramfb support not available");
return NULL;
diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c
index 8c0f907673da..9a17d97d076f 100644
--- a/hw/display/ramfb.c
+++ b/hw/display/ramfb.c
@@ -135,7 +135,7 @@ const VMStateDescription ramfb_vmstate = {
}
};
-RAMFBState *ramfb_setup(Error **errp)
+RAMFBState *ramfb_setup(bool romfile, Error **errp)
{
FWCfgState *fw_cfg = fw_cfg_find();
RAMFBState *s;
@@ -147,7 +147,9 @@ RAMFBState *ramfb_setup(Error **errp)
s = g_new0(RAMFBState, 1);
- rom_add_vga("vgabios-ramfb.bin");
+ if (romfile) {
+ rom_add_vga("vgabios-ramfb.bin");
+ }
fw_cfg_add_file_callback(fw_cfg, "etc/ramfb",
NULL, ramfb_fw_cfg_write, s,
&s->cfg, sizeof(s->cfg), false);
diff --git a/hw/vfio/display.c b/hw/vfio/display.c
index 9c6f5aa265dd..faacd9019a55 100644
--- a/hw/vfio/display.c
+++ b/hw/vfio/display.c
@@ -365,7 +365,7 @@ static bool vfio_display_dmabuf_init(VFIOPCIDevice *vdev, Error **errp)
&vfio_display_dmabuf_ops,
vdev);
if (vdev->enable_ramfb) {
- vdev->dpy->ramfb = ramfb_setup(errp);
+ vdev->dpy->ramfb = ramfb_setup(vdev->use_legacy_x86_rom, errp);
if (!vdev->dpy->ramfb) {
return false;
}
@@ -494,7 +494,7 @@ static bool vfio_display_region_init(VFIOPCIDevice *vdev, Error **errp)
&vfio_display_region_ops,
vdev);
if (vdev->enable_ramfb) {
- vdev->dpy->ramfb = ramfb_setup(errp);
+ vdev->dpy->ramfb = ramfb_setup(vdev->use_legacy_x86_rom, errp);
if (!vdev->dpy->ramfb) {
return false;
}
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index 1093b28df7c3..0b969b3359db 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3809,6 +3809,8 @@ static const TypeInfo vfio_pci_dev_info = {
static const Property vfio_pci_dev_nohotplug_properties[] = {
DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
+ DEFINE_PROP_BOOL("use-legacy-x86-rom", VFIOPCIDevice,
+ use_legacy_x86_rom, true),
DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrate,
ON_OFF_AUTO_AUTO),
};
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h
2025-07-18 19:43 [PULL 0/3] Display 20250718 patches Gerd Hoffmann
2025-07-18 19:43 ` [PULL 1/3] ramfb: Add property to control if load the romfile Gerd Hoffmann
@ 2025-07-18 19:43 ` Gerd Hoffmann
2025-07-18 21:03 ` Cédric Le Goater
2025-07-18 19:43 ` [PULL 3/3] hw/i386: Add the ramfb romfile compatibility Gerd Hoffmann
2025-07-21 18:31 ` [PULL 0/3] Display 20250718 patches Stefan Hajnoczi
3 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2025-07-18 19:43 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Cédric Le Goater,
Gerd Hoffmann, Alex Williamson, Sergio Lopez, Marcel Apfelbaum,
Zhao Liu, Yanan Wang, Shaoqin Huang
From: Shaoqin Huang <shahuang@redhat.com>
Move the TYPE_* to a new file hw/vfio/types.h because the
TYPE_VFIO_PCI will be used in later patch, but directly include the
hw/vfio/pci.h can cause some compilation error when cross build the
windows version.
The hw/vfio/types.h can be included to mitigate that problem.
Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Message-ID: <20250717100941.2230408-3-shahuang@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/vfio/pci.h | 10 +---------
hw/vfio/types.h | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 9 deletions(-)
create mode 100644 hw/vfio/types.h
diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
index 826db8c1319b..0fd151c5dc2c 100644
--- a/hw/vfio/pci.h
+++ b/hw/vfio/pci.h
@@ -14,6 +14,7 @@
#include "system/memory.h"
#include "hw/pci/pci_device.h"
+#include "hw/vfio/types.h"
#include "hw/vfio/vfio-device.h"
#include "hw/vfio/vfio-region.h"
#include "qemu/event_notifier.h"
@@ -119,17 +120,8 @@ typedef struct VFIOMSIXInfo {
MemoryRegion *pba_region;
} VFIOMSIXInfo;
-/*
- * TYPE_VFIO_PCI_BASE is an abstract type used to share code
- * between VFIO implementations that use a kernel driver
- * with those that use user sockets.
- */
-#define TYPE_VFIO_PCI_BASE "vfio-pci-base"
OBJECT_DECLARE_SIMPLE_TYPE(VFIOPCIDevice, VFIO_PCI_BASE)
-#define TYPE_VFIO_PCI "vfio-pci"
-/* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */
-
struct VFIOPCIDevice {
PCIDevice pdev;
VFIODevice vbasedev;
diff --git a/hw/vfio/types.h b/hw/vfio/types.h
new file mode 100644
index 000000000000..fa20c29b9fbb
--- /dev/null
+++ b/hw/vfio/types.h
@@ -0,0 +1,21 @@
+/*
+ * VFIO types definition
+ *
+ * Copyright Red Hat, Inc. 2025
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+#ifndef HW_VFIO_VFIO_TYPES_H
+#define HW_VFIO_VFIO_TYPES_H
+
+/*
+ * TYPE_VFIO_PCI_BASE is an abstract type used to share code
+ * between VFIO implementations that use a kernel driver
+ * with those that use user sockets.
+ */
+#define TYPE_VFIO_PCI_BASE "vfio-pci-base"
+
+#define TYPE_VFIO_PCI "vfio-pci"
+/* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */
+
+#endif /* HW_VFIO_VFIO_TYPES_H */
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PULL 3/3] hw/i386: Add the ramfb romfile compatibility
2025-07-18 19:43 [PULL 0/3] Display 20250718 patches Gerd Hoffmann
2025-07-18 19:43 ` [PULL 1/3] ramfb: Add property to control if load the romfile Gerd Hoffmann
2025-07-18 19:43 ` [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h Gerd Hoffmann
@ 2025-07-18 19:43 ` Gerd Hoffmann
2025-07-28 10:51 ` Thomas Huth
2025-07-21 18:31 ` [PULL 0/3] Display 20250718 patches Stefan Hajnoczi
3 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2025-07-18 19:43 UTC (permalink / raw)
To: qemu-devel
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Cédric Le Goater,
Gerd Hoffmann, Alex Williamson, Sergio Lopez, Marcel Apfelbaum,
Zhao Liu, Yanan Wang, Shaoqin Huang, Eric Auger
From: Shaoqin Huang <shahuang@redhat.com>
ramfb is a sysbus device so it can only used for machine types where it
is explicitly enabled:
# git grep machine_class_allow_dynamic_sysbus_dev.*TYPE_RAMFB_DEVICE
hw/arm/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
TYPE_RAMFB_DEVICE);
hw/i386/microvm.c: machine_class_allow_dynamic_sysbus_dev(mc,
TYPE_RAMFB_DEVICE);
hw/i386/pc_piix.c: machine_class_allow_dynamic_sysbus_dev(m,
TYPE_RAMFB_DEVICE);
hw/i386/pc_q35.c: machine_class_allow_dynamic_sysbus_dev(m,
TYPE_RAMFB_DEVICE);
hw/loongarch/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
TYPE_RAMFB_DEVICE);
hw/riscv/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
TYPE_RAMFB_DEVICE);
So these six are the only machine types we have to worry about.
The three x86 machine types (pc, q35, microvm) will actually use the rom
(when booting with seabios).
For arm/riscv/loongarch virt we want to disable the rom.
This patch sets ramfb romfile option to false by default, except for x86
machines types (pc, q35, microvm) which need the rom file when booting
with seabios and machine types <= 10.0 (handling the case of arm virt,
for compat reasons).
At the same time, set the "use-legacy-x86-rom" property to true on those
historical versioned machine types in order to avoid the memory layout
being changed.
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
Message-ID: <20250717100941.2230408-4-shahuang@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/core/machine.c | 2 ++
hw/display/ramfb-standalone.c | 2 +-
hw/i386/microvm.c | 3 +++
hw/i386/pc_piix.c | 10 ++++++++++
hw/i386/pc_q35.c | 3 +++
hw/vfio/pci.c | 2 +-
6 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/hw/core/machine.c b/hw/core/machine.c
index e869821b2246..a7043e2a3425 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -39,6 +39,8 @@
GlobalProperty hw_compat_10_0[] = {
{ "scsi-hd", "dpofua", "off" },
+ { "ramfb", "use-legacy-x86-rom", "true"},
+ { "vfio-pci", "use-legacy-x86-rom", "true" },
};
const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0);
diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
index 82d8c69f8903..72b2071aed01 100644
--- a/hw/display/ramfb-standalone.c
+++ b/hw/display/ramfb-standalone.c
@@ -64,7 +64,7 @@ static const VMStateDescription ramfb_dev_vmstate = {
static const Property ramfb_properties[] = {
DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate, true),
DEFINE_PROP_BOOL("use-legacy-x86-rom", RAMFBStandaloneState,
- use_legacy_x86_rom, true),
+ use_legacy_x86_rom, false),
};
static void ramfb_class_initfn(ObjectClass *klass, const void *data)
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index e0daf0d4fc30..d90b69a16200 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -49,6 +49,7 @@
#include "hw/acpi/generic_event_device.h"
#include "hw/pci-host/gpex.h"
#include "hw/usb/xhci.h"
+#include "hw/vfio/types.h"
#include "elf.h"
#include "kvm/kvm_i386.h"
@@ -633,6 +634,8 @@ GlobalProperty microvm_properties[] = {
* so reserving io space is not going to work. Turn it off.
*/
{ "pcie-root-port", "io-reserve", "0" },
+ { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
+ { TYPE_VFIO_PCI, "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 a3285fbc6450..ad5caff3a5d2 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -49,6 +49,7 @@
#include "hw/i2c/smbus_eeprom.h"
#include "system/memory.h"
#include "hw/acpi/acpi.h"
+#include "hw/vfio/types.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "system/xen.h"
@@ -77,6 +78,13 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
#endif
+static GlobalProperty pc_piix_compat_defaults[] = {
+ { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
+ { TYPE_VFIO_PCI, "use-legacy-x86-rom", "true" },
+};
+static const size_t pc_piix_compat_defaults_len =
+ G_N_ELEMENTS(pc_piix_compat_defaults);
+
/*
* Return the global irq number corresponding to a given device irq
* pin. We could also use the bus number to have a more precise mapping.
@@ -492,6 +500,8 @@ static void pc_i440fx_machine_options(MachineClass *m)
pc_set_south_bridge);
object_class_property_set_description(oc, "x-south-bridge",
"Use a different south bridge than PIIX3");
+ compat_props_add(m->compat_props,
+ pc_piix_compat_defaults, pc_piix_compat_defaults_len);
}
static void pc_i440fx_machine_10_1_options(MachineClass *m)
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index cf871cfdad86..9b9519fa02d5 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -45,6 +45,7 @@
#include "hw/i386/pc.h"
#include "hw/i386/amd_iommu.h"
#include "hw/i386/intel_iommu.h"
+#include "hw/vfio/types.h"
#include "hw/virtio/virtio-iommu.h"
#include "hw/display/ramfb.h"
#include "hw/ide/pci.h"
@@ -67,6 +68,8 @@
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" },
};
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 0b969b3359db..174499ecec65 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -3810,7 +3810,7 @@ static const TypeInfo vfio_pci_dev_info = {
static const Property vfio_pci_dev_nohotplug_properties[] = {
DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
DEFINE_PROP_BOOL("use-legacy-x86-rom", VFIOPCIDevice,
- use_legacy_x86_rom, true),
+ use_legacy_x86_rom, false),
DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrate,
ON_OFF_AUTO_AUTO),
};
--
2.50.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h
2025-07-18 19:43 ` [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h Gerd Hoffmann
@ 2025-07-18 21:03 ` Cédric Le Goater
2025-07-21 6:28 ` Gerd Hoffmann
0 siblings, 1 reply; 10+ messages in thread
From: Cédric Le Goater @ 2025-07-18 21:03 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Alex Williamson, Sergio Lopez,
Marcel Apfelbaum, Zhao Liu, Yanan Wang, Shaoqin Huang
On 7/18/25 21:43, Gerd Hoffmann wrote:
> From: Shaoqin Huang <shahuang@redhat.com>
>
> Move the TYPE_* to a new file hw/vfio/types.h because the
> TYPE_VFIO_PCI will be used in later patch, but directly include the
> hw/vfio/pci.h can cause some compilation error when cross build the
> windows version.
>
> The hw/vfio/types.h can be included to mitigate that problem.
As said earlier, the string literal "vfio-pci" could be used instead
of the TYPE_VFIO_PCI define and avoid the extra vfio header file.
C.
>
> Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
> Message-ID: <20250717100941.2230408-3-shahuang@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/vfio/pci.h | 10 +---------
> hw/vfio/types.h | 21 +++++++++++++++++++++
> 2 files changed, 22 insertions(+), 9 deletions(-)
> create mode 100644 hw/vfio/types.h
>
> diff --git a/hw/vfio/pci.h b/hw/vfio/pci.h
> index 826db8c1319b..0fd151c5dc2c 100644
> --- a/hw/vfio/pci.h
> +++ b/hw/vfio/pci.h
> @@ -14,6 +14,7 @@
>
> #include "system/memory.h"
> #include "hw/pci/pci_device.h"
> +#include "hw/vfio/types.h"
> #include "hw/vfio/vfio-device.h"
> #include "hw/vfio/vfio-region.h"
> #include "qemu/event_notifier.h"
> @@ -119,17 +120,8 @@ typedef struct VFIOMSIXInfo {
> MemoryRegion *pba_region;
> } VFIOMSIXInfo;
>
> -/*
> - * TYPE_VFIO_PCI_BASE is an abstract type used to share code
> - * between VFIO implementations that use a kernel driver
> - * with those that use user sockets.
> - */
> -#define TYPE_VFIO_PCI_BASE "vfio-pci-base"
> OBJECT_DECLARE_SIMPLE_TYPE(VFIOPCIDevice, VFIO_PCI_BASE)
>
> -#define TYPE_VFIO_PCI "vfio-pci"
> -/* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */
> -
> struct VFIOPCIDevice {
> PCIDevice pdev;
> VFIODevice vbasedev;
> diff --git a/hw/vfio/types.h b/hw/vfio/types.h
> new file mode 100644
> index 000000000000..fa20c29b9fbb
> --- /dev/null
> +++ b/hw/vfio/types.h
> @@ -0,0 +1,21 @@
> +/*
> + * VFIO types definition
> + *
> + * Copyright Red Hat, Inc. 2025
> + *
> + * SPDX-License-Identifier: GPL-2.0-or-later
> + */
> +#ifndef HW_VFIO_VFIO_TYPES_H
> +#define HW_VFIO_VFIO_TYPES_H
> +
> +/*
> + * TYPE_VFIO_PCI_BASE is an abstract type used to share code
> + * between VFIO implementations that use a kernel driver
> + * with those that use user sockets.
> + */
> +#define TYPE_VFIO_PCI_BASE "vfio-pci-base"
> +
> +#define TYPE_VFIO_PCI "vfio-pci"
> +/* TYPE_VFIO_PCI shares struct VFIOPCIDevice. */
> +
> +#endif /* HW_VFIO_VFIO_TYPES_H */
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h
2025-07-18 21:03 ` Cédric Le Goater
@ 2025-07-21 6:28 ` Gerd Hoffmann
2025-07-21 6:47 ` Cédric Le Goater
0 siblings, 1 reply; 10+ messages in thread
From: Gerd Hoffmann @ 2025-07-21 6:28 UTC (permalink / raw)
To: Cédric Le Goater
Cc: qemu-devel, Paolo Bonzini, Philippe Mathieu-Daudé,
Michael S. Tsirkin, Eduardo Habkost, Richard Henderson,
Alex Williamson, Sergio Lopez, Marcel Apfelbaum, Zhao Liu,
Yanan Wang, Shaoqin Huang
On Fri, Jul 18, 2025 at 11:03:40PM +0200, Cédric Le Goater wrote:
> On 7/18/25 21:43, Gerd Hoffmann wrote:
> > From: Shaoqin Huang <shahuang@redhat.com>
> >
> > Move the TYPE_* to a new file hw/vfio/types.h because the
> > TYPE_VFIO_PCI will be used in later patch, but directly include the
> > hw/vfio/pci.h can cause some compilation error when cross build the
> > windows version.
> >
> > The hw/vfio/types.h can be included to mitigate that problem.
>
> As said earlier, the string literal "vfio-pci" could be used instead
> of the TYPE_VFIO_PCI define and avoid the extra vfio header file.
I think it makes sense to use TYPE_VFIO_PCI, for consistency and to
avoid typos in the device name.
take care,
Gerd
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h
2025-07-21 6:28 ` Gerd Hoffmann
@ 2025-07-21 6:47 ` Cédric Le Goater
0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2025-07-21 6:47 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: qemu-devel, Paolo Bonzini, Philippe Mathieu-Daudé,
Michael S. Tsirkin, Eduardo Habkost, Richard Henderson,
Alex Williamson, Sergio Lopez, Marcel Apfelbaum, Zhao Liu,
Yanan Wang, Shaoqin Huang
On 7/21/25 08:28, Gerd Hoffmann wrote:
> On Fri, Jul 18, 2025 at 11:03:40PM +0200, Cédric Le Goater wrote:
>> On 7/18/25 21:43, Gerd Hoffmann wrote:
>>> From: Shaoqin Huang <shahuang@redhat.com>
>>>
>>> Move the TYPE_* to a new file hw/vfio/types.h because the
>>> TYPE_VFIO_PCI will be used in later patch, but directly include the
>>> hw/vfio/pci.h can cause some compilation error when cross build the
>>> windows version.
>>>
>>> The hw/vfio/types.h can be included to mitigate that problem.
>>
>> As said earlier, the string literal "vfio-pci" could be used instead
>> of the TYPE_VFIO_PCI define and avoid the extra vfio header file.
>
> I think it makes sense to use TYPE_VFIO_PCI, for consistency and to
> avoid typos in the device name.
We should then generalize this practice to all types.
C.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL 0/3] Display 20250718 patches
2025-07-18 19:43 [PULL 0/3] Display 20250718 patches Gerd Hoffmann
` (2 preceding siblings ...)
2025-07-18 19:43 ` [PULL 3/3] hw/i386: Add the ramfb romfile compatibility Gerd Hoffmann
@ 2025-07-21 18:31 ` Stefan Hajnoczi
3 siblings, 0 replies; 10+ messages in thread
From: Stefan Hajnoczi @ 2025-07-21 18:31 UTC (permalink / raw)
To: Gerd Hoffmann
Cc: qemu-devel, Paolo Bonzini, Philippe Mathieu-Daudé,
Michael S. Tsirkin, Eduardo Habkost, Richard Henderson,
Cédric Le Goater, Gerd Hoffmann, Alex Williamson,
Sergio Lopez, Marcel Apfelbaum, Zhao Liu, Yanan Wang
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
Applied, thanks.
Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL 3/3] hw/i386: Add the ramfb romfile compatibility
2025-07-18 19:43 ` [PULL 3/3] hw/i386: Add the ramfb romfile compatibility Gerd Hoffmann
@ 2025-07-28 10:51 ` Thomas Huth
2025-07-28 11:00 ` Cédric Le Goater
0 siblings, 1 reply; 10+ messages in thread
From: Thomas Huth @ 2025-07-28 10:51 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel, Cédric Le Goater, Shaoqin Huang
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Alex Williamson, Sergio Lopez,
Marcel Apfelbaum, Zhao Liu, Yanan Wang, Eric Auger
On 18/07/2025 21.43, Gerd Hoffmann wrote:
> From: Shaoqin Huang <shahuang@redhat.com>
>
> ramfb is a sysbus device so it can only used for machine types where it
> is explicitly enabled:
>
> # git grep machine_class_allow_dynamic_sysbus_dev.*TYPE_RAMFB_DEVICE
> hw/arm/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
> TYPE_RAMFB_DEVICE);
> hw/i386/microvm.c: machine_class_allow_dynamic_sysbus_dev(mc,
> TYPE_RAMFB_DEVICE);
> hw/i386/pc_piix.c: machine_class_allow_dynamic_sysbus_dev(m,
> TYPE_RAMFB_DEVICE);
> hw/i386/pc_q35.c: machine_class_allow_dynamic_sysbus_dev(m,
> TYPE_RAMFB_DEVICE);
> hw/loongarch/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
> TYPE_RAMFB_DEVICE);
> hw/riscv/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
> TYPE_RAMFB_DEVICE);
>
> So these six are the only machine types we have to worry about.
>
> The three x86 machine types (pc, q35, microvm) will actually use the rom
> (when booting with seabios).
>
> For arm/riscv/loongarch virt we want to disable the rom.
>
> This patch sets ramfb romfile option to false by default, except for x86
> machines types (pc, q35, microvm) which need the rom file when booting
> with seabios and machine types <= 10.0 (handling the case of arm virt,
> for compat reasons).
>
> At the same time, set the "use-legacy-x86-rom" property to true on those
> historical versioned machine types in order to avoid the memory layout
> being changed.
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
> Reviewed-by: Eric Auger <eric.auger@redhat.com>
> Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
> Message-ID: <20250717100941.2230408-4-shahuang@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/core/machine.c | 2 ++
> hw/display/ramfb-standalone.c | 2 +-
> hw/i386/microvm.c | 3 +++
> hw/i386/pc_piix.c | 10 ++++++++++
> hw/i386/pc_q35.c | 3 +++
> hw/vfio/pci.c | 2 +-
> 6 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index e869821b2246..a7043e2a3425 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -39,6 +39,8 @@
>
> GlobalProperty hw_compat_10_0[] = {
> { "scsi-hd", "dpofua", "off" },
> + { "ramfb", "use-legacy-x86-rom", "true"},
> + { "vfio-pci", "use-legacy-x86-rom", "true" },
> };
> const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0);
>
> diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
> index 82d8c69f8903..72b2071aed01 100644
> --- a/hw/display/ramfb-standalone.c
> +++ b/hw/display/ramfb-standalone.c
> @@ -64,7 +64,7 @@ static const VMStateDescription ramfb_dev_vmstate = {
> static const Property ramfb_properties[] = {
> DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate, true),
> DEFINE_PROP_BOOL("use-legacy-x86-rom", RAMFBStandaloneState,
> - use_legacy_x86_rom, true),
> + use_legacy_x86_rom, false),
> };
>
> static void ramfb_class_initfn(ObjectClass *klass, const void *data)
> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
> index e0daf0d4fc30..d90b69a16200 100644
> --- a/hw/i386/microvm.c
> +++ b/hw/i386/microvm.c
> @@ -49,6 +49,7 @@
> #include "hw/acpi/generic_event_device.h"
> #include "hw/pci-host/gpex.h"
> #include "hw/usb/xhci.h"
> +#include "hw/vfio/types.h"
>
> #include "elf.h"
> #include "kvm/kvm_i386.h"
> @@ -633,6 +634,8 @@ GlobalProperty microvm_properties[] = {
> * so reserving io space is not going to work. Turn it off.
> */
> { "pcie-root-port", "io-reserve", "0" },
> + { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
> + { TYPE_VFIO_PCI, "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 a3285fbc6450..ad5caff3a5d2 100644
> --- a/hw/i386/pc_piix.c
> +++ b/hw/i386/pc_piix.c
> @@ -49,6 +49,7 @@
> #include "hw/i2c/smbus_eeprom.h"
> #include "system/memory.h"
> #include "hw/acpi/acpi.h"
> +#include "hw/vfio/types.h"
> #include "qapi/error.h"
> #include "qemu/error-report.h"
> #include "system/xen.h"
> @@ -77,6 +78,13 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
> static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
> #endif
>
> +static GlobalProperty pc_piix_compat_defaults[] = {
> + { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
> + { TYPE_VFIO_PCI, "use-legacy-x86-rom", "true" },
> +};
> +static const size_t pc_piix_compat_defaults_len =
> + G_N_ELEMENTS(pc_piix_compat_defaults);
> +
> /*
> * Return the global irq number corresponding to a given device irq
> * pin. We could also use the bus number to have a more precise mapping.
> @@ -492,6 +500,8 @@ static void pc_i440fx_machine_options(MachineClass *m)
> pc_set_south_bridge);
> object_class_property_set_description(oc, "x-south-bridge",
> "Use a different south bridge than PIIX3");
> + compat_props_add(m->compat_props,
> + pc_piix_compat_defaults, pc_piix_compat_defaults_len);
> }
>
> static void pc_i440fx_machine_10_1_options(MachineClass *m)
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index cf871cfdad86..9b9519fa02d5 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -45,6 +45,7 @@
> #include "hw/i386/pc.h"
> #include "hw/i386/amd_iommu.h"
> #include "hw/i386/intel_iommu.h"
> +#include "hw/vfio/types.h"
> #include "hw/virtio/virtio-iommu.h"
> #include "hw/display/ramfb.h"
> #include "hw/ide/pci.h"
> @@ -67,6 +68,8 @@
>
> 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" },
> };
> 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 0b969b3359db..174499ecec65 100644
> --- a/hw/vfio/pci.c
> +++ b/hw/vfio/pci.c
> @@ -3810,7 +3810,7 @@ static const TypeInfo vfio_pci_dev_info = {
> static const Property vfio_pci_dev_nohotplug_properties[] = {
> DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
> DEFINE_PROP_BOOL("use-legacy-x86-rom", VFIOPCIDevice,
> - use_legacy_x86_rom, true),
> + use_legacy_x86_rom, false),
> DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrate,
> ON_OFF_AUTO_AUTO),
> };
Hi guys,
there is something fishy going on now:
$ ./qemu-system-x86_64 -M q35 -device vfio-pci
Unexpected error in object_property_find_err() at
../../home/thuth/devel/qemu/qom/object.c:1345:
qemu-system-x86_64: -device vfio-pci: can't apply global
vfio-pci.use-legacy-x86-rom=true: Property 'vfio-pci.use-legacy-x86-rom' not
found
Aborted (core dumped)
Could you please have a look?
Thanks,
Thomas
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PULL 3/3] hw/i386: Add the ramfb romfile compatibility
2025-07-28 10:51 ` Thomas Huth
@ 2025-07-28 11:00 ` Cédric Le Goater
0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2025-07-28 11:00 UTC (permalink / raw)
To: Thomas Huth, Gerd Hoffmann, qemu-devel, Shaoqin Huang
Cc: Paolo Bonzini, Philippe Mathieu-Daudé, Michael S. Tsirkin,
Eduardo Habkost, Richard Henderson, Alex Williamson, Sergio Lopez,
Marcel Apfelbaum, Zhao Liu, Yanan Wang, Eric Auger
On 7/28/25 12:51, Thomas Huth wrote:
> On 18/07/2025 21.43, Gerd Hoffmann wrote:
>> From: Shaoqin Huang <shahuang@redhat.com>
>>
>> ramfb is a sysbus device so it can only used for machine types where it
>> is explicitly enabled:
>>
>> # git grep machine_class_allow_dynamic_sysbus_dev.*TYPE_RAMFB_DEVICE
>> hw/arm/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
>> TYPE_RAMFB_DEVICE);
>> hw/i386/microvm.c: machine_class_allow_dynamic_sysbus_dev(mc,
>> TYPE_RAMFB_DEVICE);
>> hw/i386/pc_piix.c: machine_class_allow_dynamic_sysbus_dev(m,
>> TYPE_RAMFB_DEVICE);
>> hw/i386/pc_q35.c: machine_class_allow_dynamic_sysbus_dev(m,
>> TYPE_RAMFB_DEVICE);
>> hw/loongarch/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
>> TYPE_RAMFB_DEVICE);
>> hw/riscv/virt.c: machine_class_allow_dynamic_sysbus_dev(mc,
>> TYPE_RAMFB_DEVICE);
>>
>> So these six are the only machine types we have to worry about.
>>
>> The three x86 machine types (pc, q35, microvm) will actually use the rom
>> (when booting with seabios).
>>
>> For arm/riscv/loongarch virt we want to disable the rom.
>>
>> This patch sets ramfb romfile option to false by default, except for x86
>> machines types (pc, q35, microvm) which need the rom file when booting
>> with seabios and machine types <= 10.0 (handling the case of arm virt,
>> for compat reasons).
>>
>> At the same time, set the "use-legacy-x86-rom" property to true on those
>> historical versioned machine types in order to avoid the memory layout
>> being changed.
>>
>> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>> Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
>> Reviewed-by: Eric Auger <eric.auger@redhat.com>
>> Signed-off-by: Shaoqin Huang <shahuang@redhat.com>
>> Message-ID: <20250717100941.2230408-4-shahuang@redhat.com>
>> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
>> ---
>> hw/core/machine.c | 2 ++
>> hw/display/ramfb-standalone.c | 2 +-
>> hw/i386/microvm.c | 3 +++
>> hw/i386/pc_piix.c | 10 ++++++++++
>> hw/i386/pc_q35.c | 3 +++
>> hw/vfio/pci.c | 2 +-
>> 6 files changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/hw/core/machine.c b/hw/core/machine.c
>> index e869821b2246..a7043e2a3425 100644
>> --- a/hw/core/machine.c
>> +++ b/hw/core/machine.c
>> @@ -39,6 +39,8 @@
>> GlobalProperty hw_compat_10_0[] = {
>> { "scsi-hd", "dpofua", "off" },
>> + { "ramfb", "use-legacy-x86-rom", "true"},
>> + { "vfio-pci", "use-legacy-x86-rom", "true" },
>> };
>> const size_t hw_compat_10_0_len = G_N_ELEMENTS(hw_compat_10_0);
>> diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c
>> index 82d8c69f8903..72b2071aed01 100644
>> --- a/hw/display/ramfb-standalone.c
>> +++ b/hw/display/ramfb-standalone.c
>> @@ -64,7 +64,7 @@ static const VMStateDescription ramfb_dev_vmstate = {
>> static const Property ramfb_properties[] = {
>> DEFINE_PROP_BOOL("x-migrate", RAMFBStandaloneState, migrate, true),
>> DEFINE_PROP_BOOL("use-legacy-x86-rom", RAMFBStandaloneState,
>> - use_legacy_x86_rom, true),
>> + use_legacy_x86_rom, false),
>> };
>> static void ramfb_class_initfn(ObjectClass *klass, const void *data)
>> diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
>> index e0daf0d4fc30..d90b69a16200 100644
>> --- a/hw/i386/microvm.c
>> +++ b/hw/i386/microvm.c
>> @@ -49,6 +49,7 @@
>> #include "hw/acpi/generic_event_device.h"
>> #include "hw/pci-host/gpex.h"
>> #include "hw/usb/xhci.h"
>> +#include "hw/vfio/types.h"
>> #include "elf.h"
>> #include "kvm/kvm_i386.h"
>> @@ -633,6 +634,8 @@ GlobalProperty microvm_properties[] = {
>> * so reserving io space is not going to work. Turn it off.
>> */
>> { "pcie-root-port", "io-reserve", "0" },
>> + { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
>> + { TYPE_VFIO_PCI, "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 a3285fbc6450..ad5caff3a5d2 100644
>> --- a/hw/i386/pc_piix.c
>> +++ b/hw/i386/pc_piix.c
>> @@ -49,6 +49,7 @@
>> #include "hw/i2c/smbus_eeprom.h"
>> #include "system/memory.h"
>> #include "hw/acpi/acpi.h"
>> +#include "hw/vfio/types.h"
>> #include "qapi/error.h"
>> #include "qemu/error-report.h"
>> #include "system/xen.h"
>> @@ -77,6 +78,13 @@ static const int ide_iobase2[MAX_IDE_BUS] = { 0x3f6, 0x376 };
>> static const int ide_irq[MAX_IDE_BUS] = { 14, 15 };
>> #endif
>> +static GlobalProperty pc_piix_compat_defaults[] = {
>> + { TYPE_RAMFB_DEVICE, "use-legacy-x86-rom", "true" },
>> + { TYPE_VFIO_PCI, "use-legacy-x86-rom", "true" },
>> +};
>> +static const size_t pc_piix_compat_defaults_len =
>> + G_N_ELEMENTS(pc_piix_compat_defaults);
>> +
>> /*
>> * Return the global irq number corresponding to a given device irq
>> * pin. We could also use the bus number to have a more precise mapping.
>> @@ -492,6 +500,8 @@ static void pc_i440fx_machine_options(MachineClass *m)
>> pc_set_south_bridge);
>> object_class_property_set_description(oc, "x-south-bridge",
>> "Use a different south bridge than PIIX3");
>> + compat_props_add(m->compat_props,
>> + pc_piix_compat_defaults, pc_piix_compat_defaults_len);
>> }
>> static void pc_i440fx_machine_10_1_options(MachineClass *m)
>> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
>> index cf871cfdad86..9b9519fa02d5 100644
>> --- a/hw/i386/pc_q35.c
>> +++ b/hw/i386/pc_q35.c
>> @@ -45,6 +45,7 @@
>> #include "hw/i386/pc.h"
>> #include "hw/i386/amd_iommu.h"
>> #include "hw/i386/intel_iommu.h"
>> +#include "hw/vfio/types.h"
>> #include "hw/virtio/virtio-iommu.h"
>> #include "hw/display/ramfb.h"
>> #include "hw/ide/pci.h"
>> @@ -67,6 +68,8 @@
>> 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" },
>> };
>> 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 0b969b3359db..174499ecec65 100644
>> --- a/hw/vfio/pci.c
>> +++ b/hw/vfio/pci.c
>> @@ -3810,7 +3810,7 @@ static const TypeInfo vfio_pci_dev_info = {
>> static const Property vfio_pci_dev_nohotplug_properties[] = {
>> DEFINE_PROP_BOOL("ramfb", VFIOPCIDevice, enable_ramfb, false),
>> DEFINE_PROP_BOOL("use-legacy-x86-rom", VFIOPCIDevice,
>> - use_legacy_x86_rom, true),
>> + use_legacy_x86_rom, false),
>> DEFINE_PROP_ON_OFF_AUTO("x-ramfb-migrate", VFIOPCIDevice, ramfb_migrate,
>> ON_OFF_AUTO_AUTO),
>> };
>
> Hi guys,
>
> there is something fishy going on now:
>
> $ ./qemu-system-x86_64 -M q35 -device vfio-pci
> Unexpected error in object_property_find_err() at ../../home/thuth/devel/qemu/qom/object.c:1345:
> qemu-system-x86_64: -device vfio-pci: can't apply global vfio-pci.use-legacy-x86-rom=true: Property 'vfio-pci.use-legacy-x86-rom' not found
> Aborted (core dumped)
>
> Could you please have a look?
Fix here :
https://lore.kernel.org/qemu-devel/20250723062714.1245826-1-clg@redhat.com/
I am planning to send it with the next vfio PR. People are on vacations
last week and I still need a few Acks.
Thanks,
C.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2025-07-28 11:59 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-18 19:43 [PULL 0/3] Display 20250718 patches Gerd Hoffmann
2025-07-18 19:43 ` [PULL 1/3] ramfb: Add property to control if load the romfile Gerd Hoffmann
2025-07-18 19:43 ` [PULL 2/3] vfio: Move the TYPE_* to hw/vfio/types.h Gerd Hoffmann
2025-07-18 21:03 ` Cédric Le Goater
2025-07-21 6:28 ` Gerd Hoffmann
2025-07-21 6:47 ` Cédric Le Goater
2025-07-18 19:43 ` [PULL 3/3] hw/i386: Add the ramfb romfile compatibility Gerd Hoffmann
2025-07-28 10:51 ` Thomas Huth
2025-07-28 11:00 ` Cédric Le Goater
2025-07-21 18:31 ` [PULL 0/3] Display 20250718 patches Stefan Hajnoczi
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).