Page MenuHomeFreeBSD

Fix pci-passthru MSI issues with OpenBSD guests.
ClosedPublic

Authored by grehan on May 22 2020, 8:56 AM.
Tags
None
Referenced Files
F87635192: D24951.id72214.diff
Sat, Jul 6, 5:33 AM
F87635156: D24951.diff
Sat, Jul 6, 5:32 AM
Unknown Object (File)
Wed, Jun 26, 1:26 PM
Unknown Object (File)
Tue, Jun 18, 6:35 PM
Unknown Object (File)
Sat, Jun 15, 10:18 AM
Unknown Object (File)
May 24 2024, 4:33 PM
Unknown Object (File)
May 13 2024, 6:48 AM
Unknown Object (File)
May 4 2024, 10:04 AM
Subscribers

Details

Summary
  • Return 2 x 16-bit registers in the correct byte order for a 4-byte read that spands 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.

PR 245392

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

Test Plan

Set up an OpenBSD guest with a passthru device.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I think this is fine. The other design option would be to have pci_emul_capwrite to always require the explicit offset and id and move the while loop out into a helper function (pci_emul_lookup_cap or some such) that pci_cfgrw would use.

This revision is now accepted and ready to land.May 22 2020, 3:39 PM
This revision was automatically updated to reflect the committed changes.