From: Laszlo Ersek <lersek@redhat.com>
To: lersek@redhat.com, qemu-devel@nongnu.org
Cc: "Alex Williamson" <alex.williamson@redhat.com>,
"Cédric Le Goater" <clg@redhat.com>
Subject: [PATCH] vfio/pci: hide ROM BAR on SFC9220 10/40G Ethernet Controller PF
Date: Tue, 8 Aug 2023 16:59:16 +0200 [thread overview]
Message-ID: <20230808145916.81657-1-lersek@redhat.com> (raw)
The Solarflare Communications SFC9220 NIC's physical function (PF) appears
to expose an expansion ROM with the following characteristics:
(1) Single-image ROM, with only a legacy BIOS image (no UEFI driver).
Alex's rom-parser utility dumps it like this:
> Valid ROM signature found @0h, PCIR offset 20h
> PCIR: type 0 (x86 PC-AT), vendor: 1924, device: 0a03, class: 000002
> PCIR: revision 3, vendor revision: 1
> Last image
(2) The BIOS image crashes when booted on i440fx.
(3) The BIOS image prints the following messages on q35:
> Solarflare Boot Manager (v5.2.2.1006)
> Solarflare Communications 2008-2019
> gPXE (http://etherboot.org) - [...] PCI[...] PnP PMM[...]
So it appears like a modified derivative of old gPXE.
Alex surmised in advance that the BIOS image could be accessing
host-physical addresses rather than guest-phys ones, leading to the crash
on i440fx.
Don't expose the option ROM BAR to the VM by default. While this prevents
netbooting the VM off the PF on q35/SeaBIOS (a relatively rare scenario),
it does not make any difference for UEFI, and at least the VM doesn't
crash during boot on i440fx/SeaBIOS (a relatively frequent scenario).
Users can restore the original behavior via the QEMU cmdline and the
libvirt domain XML.
(In two years, we've not seen any customer interest in this bug, hence
there's no incentive to investigate (2).)
Cc: Alex Williamson <alex.williamson@redhat.com> (supporter:VFIO)
Cc: "Cédric Le Goater" <clg@redhat.com> (supporter:VFIO)
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1975776
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
hw/vfio/pci-quirks.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/vfio/pci-quirks.c b/hw/vfio/pci-quirks.c
index f4ff83680572..270eb16b91fa 100644
--- a/hw/vfio/pci-quirks.c
+++ b/hw/vfio/pci-quirks.c
@@ -45,6 +45,10 @@ static const struct {
uint32_t device;
} rom_denylist[] = {
{ 0x14e4, 0x168e }, /* Broadcom BCM 57810 */
+ { 0x1924, 0x0a03 }, /* Solarflare Communications
+ * SFC9220 10/40G Ethernet Controller
+ * https://bugzilla.redhat.com/show_bug.cgi?id=1975776
+ */
};
bool vfio_opt_rom_in_denylist(VFIOPCIDevice *vdev)
next reply other threads:[~2023-08-08 15:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-08 14:59 Laszlo Ersek [this message]
2023-08-08 15:40 ` [PATCH] vfio/pci: hide ROM BAR on SFC9220 10/40G Ethernet Controller PF Alex Williamson
2023-08-09 9:07 ` Laszlo Ersek
2023-08-09 12:07 ` Laszlo Ersek
2023-08-09 17:03 ` 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=20230808145916.81657-1-lersek@redhat.com \
--to=lersek@redhat.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).