Date: Tue, 24 Mar 2015 12:48:52 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280435 - head/sys/x86/iommu Message-ID: <201503241248.t2OCmqkm051026@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Mar 24 12:48:51 2015 New Revision: 280435 URL: https://svnweb.freebsd.org/changeset/base/280435 Log: When mapping an allocated entry, use the entry size, instead of the requested size. If tag restrictions caused split entry, its size is less then requsted. Hardware provided by: Michael Fuckner <michael@fuckner.net> Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/iommu/intel_gas.c Modified: head/sys/x86/iommu/intel_gas.c ============================================================================== --- head/sys/x86/iommu/intel_gas.c Tue Mar 24 12:46:21 2015 (r280434) +++ head/sys/x86/iommu/intel_gas.c Tue Mar 24 12:48:51 2015 (r280435) @@ -649,7 +649,7 @@ dmar_gas_map(struct dmar_ctx *ctx, const entry->flags |= eflags; DMAR_CTX_UNLOCK(ctx); - error = ctx_map_buf(ctx, entry->start, size, ma, + error = ctx_map_buf(ctx, entry->start, entry->end - entry->start, ma, ((eflags & DMAR_MAP_ENTRY_READ) != 0 ? DMAR_PTE_R : 0) | ((eflags & DMAR_MAP_ENTRY_WRITE) != 0 ? DMAR_PTE_W : 0) | ((eflags & DMAR_MAP_ENTRY_SNOOP) != 0 ? DMAR_PTE_SNP : 0) |
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503241248.t2OCmqkm051026>