From owner-svn-src-all@freebsd.org Tue Aug 9 21:25:26 2016 Return-Path: Delivered-To: svn-src-all@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 D5941BB4FCC; Tue, 9 Aug 2016 21:25:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD3201234; Tue, 9 Aug 2016 21:25:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 83BBBB985; Tue, 9 Aug 2016 17:25:25 -0400 (EDT) From: John Baldwin To: src-committers@freebsd.org Cc: svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r303887 - head/tools/tools/dmardump Date: Tue, 09 Aug 2016 14:22:36 -0700 Message-ID: <73543582.oU1jbu7riv@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.3-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201608091906.u79J65Uq058283@repo.freebsd.org> References: <201608091906.u79J65Uq058283@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 09 Aug 2016 17:25:25 -0400 (EDT) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Aug 2016 21:25:26 -0000 On Tuesday, August 09, 2016 07:06:05 PM John Baldwin wrote: > Author: jhb > Date: Tue Aug 9 19:06:05 2016 > New Revision: 303887 > URL: https://svnweb.freebsd.org/changeset/base/303887 > > Log: > Add a dmardump utility to dump the VT-d context tables. > > This tool parses the ACPI DMAR table looking for DMA remapping devices. > For each device it walks the root table and any context tables > referenced to display mapping info for PCI devices. > > Note that acpidump -t already parses the info in the ACPI DMAR tables > directly. This tool examines some of the data structures the DMAR > remapping engines use to translate DMA requests. > > Reviewed by: kib, grehan > MFC after: 1 month > Sponsored by: Chelsio Communications > Differential Revision: https://reviews.freebsd.org/D7444 I should have mentioned that this tool only supports "normal" context entry tables. It does not (yet) support extended context entry tables. However, neither bhyve nor ACPI_DMAR create extended context entry tables. Sample output from a machine where ppt0 is passed through to a bhyve guest: # ./dmardump drhd @ 0xfbffc000 (version 1.0) PCI segment 0: root table @ 0x0x13823f000 PCI bus 0: { 0,0 } (hostb0) TR SLPT 0x139e41000 domain 1 { 1,0 } (pcib2) TR SLPT 0x139e41000 domain 1 { 2,0 } (pcib3) TR SLPT 0x139e41000 domain 1 { 3,0 } (pcib4) TR SLPT 0x139e41000 domain 1 { 3,2 } (pcib5) TR SLPT 0x139e41000 domain 1 { 3,3 } (pcib6) TR SLPT 0x139e41000 domain 1 { 4,0 } TR SLPT 0x139e41000 domain 1 { 4,1 } TR SLPT 0x139e41000 domain 1 { 4,2 } TR SLPT 0x139e41000 domain 1 { 4,3 } TR SLPT 0x139e41000 domain 1 { 4,4 } TR SLPT 0x139e41000 domain 1 { 4,5 } TR SLPT 0x139e41000 domain 1 { 4,6 } TR SLPT 0x139e41000 domain 1 { 4,7 } TR SLPT 0x139e41000 domain 1 { 5,0 } TR SLPT 0x139e41000 domain 1 { 5,1 } TR SLPT 0x139e41000 domain 1 { 5,2 } TR SLPT 0x139e41000 domain 1 { 5,4 } (ioapic0) TR SLPT 0x139e41000 domain 1 { 17,0 } TR SLPT 0x139e41000 domain 1 { 17,4 } (ahci0) TR SLPT 0x139e41000 domain 1 { 20,0 } (xhci0) TR SLPT 0x139e41000 domain 1 { 22,0 } TR SLPT 0x139e41000 domain 1 { 22,1 } TR SLPT 0x139e41000 domain 1 { 26,0 } (ehci0) TR SLPT 0x139e41000 domain 1 { 28,0 } (pcib7) TR SLPT 0x139e41000 domain 1 { 28,6 } (pcib8) TR SLPT 0x139e41000 domain 1 { 29,0 } (ehci1) TR SLPT 0x139e41000 domain 1 { 31,0 } (isab0) TR SLPT 0x139e41000 domain 1 { 31,2 } (ahci1) TR SLPT 0x139e41000 domain 1 { 31,3 } TR SLPT 0x139e41000 domain 1 { 31,6 } TR SLPT 0x139e41000 domain 1 PCI bus 3: { 0,0 } (t5iov0) TR SLPT 0x139e41000 domain 1 { 0,1 } (t5iov1) TR SLPT 0x139e41000 domain 1 { 0,2 } (t5iov2) TR SLPT 0x139e41000 domain 1 { 0,3 } (t5iov3) TR SLPT 0x139e41000 domain 1 { 0,4 } (t5nex0) TR SLPT 0x139e41000 domain 1 { 0,5 } TR SLPT 0x139e41000 domain 1 { 0,6 } TR SLPT 0x139e41000 domain 1 { 0,8 } (ppt0) TR SLPT 0x1a157b000 domain 2 PCI bus 5: { 0,0 } (igb0) TR SLPT 0x139e41000 domain 1 { 0,1 } (igb1) TR SLPT 0x139e41000 domain 1 PCI bus 7: { 0,0 } (pcib9) TR SLPT 0x139e41000 domain 1 PCI bus 8: { 0,0 } (vgapci0) TR SLPT 0x139e41000 domain 1 -- John Baldwin