From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiYF4-0006WR-IE for qemu-devel@nongnu.org; Sun, 06 Apr 2008 13:01:18 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiYF2-0006Vv-Uc for qemu-devel@nongnu.org; Sun, 06 Apr 2008 13:01:18 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiYF2-0006Vs-P4 for qemu-devel@nongnu.org; Sun, 06 Apr 2008 13:01:16 -0400 Received: from ug-out-1314.google.com ([66.249.92.171]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JiYF2-0005x8-FU for qemu-devel@nongnu.org; Sun, 06 Apr 2008 13:01:16 -0400 Received: by ug-out-1314.google.com with SMTP id m2so283988uge.4 for ; Sun, 06 Apr 2008 10:01:09 -0700 (PDT) Message-ID: Date: Sun, 6 Apr 2008 19:01:09 +0200 From: "andrzej zaborowski" Subject: Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API (v2) In-Reply-To: <47F8EAAB.2080806@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1207368175-19476-1-git-send-email-aliguori@us.ibm.com> <1207368175-19476-2-git-send-email-aliguori@us.ibm.com> <47F8EAAB.2080806@codemonkey.ws> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Blue Swirl , kvm-devel@lists.sourceforge.net On 06/04/2008, Anthony Liguori wrote: > Blue Swirl wrote: > > To support Sparc IOMMU and DMA controller > > I need a way to call a series of different translation functions > > depending on the bus where we are. For the byte swapping case the > > memcpy functions must be dynamic as well. > > Does DMA really byte-swap? I know PCI controllers byte swap within the > configuration space but I didn't think they byte-swapped DMA transfers. I'm > not even sure how that would work. As a note, the DMA controllers in the ARM system-on-chip's can byte-swap, do 90deg rotation of 2D arrays, transparency (probably intened for image blitting, but still available on any kind of transfers), etc., and most importantly issue interrupts on reaching different points of a transfer. It is not worth worrying about them in this API. I have been for some time wanting to make a separate api called soc_dma whose task would be using simply memcpy (or zero-copy) in the most basic case (interrupts off, no transparency, same-endianness endpoints), as these properties are common for DMA on the TI OMAPs, the Intel PXAs and the Samsung S3Cs (which otherwise have little in common). Cheers -- Please do not print this email unless absolutely necessary. Spread environmental awareness.