All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomita Moeko <tomitamoeko@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Alex Williamson" <alex@shazbot.org>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Tomita Moeko" <tomitamoeko@gmail.com>,
	"K S Maan" <kirandeepmaan45@gmail.com>
Subject: [PATCH v4 3/4] vfio/igd: Setup romfile_fixup hook
Date: Thu,  2 Jul 2026 02:20:34 +0800	[thread overview]
Message-ID: <20260701182035.96010-4-tomitamoeko@gmail.com> (raw)
In-Reply-To: <20260701182035.96010-1-tomitamoeko@gmail.com>

Install vfio_igd_legacy_rom_quirk() as the PCIDevice romfile_fixup hook
when romfile is set so that a romfile-supplied VBIOS receives the same
IGD fixup as the image read from the kernel ROM BAR.

Reported-by: K S Maan <kirandeepmaan45@gmail.com>
Signed-off-by: Tomita Moeko <tomitamoeko@gmail.com>
---
 hw/vfio/igd.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/vfio/igd.c b/hw/vfio/igd.c
index f597218164..6fa8b26201 100644
--- a/hw/vfio/igd.c
+++ b/hw/vfio/igd.c
@@ -610,6 +610,10 @@ static bool vfio_pci_igd_config_quirk(VFIOPCIDevice *vdev, Error **errp)
         goto error;
     }
 
+    if (pdev->romfile) {
+        pdev->romfile_fixup = vfio_igd_legacy_rom_quirk;
+    }
+
     /*
      * ASLS (OpRegion address) is read-only, emulated
      * It contains HPA, guest firmware need to reprogram it with GPA.
-- 
2.53.0



  parent reply	other threads:[~2026-07-01 18:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01 18:20 [PATCH v4 0/4] vfio/igd: Fix garbled screen on IGD passthrough with legacy VBIOS Tomita Moeko
2026-07-01 18:20 ` [PATCH v4 1/4] hw/pci: Introduce romfile_fixup hook in PCIDevice Tomita Moeko
2026-07-01 20:58   ` Michael S. Tsirkin
2026-07-01 18:20 ` [PATCH v4 2/4] vfio/igd: Refactor option ROM patching Tomita Moeko
2026-07-01 18:20 ` Tomita Moeko [this message]
2026-07-01 18:20 ` [PATCH v4 4/4] vfio/igd: Clear saved BDSM in legacy VBIOS ROM at load time Tomita Moeko

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=20260701182035.96010-4-tomitamoeko@gmail.com \
    --to=tomitamoeko@gmail.com \
    --cc=alex@shazbot.org \
    --cc=clg@redhat.com \
    --cc=kirandeepmaan45@gmail.com \
    --cc=mst@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.