From: "Michael S. Tsirkin" <mst@redhat.com>
To: Moeko Tomita <tomitamoeko@gmail.com>
Cc: qemu-devel@nongnu.org, "Alex Williamson" <alex@shazbot.org>,
"Cédric Le Goater" <clg@redhat.com>,
"K S Maan" <kirandeepmaan45@gmail.com>
Subject: Re: [PATCH v3 1/7] hw/pci: Recalculate option ROM checksum before patching ID
Date: Wed, 1 Jul 2026 03:09:55 -0400 [thread overview]
Message-ID: <20260701025521-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <CAJ+pfRS5A+KMZN+c4SCDxcr1PuqdC1Ci7yiJieAR8Rxgiut=HQ@mail.gmail.com>
On Wed, Jul 01, 2026 at 02:47:30PM +0800, Moeko Tomita wrote:
> pci_patch_ids() is only called for ROMs flagged rom_need_patch_id
> (only ipxe roms
> and IGD), the scope is still limited and won't potentially impact
> other existing functions,
> it's safe doing it here.
>
> The fix is targeted on IGD romfile, which can't easily go in vfio.
> vfio_pci_size_rom()
> simply lets PCI core to handle the romfile and never touches or sees the romfile
> itself. Adding a hook in vfio brings extra code duplication and complexity.
>
> Moeko
IMHO this can all too easily break working setups.
What about multi-image roms, for example?
What about a padded rom file?
If someone gave me a broken rom I would normally just say "so don't do
this".
If vfio wants to work around broken firmware, it's up to vfio.
Maybe it makes sense, I would not know.
You can keep the patching code in pci, just invoke from vfio
after pci_register_bar.
Not a big deal imho, and safer.
--
MST
next prev parent reply other threads:[~2026-07-01 7:11 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-17 10:06 [PATCH v3 0/7] vfio/igd: Fix garbled screen on IGD passthrough with legacy VBIOS Tomita Moeko
2026-06-17 10:06 ` [PATCH v3 1/7] hw/pci: Recalculate option ROM checksum before patching ID Tomita Moeko
2026-06-26 10:23 ` Michael S. Tsirkin
2026-07-01 6:47 ` Moeko Tomita
2026-07-01 7:09 ` Michael S. Tsirkin [this message]
2026-06-17 10:06 ` [PATCH v3 2/7] hw/pci: Skip EFI option ROM in pci_patch_ids() Tomita Moeko
2026-06-26 10:29 ` Michael S. Tsirkin
2026-06-17 10:06 ` [PATCH v3 3/7] hw/pci: Introduce rom_need_patch_id flag in PCIDevice Tomita Moeko
2026-06-26 10:30 ` Michael S. Tsirkin
2026-06-17 10:06 ` [PATCH v3 4/7] hw/pci: Promote pci_patch_ids() to public pci_rom_patch_ids() Tomita Moeko
2026-06-26 10:30 ` Michael S. Tsirkin
2026-06-17 10:06 ` [PATCH v3 5/7] vfio/igd: Toggle rom_need_patch_id flag on IGD devices Tomita Moeko
2026-06-17 10:06 ` [PATCH v3 6/7] vfio/pci: Use pci_rom_patch_ids() for IGD ROM ID patching Tomita Moeko
2026-06-17 10:06 ` [PATCH v3 7/7] vfio/igd: Clear saved BDSM in legacy VBIOS ROM at load time Tomita Moeko
2026-06-18 6:42 ` [PATCH v3 0/7] vfio/igd: Fix garbled screen on IGD passthrough with legacy VBIOS Cédric Le Goater
2026-06-18 7:02 ` K S Maan
2026-06-18 8:34 ` Cédric Le Goater
2026-06-18 10:21 ` K S Maan
2026-06-18 10:36 ` Cédric Le Goater
2026-06-18 10:40 ` Cédric Le Goater
2026-06-23 21:32 ` Alex Williamson
2026-06-24 6:28 ` Cédric Le Goater
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=20260701025521-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=alex@shazbot.org \
--cc=clg@redhat.com \
--cc=kirandeepmaan45@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=tomitamoeko@gmail.com \
/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