svn commit: r280435 - head/sys/x86/iommu

Konstantin Belousov kib at FreeBSD.org
Tue Mar 24 12:48:52 UTC 2015


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 at 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) |


More information about the svn-src-head mailing list