From mboxrd@z Thu Jan 1 00:00:00 1970 From: tgh Subject: Re: Re: [XEN-IOMMU] Proposal of DMA protection/isolationsupport Date: Fri, 18 Jan 2008 16:10:46 +0800 Message-ID: <47905F06.8070406@sina.com.cn> References: <1200501262.4026.91.camel@gran.amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Pratt Cc: muli@il.ibm.com, xen-devel@lists.xensource.com, iommu@lists.linux-foundation.org, Thomas Woller , Wei Wang2 , "Dannowski, Uwe" , elsie.wahlig@amd.com, "Hohmuth, Michael" , amit.shah@qumranet.com List-Id: xen-devel@lists.xenproject.org hi IOMMU, could it be used in KVM ,or not? if it could , what about the=20 difference between the usage in xen and the usage in KVM? Thanks Ian Pratt =E5=86=99=E9=81=93: >> 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. >> =20 > > > 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 > =20 > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > > =20