]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
dmar: reserve memory windows of PCIe root port
authorrlibby <rlibby@FreeBSD.org>
Wed, 9 Dec 2020 18:43:58 +0000 (18:43 +0000)
committerrlibby <rlibby@FreeBSD.org>
Wed, 9 Dec 2020 18:43:58 +0000 (18:43 +0000)
commit5886cadbacc36dbc1dc5fa830a2dae56ae49b144
treeadb0781217a3a99c4be3504b2864d75660f92e2f
parent1a08ae3d8862045d7e61d2c6a02c7b8275d1b636
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