[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Xen-devel] Re: [XEN-IOMMU] Proposal of DMA protection/isolationsupport
- To: "Wei Wang2" <wei.wang2@xxxxxxx>, "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>
- From: "Ian Pratt" <Ian.Pratt@xxxxxxxxxxxxx>
- Date: Thu, 17 Jan 2008 00:11:58 -0000
- Cc: muli@xxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <Ian.Pratt@xxxxxxxxxxxxx>, iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, Thomas Woller <thomas.woller@xxxxxxx>, "Hohmuth, Michael" <Michael.Hohmuth@xxxxxxx>, "Dannowski, Uwe" <Uwe.Dannowski@xxxxxxx>, elsie.wahlig@xxxxxxx, amit.shah@xxxxxxxxxxxx
- Delivery-date: Wed, 16 Jan 2008 16:12:41 -0800
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
- Thread-index: AchYXbTGJNrJljQWQhKQAxyn+dTxNgAP4NEA
- Thread-topic: [Xen-devel] Re: [XEN-IOMMU] Proposal of DMA protection/isolationsupport
> After looking into the grant mapping code (use block device as an
> example), I got some ideas to share with you and the list. Please
> correct me if I missed something. There might be 2 places to trigger
> iommu mapping:
>
> 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.
>
> 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.
It's much better to create most mappings in #1 when the operations are
easily batchable into a single hypercall, and then fill in the missing
mappings when required at #2.
Since in many situations dom0 does very little IO for itself, this
should be a significant win, especially for networking.
Ian
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel