qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Tomita Moeko <tomitamoeko@gmail.com>
To: "Alex Williamson" <alex.williamson@redhat.com>,
	"Cédric Le Goater" <clg@redhat.com>
Cc: qemu-devel@nongnu.org, Tomita Moeko <tomitamoeko@gmail.com>
Subject: [PATCH 03/10] vfio/igd: Remove rombar check for legacy mode
Date: Tue, 25 Feb 2025 02:29:20 +0800	[thread overview]
Message-ID: <20250224182927.31519-4-tomitamoeko@gmail.com> (raw)
In-Reply-To: <20250224182927.31519-1-tomitamoeko@gmail.com>

Legacy VBIOS support was removed in Gen 11 and later IGD devices. While
we usually uses romfile for IGD-related DXE drivers, it's not always
necessary. Remove the ROM BAR requirement for legacy mode to support
newer devices without a specified romfile.

Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
---
 hw/vfio/igd.c | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)

diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index dda4c7bb5d..4ae1122a2d 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -341,7 +341,6 @@ void vfio_probe_igd_bar0_quirk(VFIOPCIDevice *vdev, int nr)
 
 void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
 {
-    g_autofree struct vfio_region_info *rom = NULL;
     g_autofree struct vfio_region_info *opregion = NULL;
     g_autofree struct vfio_region_info *host = NULL;
     g_autofree struct vfio_region_info *lpc = NULL;
@@ -391,26 +390,12 @@ void vfio_probe_igd_bar4_quirk(VFIOPCIDevice *vdev, int nr)
     }
 
     /*
-     * Most of what we're doing here is to enable the ROM to run, so if
-     * there's no ROM, there's no point in setting up this quirk.
-     * NB. We only seem to get BIOS ROMs, so a UEFI VM would need CSM support.
-     */
-    ret = vfio_get_region_info(&vdev->vbasedev,
-                               VFIO_PCI_ROM_REGION_INDEX, &rom);
-    if ((ret || !rom->size) && !vdev->pdev.romfile) {
-        error_report("IGD device %s has no ROM, legacy mode disabled",
-                     vdev->vbasedev.name);
-        return;
-    }
-
-    /*
-     * Ignore the hotplug corner case, mark the ROM failed, we can't
-     * create the devices we need for legacy mode in the hotplug scenario.
+     * Ignore the hotplug corner case, we can't create the devices we
+     * need for legacy mode in the hotplug scenario.
      */
     if (vdev->pdev.qdev.hotplugged) {
-        error_report("IGD device %s hotplugged, ROM disabled, "
-                     "legacy mode disabled", vdev->vbasedev.name);
-        vdev->rom_read_failed = true;
+        error_report("IGD device %s hotplugged, legacy mode disabled",
+                     vdev->vbasedev.name);
         return;
     }
 
-- 
2.47.2



  parent reply	other threads:[~2025-02-24 18:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 18:29 [PATCH 00/10] vfio/igd: Remove legacy mode Tomita Moeko
2025-02-24 18:29 ` [PATCH 01/10] vfio/igd: Remove GTT write quirk in IO BAR 4 Tomita Moeko
2025-02-24 18:29 ` [PATCH 02/10] vfio/igd: Do not include GTT stolen size in etc/igd-bdsm-size Tomita Moeko
2025-02-24 18:29 ` Tomita Moeko [this message]
2025-02-24 18:29 ` [PATCH 04/10] vfio/igd: Remove implicit VGA access enabled by legacy mode Tomita Moeko
2025-02-24 18:29 ` [PATCH 05/10] vfio/pci: Make vfio_populate_vga static Tomita Moeko
2025-02-24 18:29 ` [PATCH 06/10] vfio/igd: Consolidate OpRegion initialization into a single function Tomita Moeko
2025-02-24 18:29 ` [PATCH 07/10] vfio/igd: Move LPC bridge initialization to a separate function Tomita Moeko
2025-02-24 18:29 ` [PATCH 08/10] vfio/pci: Add placeholder for device-specific config space quirks Tomita Moeko
2025-02-24 18:29 ` [PATCH 09/10] vfio/igd: Refactor vfio_probe_igd_bar4_quirk into pci config quirk Tomita Moeko
2025-02-24 18:29 ` [PATCH 10/10] vfio/igd: Replace legacy mode with options Tomita Moeko
2025-02-27  8:28 ` [PATCH 00/10] vfio/igd: Remove legacy mode Cédric Le Goater
2025-02-27 16:03   ` Tomita Moeko
2025-02-27 21:55 ` Alex Williamson

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=20250224182927.31519-4-tomitamoeko@gmail.com \
    --to=tomitamoeko@gmail.com \
    --cc=alex.williamson@redhat.com \
    --cc=clg@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 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).