From: Anthony Liguori <aliguori@us.ibm.com>
To: Gerd Hoffmann <kraxel@suse.de>
Cc: "Magenheimer,
Dan (HP Labs Fort Collins)" <dan.magenheimer@hp.com>,
xen-devel <xen-devel@lists.xensource.com>
Subject: Re: Essay on an important Xen decision (long)
Date: Wed, 11 Jan 2006 10:22:20 -0600 [thread overview]
Message-ID: <43C530BC.2090106@us.ibm.com> (raw)
In-Reply-To: <43C4D0F4.5050604@suse.de>
Gerd Hoffmann wrote:
> Hi,
>
>> If the only issue for making dom0 VP is DMA, wouldn't it be easier to
>> modify the Linux DMA subsystem[1] to make a special hypercall to
>> essentially pin a VP to a particular MFN that could be used for the DMA?
>
>
> Linux has a nice API for DMA memory management, see
> Documentation/DMA-mapping.txt. Basically you pass in a "struct page"
> and a offset (within that page) and get back a dma address you can
> pass on to your hardware. That is required for some architectures
> where phyical addresses (as seen by the CPU) and bus addresses (as
> seen by the pci devices) are not identical. It's also needed on archs
> which have an iommu to create/delete mapping entries there.
>
> I think that API should do just fine for any DMA transfer dom0 wants
> to do for its own pages. xenlinux would simply need a special
> implementation of that API which calls xen to translate the VP address
> into a dma address (usually same as machine address). Probably xen
> must also handle a iommu (if present) to ensure secure dma once we
> have hardware which supports this.
Excellent, thanks for the reference!
>
> A bit more tricky are DMA transfers for _other_ domains (i.e. what the
> blkback driver has to do). blkback maps the foreign domain pages into
> its own address space, and I think there is no way around that right
> now API-wise as otherwise there isn't a "struct page" for the page ...
There are, of course, other ways around this. One could have a
hypervisor level DMA API that allowed bulk transfer of memory between
domains (either by copying or page flipping depending the size of the
buffer). Another option would be a separate pool of sharable memory
that could be mapped appropriately into a domain's VPM space.
Regards,
Anthony Liguori
> cheers,
>
> Gerd
>
next prev parent reply other threads:[~2006-01-11 16:22 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-10 19:26 Essay on an important Xen decision (long) Magenheimer, Dan (HP Labs Fort Collins)
2006-01-10 19:34 ` Mark Williamson
2006-01-10 19:55 ` Anthony Liguori
2006-01-11 9:33 ` Gerd Hoffmann
2006-01-11 16:22 ` Anthony Liguori [this message]
2006-01-11 10:08 ` Keir Fraser
2006-01-11 16:25 ` Anthony Liguori
2006-01-11 16:22 ` Mark Williamson
2006-01-11 16:41 ` Anthony Liguori
2006-01-11 21:16 ` Hollis Blanchard
2006-01-11 16:38 ` Keir Fraser
2006-01-11 10:46 ` Tristan Gingold
2006-01-10 23:02 ` Hollis Blanchard
2006-01-11 13:37 ` Harry Butterworth
-- strict thread matches above, loose matches on Subject: below --
2006-01-11 0:13 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-11 0:22 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-11 0:39 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-11 21:36 ` Hollis Blanchard
2006-01-11 7:56 Tian, Kevin
2006-01-11 17:20 Ian Pratt
2006-01-11 17:38 ` Anthony Liguori
2006-01-12 0:48 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-12 2:44 Tian, Kevin
2006-01-16 15:52 ` Mark Williamson
2006-01-16 22:56 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-17 2:47 ` Mark Williamson
2006-01-17 3:03 Magenheimer, Dan (HP Labs Fort Collins)
2006-01-17 3:16 ` Mark Williamson
2006-01-17 4:11 Tian, Kevin
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=43C530BC.2090106@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=dan.magenheimer@hp.com \
--cc=kraxel@suse.de \
--cc=xen-devel@lists.xensource.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 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.