All of lore.kernel.org
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC v1 1/2] documentation/iommu: Add description of Hisilicon System MMU binding
Date: Fri, 20 Jun 2014 18:49:52 +0100	[thread overview]
Message-ID: <20140620174952.GD30656@arm.com> (raw)
In-Reply-To: <d3c51c2360874a8b9deefaaa8beaf0d9@BL2PR03MB468.namprd03.prod.outlook.com>

On Fri, Jun 20, 2014 at 10:54:59AM +0100, Varun Sethi wrote:
> Hi Will,

Hello,

> > Note that I *have* been playing with PCI on the ARM SMMU (see the patch
> > below) but I currently just assume RequesterID == StreamID, which is true
> > for the platform I'm using.

[...]

> > @@ -1596,15 +1634,35 @@ static int arm_smmu_add_device(struct device
> > *dev)
> >               return PTR_ERR(group);
> >       }
> >
> > +     if (dev_is_pci(dev)) {
> > +             struct arm_smmu_master_cfg *cfg;
> > +             struct pci_dev *pdev = to_pci_dev(dev);
> > +
> > +             cfg = kzalloc(sizeof(*cfg), GFP_KERNEL);
> > +             if (!cfg) {
> > +                     ret = -ENOMEM;
> > +                     goto out_put_group;
> > +             }
> > +
> > +             cfg->num_streamids = 1;
> > +             cfg->streamids[0] = PCI_DEVID(pdev->bus->number, pdev-
> > >devfn);
> [Sethi Varun-B16395] We should be considering the bus topology i.e. what
> if the device is setting behind a bridge? It's possible the requestor id
> for the DMA transaction belongs to the bridge. Also, the iommu group
> creation should also take in to account the topology.

Yeah, as I mentioned above, this assumes that RequesterID == StreamID. Are
you simply alluding to a non-transparent PCI bridge, or do you have
something different? For non-transparent bridges, I guess we can re-use the
code already in the kernel (VFIO handles this with its groups IIUC)?

Will

  reply	other threads:[~2014-06-20 17:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 13:37 [PATCH RFC v1 0/2] Add support for Hisilicon SMMU architecture Zhen Lei
2014-06-05 13:37 ` [PATCH RFC v1 1/2] documentation/iommu: Add description of Hisilicon System MMU binding Zhen Lei
2014-06-05 15:26   ` Mark Rutland
2014-06-06  6:48   ` Arnd Bergmann
2014-06-06 11:07     ` Dave Martin
2014-06-11  8:12       ` leizhen
2014-06-16 16:26       ` Will Deacon
2014-06-16 16:42         ` Arnd Bergmann
2014-06-16 16:45           ` Will Deacon
2014-06-16 17:25             ` Arnd Bergmann
2014-06-16 18:26               ` Will Deacon
2014-06-17  7:14                 ` Arnd Bergmann
2014-06-17 11:49                   ` Thierry Reding
2014-06-18 11:10                 ` Varun Sethi
2014-06-18 12:31                   ` Will Deacon
2014-06-20  9:54                     ` Varun Sethi
2014-06-20 17:49                       ` Will Deacon [this message]
2014-06-20 18:57                         ` Varun Sethi
2014-06-24 14:30                           ` Will Deacon
2014-06-17  7:57           ` leizhen
2014-06-16 16:44     ` Arnd Bergmann
2014-06-05 13:37 ` [PATCH RFC v1 2/2] iommu/hisilicon: Add support for Hisilicon Ltd. System MMU architecture Zhen Lei
2014-06-05 15:21 ` [PATCH RFC v1 0/2] Add support for Hisilicon SMMU architecture Mark Rutland
2014-06-06  0:21   ` leizhen

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=20140620174952.GD30656@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.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.