summaryrefslogtreecommitdiffstats
path: root/sys/amd64/vmm/io/iommu.h
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2016-09-30 01:39:18 +0000
committerjhb <jhb@FreeBSD.org>2016-09-30 01:39:18 +0000
commitc761744d70aec20c011a440e546e233b176dfd64 (patch)
tree9c092465c668c2a3a918408d96a96534fb003870 /sys/amd64/vmm/io/iommu.h
parentcdee9ae0005aad3526e07ef1a0d3b1ca013066da (diff)
downloadFreeBSD-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/amd64/vmm/io/iommu.h')
-rw-r--r--sys/amd64/vmm/io/iommu.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/amd64/vmm/io/iommu.h b/sys/amd64/vmm/io/iommu.h
index 36b44fa..a941c77 100644
--- a/sys/amd64/vmm/io/iommu.h
+++ b/sys/amd64/vmm/io/iommu.h
@@ -61,7 +61,6 @@ struct iommu_ops {
extern struct iommu_ops iommu_ops_intel;
extern struct iommu_ops iommu_ops_amd;
-void iommu_init(void);
void iommu_cleanup(void);
void *iommu_host_domain(void);
void *iommu_create_domain(vm_paddr_t maxaddr);
OpenPOWER on IntegriCloud