HomeFreeBSD

bhyve: Map the MSI-X table unconditionally for passthrough

Description

bhyve: Map the MSI-X table unconditionally for passthrough

It is possible for the PBA to reside in the same page as the MSI-X
table. And, while devices are not supposed to do this, at least some
Intel wifi devices place registers in a page shared with the MSI-X
table. To handle the first case we currently map the PBA page using
/dev/mem, and the second case is not handled.

Kill two birds with one stone: map the MSI-X table BAR using the
PCIOCBARMMAP ioctl instead of /dev/mem, and map the entire table so that
accesses beyond the bounds of the table can be emulated. Regions of the
BAR not containing the table are left unmapped.

Reviewed by: bz, grehan, jhb
MFC after: 3 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32359

Details

Provenance
markjAuthored on Oct 9 2021, 3:36 PM
Reviewer
bz
Differential Revision
D32359: bhyve: Map the MSI-X table unconditionally when passthrough is enabled
Parents
rGc8a45820e0d9: sbin/mount_fusefs/mount_fusefs.8: Fix typos
Branches
Unknown
Tags
Unknown

Event Timeline