HomeFreeBSD

Fix pci-passthru MSI issues with OpenBSD guests

Description

Fix pci-passthru MSI issues with OpenBSD guests

  • Return 2 x 16-bit registers in the correct byte order for a 4-byte read that spans the CMD/STATUS register. This reversal was hiding the capabilities-list, which prevented the MSI capability from being found for XHCI passthru.
  • Reorganize MSI/MSI-x config writes so that a 4-byte write at the capability offset would have the read-only portion skipped. This prevented MSI interrupts from being enabled.

    Reported and extensively tested by Anatoli (me at anatoli dot ws)

PR: 245392
Reported by: Anatoli (me at anatoli dot ws)
Reviewed by: jhb (bhyve)
Approved by: jhb, bz (mentor)
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D24951

Details

Provenance
grehanAuthored on
Reviewer
jhb
Differential Revision
D24951: Fix pci-passthru MSI issues with OpenBSD guests.
Parents
rS361441: vfs: use atomic_{store,load}_long to manage f_offset
Branches
Unknown
Tags
Unknown