From: Mitchel Humpherys <mitchelh@codeaurora.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org,
Will Deacon <will.deacon@arm.com>,
Robin Murphy <robin.murphy@arm.com>,
Tony Truong <truong@codeaurora.org>,
Yan He <yanhe@codeaurora.org>,
Pratik Patel <pratikp@codeaurora.org>,
Hamad Kadmany <hkadmany@codeaurora.org>,
Maya Erez <qca_merez@qca.qualcomm.com>
Subject: Re: How to keep PCI-e endpoints and RCs in distinct IOMMU groups?
Date: Thu, 02 Jun 2016 12:33:22 -0700 [thread overview]
Message-ID: <vnkwa8j3fksd.fsf@codeaurora.org> (raw)
In-Reply-To: <20160525204558.08c30a34@ul30vt.home> (Alex Williamson's message of "Wed, 25 May 2016 20:45:58 -0600")
On Wed, May 25 2016 at 08:45:58 PM, Alex Williamson <alex.williamson@redhat.com> wrote:
>> Why do we do that? If the devices have different BDFs can't we safely
>> say that they're protected from peer-to-peer DMA (assuming no DMA
>> aliasing quirks)? Even as I write that out it seems wrong though since
>> the RC can probably do whatever it wants...
>>
>> Maybe the IOMMU framework can't actually know whether the devices should
>> be kept in separate groups and we just need to do something custom in
>> the arm-smmu driver?
>
> You're only considering the visibility of devices to the IOMMU, not the
> isolation between devices. Without ACS peer-to-peer can be re-routed
> between devices before the IOMMU even knows about it. That's why the
> root port is included in the group. I'm confused why your driver is
> using the IOMMU API instead of the much more common DMA API anyway
> though. Thanks,
>
> Alex
Ah ok, thanks for the explanation!
The driver *is* using the DMA API. I'm actually working on the DMA APIs
themselves (a hacked-up version of the arm32 DMA APIs that have been
forklifted into arm64, to be exact). Anyways, it looks like the best
route for us long-term is to try and align with Robin's arm64 IOMMU DMA
API mapper and take it from there.
-Mitch
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-06-02 19:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 0:26 How to keep PCI-e endpoints and RCs in distinct IOMMU groups? Mitchel Humpherys
2016-05-26 0:26 ` Mitchel Humpherys
2016-05-26 2:45 ` Alex Williamson
2016-06-02 19:33 ` Mitchel Humpherys [this message]
2016-05-26 10:58 ` Robin Murphy
2016-06-02 19:26 ` Mitchel Humpherys
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=vnkwa8j3fksd.fsf@codeaurora.org \
--to=mitchelh@codeaurora.org \
--cc=alex.williamson@redhat.com \
--cc=hkadmany@codeaurora.org \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-pci@vger.kernel.org \
--cc=pratikp@codeaurora.org \
--cc=qca_merez@qca.qualcomm.com \
--cc=robin.murphy@arm.com \
--cc=truong@codeaurora.org \
--cc=will.deacon@arm.com \
--cc=yanhe@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.