diff options
author | jhb <jhb@FreeBSD.org> | 2016-09-30 01:39:18 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-09-30 01:39:18 +0000 |
commit | c761744d70aec20c011a440e546e233b176dfd64 (patch) | |
tree | 9c092465c668c2a3a918408d96a96534fb003870 /sys/dev/mxge | |
parent | cdee9ae0005aad3526e07ef1a0d3b1ca013066da (diff) | |
download | FreeBSD-src-c761744d70aec20c011a440e546e233b176dfd64.zip FreeBSD-src-c761744d70aec20c011a440e546e233b176dfd64.tar.gz |
MFC 304858,305485,305497: Fix various issues with PCI pass through and VT-d.
304858:
Enable I/O MMU when PCI pass through is first used.
Rather than enabling the I/O MMU when the vmm module is loaded,
defer initialization until the first attempt to pass a PCI device
through to a guest. If the I/O MMU fails to initialize or is not
present, than fail the attempt to pass a PCI device through to a
guest.
The hw.vmm.force_iommu tunable has been removed since the I/O MMU is
no longer enabled during boot. However, the I/O MMU support can be
disabled by setting the hw.vmm.iommu.enable tunable to 0 to prevent
use of the I/O MMU on any systems where it is buggy.
305485:
Leave ppt devices in the host domain when they are not attached to a VM.
This allows a pass through device to be reset to a normal device driver
on the host and reused on the host. ppt devices are now always active in
some I/O MMU domain when the I/O MMU is active, either the host domain
or the domain of a VM they are attached to.
305497:
Update the I/O MMU in bhyve when PCI devices are added and removed.
When the I/O MMU is active in bhyve, all PCI devices need valid entries
in the DMAR context tables. The I/O MMU code does a single enumeration
of the available PCI devices during initialization to add all existing
devices to a domain representing the host. The ppt(4) driver then moves
pass through devices in and out of domains for virtual machines as needed.
However, when new PCI devices were added at runtime either via SR-IOV or
HotPlug, the I/O MMU tables were not updated.
This change adds a new set of EVENTHANDLERS that are invoked when PCI
devices are added and deleted. The I/O MMU driver in bhyve installs
handlers for these events which it uses to add and remove devices to
the "host" domain.
Sponsored by: Chelsio Communications
Diffstat (limited to 'sys/dev/mxge')
0 files changed, 0 insertions, 0 deletions