svn commit: r315933 - head/sys/x86/iommu
Konstantin Belousov
kib at FreeBSD.org
Sat Mar 25 10:45:17 UTC 2017
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);
More information about the svn-src-all
mailing list