From: Amit Shah <amit.shah@qumranet.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
muli@il.ibm.com, alexisb@us.ibm.com, andi@firstfloor.org,
kvm@vger.kernel.org, avi@qumranet.com
Subject: Re: [PATCH v2 -mm 0/2] x86: per-device dma_mapping_ops
Date: Thu, 22 May 2008 16:13:02 +0530 [thread overview]
Message-ID: <200805221613.03686.amit.shah@qumranet.com> (raw)
In-Reply-To: <1211178689-3507-1-git-send-email-fujita.tomonori@lab.ntt.co.jp>
On Monday 19 May 2008 12:01:27 FUJITA Tomonori wrote:
> This is an updated version of the patchset to add per-device
> dma_mapping_ops support for CONFIG_X86_64 like POWER architecture
> does:
>
> http://lkml.org/lkml/2008/5/13/36
>
> This is against 2.6.26-rc2-mm1 (the changes since the v1 are pretty
> trivial like dropping the change for v850 arch).
>
> This enables us to cleanly fix the Calgary IOMMU issue that some
> devices are not behind the IOMMU [1].
>
> I think that per-device dma_mapping_ops support would be also helpful
> for KVM people to support PCI passthrough but Andi thinks that this
> makes it difficult to support the PCI passthrough (see the above
> thread). So I CC'ed this to KVM camp. Comments are appreciated.
I think what's more useful is a chain with a properly defined order or
hierarchy (based on what Muli suggested last time we discussed this
http://lkml.org/lkml/2007/11/12/44 )
The suggested order was (in calling order):
pvdma->hardare->nommu/swiotlb
The discussion in the thread pointed to above has details as to why.
> A pointer to dma_mapping_ops to struct dev_archdata is added. If the
> pointer is non NULL, DMA operations in asm/dma-mapping.h use it. If
> it's NULL, the system-wide dma_ops pointer is used as before.
> If it's useful for KVM people, I plan to implement a mechanism to
> register a hook called when a new pci (or dma capable) device is
OK; this sounds helpful. the hook can make a hypercall and confirm with the
host kernel if the device in question is an assigned physical device. If yes,
we replace the dma_ops. Though, the original intent of having stackable ops
is that we might want to go through the swiotlb in the guest even for an
assigned device if the guest dma addresses are not in the addressable range
of the guest chipset.
> created (it works with hot plugging). It enables IOMMUs to set up an
> appropriate dma_mapping_ops per device.
>From what we've discussed so far, it looks like stackable dma ops will
definitely be needed. Does this patchset provide something that stacking
won't?
> [1] http://lkml.org/lkml/2008/5/8/423
Amit.
next prev parent reply other threads:[~2008-05-22 10:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-19 6:31 FUJITA Tomonori
2008-05-19 6:31 ` [PATCH v2 -mm 1/2] add the device argument to dma_mapping_error FUJITA Tomonori
2008-05-19 6:31 ` [PATCH v2 -mm 2/2] x86: per-device dma_mapping_ops support FUJITA Tomonori
2008-07-02 10:07 ` [PATCH v2 -mm 1/2] add the device argument to dma_mapping_error Andrew Morton
2008-07-02 10:18 ` Michael Buesch
2008-07-02 10:20 ` Michael Buesch
2008-07-02 10:41 ` Andrew Morton
2008-05-22 10:43 ` Amit Shah [this message]
2008-05-25 7:20 ` [PATCH v2 -mm 0/2] x86: per-device dma_mapping_ops Muli Ben-Yehuda
2008-05-26 4:09 ` Amit Shah
2008-05-26 6:11 ` FUJITA Tomonori
2008-05-26 16:44 ` Amit Shah
2008-05-26 23:50 ` FUJITA Tomonori
2008-05-27 4:53 ` Amit Shah
2008-05-27 5:24 ` FUJITA Tomonori
2008-05-27 5:54 ` Amit Shah
2008-05-28 10:19 ` FUJITA Tomonori
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=200805221613.03686.amit.shah@qumranet.com \
--to=amit.shah@qumranet.com \
--cc=akpm@linux-foundation.org \
--cc=alexisb@us.ibm.com \
--cc=andi@firstfloor.org \
--cc=avi@qumranet.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muli@il.ibm.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
all inboxes | Powered by JetHome®