Page MenuHomeFreeBSD

bhyve: Map the right BAR in init_msix_table()
ClosedPublic

Authored by markj on Jan 4 2022, 7:11 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jul 2, 12:02 AM
Unknown Object (File)
May 19 2026, 6:29 AM
Unknown Object (File)
May 17 2026, 11:52 AM
Unknown Object (File)
May 17 2026, 11:11 AM
Unknown Object (File)
May 16 2026, 11:51 PM
Unknown Object (File)
May 16 2026, 9:41 PM
Unknown Object (File)
May 15 2026, 8:59 PM
Unknown Object (File)
May 14 2026, 12:37 PM
Subscribers

Details

Summary

The PBA and MSI-X table can reside in different BARs.

Reported by: Andy Fiddaman <andy@omniosce.org>
Fixes: 7fa233534736 ("bhyve: Map the MSI-X table unconditionally for passthrough")
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Jan 4 2022, 7:11 PM

Fix a second bug, also reported by Andy:

If the last page containing the table is not also the last page
of the BAR, then we would call mprotect(PROT_NONE) on the wrong
portion of the mapping.

This revision is now accepted and ready to land.Jan 4 2022, 10:35 PM