Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 2017 10:45:16 +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: r315933 - head/sys/x86/iommu
Message-ID:  <201703251045.v2PAjG1u034920@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sat Mar 25 10:45:16 2017
New Revision: 315933
URL: https://svnweb.freebsd.org/changeset/base/315933

Log:
  Do not create RMRR entries for identity-mapped domains.
  
  It does not make sense since identity mapping already provides the
  required mapping for RMRR ranges.  More, since identity page tables do
  not reflect content of map entries for id domains, creating RMRR
  entries makes domain data inconsistent.
  
  Sponsored by:	The FreeBSD Foundation
  MFC after:	1 week

Modified:
  head/sys/x86/iommu/intel_ctx.c

Modified: head/sys/x86/iommu/intel_ctx.c
==============================================================================
--- head/sys/x86/iommu/intel_ctx.c	Sat Mar 25 10:42:10 2017	(r315932)
+++ head/sys/x86/iommu/intel_ctx.c	Sat Mar 25 10:45:16 2017	(r315933)
@@ -433,11 +433,13 @@ dmar_get_ctx_for_dev(struct dmar_unit *d
 			TD_PINNED_ASSERT;
 			return (NULL);
 		}
-		error = domain_init_rmrr(domain1, dev);
-		if (error != 0) {
-			dmar_domain_destroy(domain1);
-			TD_PINNED_ASSERT;
-			return (NULL);
+		if (!id_mapped) {
+			error = domain_init_rmrr(domain1, dev);
+			if (error != 0) {
+				dmar_domain_destroy(domain1);
+				TD_PINNED_ASSERT;
+				return (NULL);
+			}
 		}
 		ctx1 = dmar_ctx_alloc(domain1, rid);
 		ctxp = dmar_map_ctx_entry(ctx1, &sf);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703251045.v2PAjG1u034920>