Author: tychon Date: Wed Mar 27 20:15:51 2019 New Revision: 345601 URL: https://svnweb.freebsd.org/changeset/base/345601
Log: 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 Modified: head/sys/x86/iommu/busdma_dmar.c Modified: head/sys/x86/iommu/busdma_dmar.c ============================================================================== --- head/sys/x86/iommu/busdma_dmar.c Wed Mar 27 19:59:36 2019 (r345600) +++ head/sys/x86/iommu/busdma_dmar.c Wed Mar 27 20:15:51 2019 (r345601) @@ -527,7 +527,8 @@ dmar_bus_dmamap_load_something1(struct bus_dma_tag_dma 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; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"