All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wei Wang2" <wei.wang2@amd.com>
To: Keir Fraser <Keir.Fraser@cl.cam.ac.uk>
Cc: muli@il.ibm.com, "Dannowski, Uwe" <Uwe.Dannowski@amd.com>,
	"Hohmuth, Michael" <Michael.Hohmuth@amd.com>,
	"Woller, Thomas" <thomas.woller@amd.com>,
	iommu@lists.linux-foundation.org, xen-devel@lists.xensource.com,
	elsie.wahlig@amd.com, amit.shah@qumranet.com
Subject: Re: [XEN-IOMMU] Proposal of DMA protection/isolation support
Date: Wed, 16 Jan 2008 18:15:53 +0100	[thread overview]
Message-ID: <1200503754.4026.108.camel@gran.amd.com> (raw)
In-Reply-To: <C3B3E529.1AEAC%Keir.Fraser@cl.cam.ac.uk>

On Wed, 2008-01-16 at 16:45 +0000, Keir Fraser wrote:
> On 16/1/08 16:34, "Wei Wang2" <wei.wang2@amd.com> wrote:
> 
> > 1) Before submitting io request to generic block layer, block backend
> > driver will invoke GNTTABOPs to map granted remote pages .  However
> > creating iommu mapping only in GNTTABOP not very enough because local
> > pages will also be submitted to block layer and they should also be
> > translated by iommu.
> 
> Local pages could always be mapped into the iommu, and only remote pages
> would need to be temporarily mapped via the gnttab hooks.
I remembered that vtd patch used to hook page assignment to for this,
but it was soon replaced with statical 1:1 mapping. Could you suggest me
how to trace local page changes instead of mapping whole the physical
ram?

> 2) When dma layer is invoked to prepare a bus address for native block
> > device driver. It would be better to have a "hypervisor-aware" dma layer
> > which always maps virtual address to bus address via hypercall.
> > __gnttab_dma_map_page() might be a good place to trigger this new
> > hypercall. Both remote and local pages can be mapped by this way.
> 
> An extra hypercall here will likely hurt performance.
I have implemented a prototype for this which removes 1:1 mapping and invoke a hypercall for 
dma mapping. Since block driver uses dma_map_sg heavily which is easy to batch, I have not seen dramatic performance loss.

-Wei

 

>  -- Keir
> 
> 
> 
> 

-Wei

  reply	other threads:[~2008-01-16 17:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-10 15:48 [XEN-IOMMU] Proposal of DMA protection/isolation support Wei Wang2
2008-01-10 15:54 ` Keir Fraser
2008-01-10 16:52   ` Wei Wang2
2008-01-10 16:58     ` Keir Fraser
2008-01-10 17:31       ` Wei Wang2
2008-01-16 16:34       ` Wei Wang2
2008-01-16 16:45         ` Keir Fraser
2008-01-16 17:15           ` Wei Wang2 [this message]
2008-01-16 18:25             ` Keir Fraser
2008-01-17  0:11         ` Re: [XEN-IOMMU] Proposal of DMA protection/isolationsupport Ian Pratt
2008-01-18  8:10           ` tgh
2008-01-12 11:45 ` [XEN-IOMMU] Proposal of DMA protection/isolation support Amit Shah

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=1200503754.4026.108.camel@gran.amd.com \
    --to=wei.wang2@amd.com \
    --cc=Keir.Fraser@cl.cam.ac.uk \
    --cc=Michael.Hohmuth@amd.com \
    --cc=Uwe.Dannowski@amd.com \
    --cc=amit.shah@qumranet.com \
    --cc=elsie.wahlig@amd.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=muli@il.ibm.com \
    --cc=thomas.woller@amd.com \
    --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.