[PATCH v10 0/2] ramfb: Add property to control if load the romfile

Shaoqin Huang posted 2 patches 4 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250716082153.2219809-1-shahuang@redhat.com
Maintainers: Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, Zhao Liu <zhao1.liu@intel.com>, Gerd Hoffmann <kraxel@redhat.com>, Sergio Lopez <slp@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, "Michael S. Tsirkin" <mst@redhat.com>, Alex Williamson <alex.williamson@redhat.com>, "Cédric Le Goater" <clg@redhat.com>
There is a newer version of this series
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 ++
hw/vfio/pci.h                 |  1 +
include/hw/display/ramfb.h    |  2 +-
11 files changed, 33 insertions(+), 7 deletions(-)
[PATCH v10 0/2] ramfb: Add property to control if load the romfile
Posted by Shaoqin Huang 4 months ago
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.

Then I set the use_legacy_x86_rom property to false by default, and only set it
to true on x86 since only x86 will need it.

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.

Changelog:
---------
v9 -> v10:
  - Fix the long line.
  - Add the reviewed-by and ack.
v8 -> v9:
  - Improve the commit message.
v7 -> v8:
  - Set the property in microvm machine type.
v6 -> v7:
  - Set the property into hw_compat_10_0 instead of hw_compat_9_2.
v5 -> v6:
  - Set the property to true on those historical versioned machine types.
v4 -> v5:
  - Fix some typo error.
  - Set the property in piix machine type.
v3 -> v4:
  - Set the new property to false by default, only set it to true on x86.
v2 -> v3:
  - Fix the underscore error.
  - Add a new patch to set the property in arm compatibility.
v1 -> v2:
  - Change the property name.

v9: https://lore.kernel.org/all/20250704030315.2181235-1-shahuang@redhat.com/
v7: https://lore.kernel.org/all/20250702085616.2172722-1-shahuang@redhat.com/
v6: https://lore.kernel.org/all/20250701030549.2153331-1-shahuang@redhat.com/
v5: https://lore.kernel.org/all/20250626034526.2136585-1-shahuang@redhat.com/
v4: https://lore.kernel.org/all/20250617030521.2109305-1-shahuang@redhat.com/
v3: https://lore.kernel.org/all/20250609073408.2083831-1-shahuang@redhat.com/
v2: https://lore.kernel.org/all/20250606070234.2063451-1-shahuang@redhat.com/
v1: https://lore.kernel.org/all/20250605030351.2056571-1-shahuang@redhat.com/

Shaoqin Huang (2):
  ramfb: Add property to control if load the romfile
  hw/i386: Add the ramfb romfile compatibility

 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 ++
 hw/vfio/pci.h                 |  1 +
 include/hw/display/ramfb.h    |  2 +-
 11 files changed, 33 insertions(+), 7 deletions(-)

-- 
2.40.1