]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dmar: reserve memory windows of PCIe root port
authorRyan Libby <rlibby@FreeBSD.org>
Wed, 9 Dec 2020 18:43:58 +0000 (18:43 +0000)
committerRyan Libby <rlibby@FreeBSD.org>
Wed, 9 Dec 2020 18:43:58 +0000 (18:43 +0000)
commitee47a12a490f89226ae736f92d8578ec1ca3b157
treeadb0781217a3a99c4be3504b2864d75660f92e2f
parent6813f2420b236f852d18f1a582c77d17ed15d45f
dmar: reserve memory windows of PCIe root port

PCI memory address space is shared between memory-mapped devices (MMIO)
and host memory (which may be remapped by an IOMMU). Device accesses to
an address within a memory aperture in a PCIe root port will be treated
as peer-to-peer and not forwarded to an IOMMU. To avoid this, reserve
the address space of the root port's memory apertures in the address
space used by the IOMMU for remapping.

Reviewed by: kib, tychon
Discussed with: Anton Rang <rang@acm.org>
Tested by: tychon
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D27503
sys/dev/iommu/iommu.h
sys/dev/iommu/iommu_gas.c
sys/x86/iommu/intel_ctx.c