Repository navigation
[amd64-v6.18.55-generic] vfio/pci: Expose setup ROM only for display devices - #337
Open
eriknordmark wants to merge 1 commit into
Conversation
Since e021e6c ("vfio/pci: Expose setup ROM at ROM bar when needed") vfio-pci exposes the firmware-provided ROM copy (pdev->rom) at the ROM BAR of any device without a ROM BAR resource. Platform UEFI also hands over legacy PXE ROMs for onboard NICs that have no ROM BAR of their own, e.g. Intel's Boot Agent GE for the I210 on a Supermicro X10SDV. That image is shared across Intel GbE parts and its PCIR names 8086:1521. QEMU's vfio ROM loader rewrites a mismatched device ID to the device's own (1533) and stores the checksum correction in ROM byte 6, which in this ROM is the far return ending its init entry. A SeaBIOS guest given the NIC then crashes in the ROM's init with a KVM internal error. QEMU 9.1 through current master do this, so limit the fallback to display-class devices. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VyjigXVFZhuUg5LiRSVwsj
Contributor
Author
|
Tested this PR's head (97d2463, core flavor) in an EVE-k build on the Supermicro X10SDV (onboard I210 assigned to a SeaBIOS guest): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since v6.14 (e021e6c), vfio-pci exposes the platform firmware's copy of a device's option ROM at the ROM BAR of any device that has none. On a Supermicro X10SDV that hands the guest Intel's Boot Agent ROM for the onboard I210. QEMU's vfio ROM loader rewrites the ROM's mismatched PCIR device ID (1521 → 1533) and puts the checksum correction in byte 6, which in this ROM is the
lretending its init entry. A SeaBIOS guest given the NIC then crashes with a KVM internal error (EIP 0x98000). QEMU 9.1 through current master do this, so a QEMU upgrade does not avoid it.This limits the setup-ROM fallback to display-class devices, the case e021e6c was written for.
Tested on sc-sm-e300-10 (EVE-k, 6.18.55):
test_app_assigned_ethfails on the stock kernel and passes with this patch. Bare QEMU withromfile=reproduces the crash from the fixed-up image alone. Details in #334.Fixes #334
🤖 Generated with Claude Code
https://claude.ai/code/session_01VyjigXVFZhuUg5LiRSVwsj