From: Chris Wright <chrisw@sous-sol.org>
To: Prasad Joshi <P.G.Joshi@student.reading.ac.uk>
Cc: Chris Wright <chrisw@sous-sol.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: Query on IOMMU
Date: Tue, 21 Dec 2010 12:34:59 -0800 [thread overview]
Message-ID: <20101221203459.GJ15023@sequoia.sous-sol.org> (raw)
In-Reply-To: <000DF292CEBFBB41A633359D615F1514022A5FF4@DB2PRD0103MB011.eurprd01.prod.exchangelabs.com>
* Prasad Joshi (P.G.Joshi@student.reading.ac.uk) wrote:
> The following condition from __attach_device() returns the error.
> static int __attach_device(struct device *dev,
> struct protection_domain *domain)
> {
> ...
> if (alias_data->domain != NULL &&
> alias_data->domain != domain)
> goto out_unlock;
> ...
> }
That's the issue. The IOMMU has a set of page tables for each DeviceID.
For most devices, the DeviceID is the same as the Bus:Dev.Func (the PCI
address) of the device. But this does not always work. One example is
when a device is behind a PCI-to-PCI Bridge. In that case, the device
memory read/write requests (attempts to DMA) will appear as if they came
from the bridge.
00:14.4 PCI bridge: ATI Technologies Inc SBx00 PCI to PCI Bridge
Bus: primary=00, secondary=01, subordinate=01, sec-latency=64
That's the bridge that sits between your e100 and the IOMMU.
thanks,
-chris
next prev parent reply other threads:[~2010-12-21 20:35 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 16:00 Query on IOMMU Prasad Joshi
2010-12-21 16:15 ` Chris Wright
2010-12-21 16:54 ` Prasad Joshi
2010-12-21 17:12 ` Chris Wright
2010-12-21 17:39 ` Prasad Joshi
2010-12-21 18:33 ` Chris Wright
[not found] ` <000DF292CEBFBB41A633359D615F1514022A5FF4@DB2PRD0103MB011.eurprd01.prod.exchangelabs.com>
2010-12-21 19:22 ` Prasad Joshi
2010-12-21 19:29 ` Chris Wright
2010-12-21 19:56 ` Prasad Joshi
2010-12-21 20:01 ` Chris Wright
2010-12-21 20:06 ` Prasad Joshi
2010-12-22 9:06 ` [PATCH] pci-stub: ignore zero-length id parameters Tejun Heo
2010-12-23 20:54 ` Jesse Barnes
2010-12-21 20:34 ` Chris Wright [this message]
2010-12-22 13:16 ` Query on IOMMU Prasad Joshi
2010-12-22 13:35 ` Prasad Joshi
2010-12-22 14:56 ` Chris Wright
2010-12-22 14:54 ` Chris Wright
2010-12-22 15:02 ` Prasad Joshi
2010-12-22 15:22 ` Chris Wright
2010-12-22 15:46 ` Prasad Joshi
2010-12-22 16:34 ` Prasad Joshi
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=20101221203459.GJ15023@sequoia.sous-sol.org \
--to=chrisw@sous-sol.org \
--cc=P.G.Joshi@student.reading.ac.uk \
--cc=kvm@vger.kernel.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