summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-10-28 13:33:29 +0000
committerkib <kib@FreeBSD.org>2013-10-28 13:33:29 +0000
commit74b8996ebefacbf869105ddeb0bd74e0c79859d1 (patch)
treec58e8615de663a385a4b33efbb947ccf0106671f /sys/i386
parentde4d214d0421a4179a8e4b872e203547b330cb19 (diff)
downloadFreeBSD-src-74b8996ebefacbf869105ddeb0bd74e0c79859d1.zip
FreeBSD-src-74b8996ebefacbf869105ddeb0bd74e0c79859d1.tar.gz
Import the driver for VT-d DMAR hardware, as specified in the revision
1.3 of Intelб╝ Virtualization Technology for Directed I/O Architecture Specification. The Extended Context and PASIDs from the rev. 2.2 are not supported, but I am not aware of any released hardware which implements them. Code does not use queued invalidation, see comments for the reason, and does not provide interrupt remapping services. Code implements the management of the guest address space per domain and allows to establish and tear down arbitrary mappings, but not partial unmapping. The superpages are created as needed, but not promoted. Faults are recorded, fault records could be obtained programmatically, and printed on the console. Implement the busdma(9) using DMARs. This busdma backend avoids bouncing and provides security against misbehaving hardware and driver bad programming, preventing leaks and corruption of the memory by wild DMA accesses. By default, the implementation is compiled into amd64 GENERIC kernel but disabled; to enable, set hw.dmar.enable=1 loader tunable. Code is written to work on i386, but testing there was low priority, and driver is not enabled in GENERIC. Even with the DMAR turned on, individual devices could be directed to use the bounce busdma with the hw.busdma.pci<domain>:<bus>:<device>:<function>.bounce=1 tunable. If DMARs are capable of the pass-through translations, it is used, otherwise, an identity-mapping page table is constructed. The driver was tested on Xeon 5400/5500 chipset legacy machine, Haswell desktop and E5 SandyBridge dual-socket boxes, with ahci(4), ata(4), bce(4), ehci(4), mfi(4), uhci(4), xhci(4) devices. It also works with em(4) and igb(4), but there some fixes are needed for drivers, which are not committed yet. Intel GPUs do not work with DMAR (yet). Many thanks to John Baldwin, who explained me the newbus integration; Peter Holm, who did all testing and helped me to discover and understand several incredible bugs; and to Jim Harris for the access to the EDS and BWG and for listening when I have to explain my findings to somebody. Sponsored by: The FreeBSD Foundation MFC after: 1 month
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/conf/NOTES1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/i386/conf/NOTES b/sys/i386/conf/NOTES
index 50b391a..519592b 100644
--- a/sys/i386/conf/NOTES
+++ b/sys/i386/conf/NOTES
@@ -491,6 +491,7 @@ device tdfx_linux # Enable Linuxulator support
device acpi
options ACPI_DEBUG
+options ACPI_DMAR
# ACPI WMI Mapping driver
device acpi_wmi
OpenPOWER on IntegriCloud