1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-04 09:09:56 +00:00

Use the BUS_DMA_NOWRITE flag to expose and create the read-only VT-d

IOMMU mappings.

Reviewed by:	kib
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D19729
This commit is contained in:
Tycho Nightingale 2019-03-27 20:15:51 +00:00
parent a273e09cb2
commit cec2287b6a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345601

View File

@ -527,7 +527,8 @@ dmar_bus_dmamap_load_something1(struct bus_dma_tag_dmar *tag,
gas_flags |= DMAR_GM_CANSPLIT;
error = dmar_gas_map(domain, &tag->common, size, offset,
DMAR_MAP_ENTRY_READ | DMAR_MAP_ENTRY_WRITE,
DMAR_MAP_ENTRY_READ |
((flags & BUS_DMA_NOWRITE) == 0 ? DMAR_MAP_ENTRY_WRITE : 0),
gas_flags, ma + idx, &entry);
if (error != 0)
break;