From: enjoymindful@gmail.com (Real Name)
To: kernelnewbies@lists.kernelnewbies.org
Subject: View device <=> IOMMU mapping table
Date: Wed, 9 Jul 2014 23:08:17 +0800 [thread overview]
Message-ID: <20140709150817.GA16438@name> (raw)
In-Reply-To: <1404907938.95659.YahooMailNeo@web162501.mail.bf1.yahoo.com>
On Wed, Jul 09, 2014 at 05:12:18AM -0700, Ahmed A wrote:
> Hello,
> I know the b:d.f? of my device.? However, I am not able to tell if this specific device is mapped to the right IOMMU.? In my specific system there are two IOMMU, right?
http://www.intel.com/content/www/us/en/intelligent-systems/intel-technology/vt-directed-io-spec.html
Why you think there are two IOMMU? Just because there are two socket?
If there is north bridge, the IOMMU is in the north bridge, not the
CPU/socket.
/proc/iomem list the bus space address range of the PCIe device. The bus space
to memory space mapping is dynamic. I insrumented the mlx4 infiniband
driver to trace the DMA mapping (on a 2-sockets x86_64 server).
[root at localhost mlx4]# lspci -vs 07:00.0
07:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
Subsystem: Mellanox Technologies Device 0050
Physical Slot: 2
Flags: bus master, fast devsel, latency 0, IRQ 26
Memory at f7f00000 (64-bit, non-prefetchable) [size=1M]
Memory at f6000000 (64-bit, prefetchable) [size=8M]
Capabilities: [40] Power Management version 3
Capabilities: [48] Vital Product Data
Capabilities: [9c] MSI-X: Enable+ Count=128 Masked-
Capabilities: [60] Express Endpoint, MSI 00
Capabilities: [100] Alternative Routing-ID Interpretation (ARI)
Capabilities: [148] Device Serial Number 00-02-c9-03-00-b3-c7-c0
Capabilities: [108] Single Root I/O Virtualization (SR-IOV)
Capabilities: [154] Advanced Error Reporting
Capabilities: [18c] #19
Kernel driver in use: mlx4_core
[root at localhost mlx4]#
[root at localhost mlx4]# dmesg
[root at localhost mlx4]# ibv_rc_pingpong
local address: LID 0x0002, QPN 0x000054, PSN 0x454e1a, GID ::
remote address: LID 0x0001, QPN 0x000054, PSN 0x6e4596, GID ::
8192000 bytes in 0.00 seconds = 13799.96 Mbit/sec
1000 iters in 0.00 seconds = 4.75 usec/iter
[root at localhost mlx4]# dmesg
[ 5474.650073] vma = ffff8804164460b8, vma->vm_start = 00002af33ba39000, pfn = 1007753, pva = 00000000f6089000, kva = ffff8800f6089000, n = 1
[ 5474.706424] vma = ffff880416446730, vma->vm_start = 00002af33ba3a000, pfn = 1007753, pva = 00000000f6089000, kva = ffff8800f6089000, n = 2
[root at localhost ~]#
As you see, pva (000f6089000) belong to this bus space address "Memory at f6000000 (64-bit, prefetchable) [size=8M]".
Hope this can be help.
>? If so, I am not sure how I can get the mapping info from the output of /proc/iomem.
prev parent reply other threads:[~2014-07-09 15:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-09 4:33 View device <=> IOMMU mapping table Ahmed A
2014-07-09 8:18 ` Real Name
2014-07-09 12:12 ` Ahmed A
2014-07-09 15:08 ` Real Name [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140709150817.GA16438@name \
--to=enjoymindful@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).