From owner-svn-src-stable-10@FreeBSD.ORG Sun Mar 1 10:29:49 2015 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27E5494F; Sun, 1 Mar 2015 10:29:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 1254FC3D; Sun, 1 Mar 2015 10:29:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t21ATm2X069418; Sun, 1 Mar 2015 10:29:48 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t21ATmoE069417; Sun, 1 Mar 2015 10:29:48 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201503011029.t21ATmoE069417@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 1 Mar 2015 10:29:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r279484 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Mar 2015 10:29:49 -0000 Author: kib Date: Sun Mar 1 10:29:48 2015 New Revision: 279484 URL: https://svnweb.freebsd.org/changeset/base/279484 Log: MFC r276867: Fix DMAR context allocations for the devices behind PCIe->PCI bridges after dmar driver was converted to use rids. The bus component to calculate context page must be taken from the requestor rid, which is a bridge, and not from the device bus number. Modified: stable/10/sys/x86/iommu/intel_ctx.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:04:14 2015 (r279483) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Mar 1 10:29:48 2015 (r279484) @@ -290,7 +290,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev * higher chance to succeed if the sleep is allowed. */ DMAR_UNLOCK(dmar); - dmar_ensure_ctx_page(dmar, bus); + dmar_ensure_ctx_page(dmar, PCI_RID2BUS(rid)); ctx1 = dmar_get_ctx_alloc(dmar, rid); if (id_mapped) {