From: Joerg Roedel <joro@8bytes.org>
To: Stuart Yoder <b08248@gmail.com>
Cc: Joerg Roedel <joerg.roedel@amd.com>,
Alex Williamson <alex.williamson@redhat.com>,
Scott Wood <scottwood@freescale.com>,
varun.sethi@freescale.com, kvm@vger.kernel.org,
iommu@lists.linux-foundation.org, Alexander Graf <agraf@suse.de>
Subject: Re: RFC: iommu_ops -- limitation with current attach_dev() API
Date: Thu, 12 Jan 2012 15:55:00 +0100 [thread overview]
Message-ID: <20120112145500.GB25119@8bytes.org> (raw)
In-Reply-To: <CALRxmdAhLA4=BFcRNUFGDiKpt4dyfg5q6UFQT_K-P7o2aNusGA@mail.gmail.com>
On Tue, Jan 10, 2012 at 11:15:54AM -0600, Stuart Yoder wrote:
> We have devices that are capable of and need to access multiple
> domains. At the hardware level the device has multiple 'logical
> I/O device numbers' which is the index into our IOMMU tables. This
> means the device can target DMA operations to 2 different
> address spaces.
Your IOMMU is a real challenge it seems ;-)
> In some internal discussions here at Freescale, here were some
> of our initial ideas:
>
> -in 'struct device' define a new list of hardware/physical DMA 'domains'
> that represent each address space a device can target:
>
> struct list_head iommu_hw_domain_head;
I think we really should introduce a dev->iommu pointer which can be
used by IOMMU drivers. Your hardware is on the third architecture
needing such a pointer and hiding it in dev->archdata.
> That list would get populated when the device struct is
> initialized with an arch specific list of the hardware 'domains'.
>
> -define a new iommu_ops function to add devices with this hardware
> domain info:
>
> extern int iommu_attach_device_ext(struct iommu_domain *domain,
> struct device *dev, void *iommu_hw_domain);
How about just enumerating the device address spaces with an u32 and use
that to assign the domains. Or is an in-kernel descriptor for the
hardware-side really needed? If so, why?
Joerg
next prev parent reply other threads:[~2012-01-12 14:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-10 17:15 RFC: iommu_ops -- limitation with current attach_dev() API Stuart Yoder
2012-01-12 14:55 ` Joerg Roedel [this message]
2012-01-12 17:19 ` Scott Wood
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=20120112145500.GB25119@8bytes.org \
--to=joro@8bytes.org \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=b08248@gmail.com \
--cc=iommu@lists.linux-foundation.org \
--cc=joerg.roedel@amd.com \
--cc=kvm@vger.kernel.org \
--cc=scottwood@freescale.com \
--cc=varun.sethi@freescale.com \
/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