From owner-svn-src-head@freebsd.org Sat Mar 25 10:45:17 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56B10D1C742; Sat, 25 Mar 2017 10:45:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 260931D88; Sat, 25 Mar 2017 10:45:17 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v2PAjGK7034921; Sat, 25 Mar 2017 10:45:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v2PAjG1u034920; Sat, 25 Mar 2017 10:45:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201703251045.v2PAjG1u034920@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Mar 2017 10:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r315933 - head/sys/x86/iommu X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Mar 2017 10:45:17 -0000 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);