]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 304858,305485: Fix various issues with PCI pass through and VT-d.
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 30 Sep 2016 01:42:29 +0000 (01:42 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 30 Sep 2016 01:42:29 +0000 (01:42 +0000)
commit0284edc20be244591a4b722e73cfabcfe534acc2
tree730fb32b516e8f48640f9dc056551475af80e408
parent26d3f4d658e0126ebc5bb0d055ec907ccb7284fc
MFC 304858,305485: 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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@306472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/amd64/vmm/io/iommu.c
sys/amd64/vmm/io/iommu.h
sys/amd64/vmm/io/ppt.c
sys/amd64/vmm/vmm.c