From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiOpE-0008SB-2x for qemu-devel@nongnu.org; Sun, 06 Apr 2008 02:58:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiOpD-0008Qy-3F for qemu-devel@nongnu.org; Sun, 06 Apr 2008 02:57:59 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiOpD-0008Qp-04 for qemu-devel@nongnu.org; Sun, 06 Apr 2008 02:57:59 -0400 Received: from mx20.gnu.org ([199.232.41.8]) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JiOpC-00016h-BT for qemu-devel@nongnu.org; Sun, 06 Apr 2008 02:57:58 -0400 Received: from fg-out-1718.google.com ([72.14.220.153]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JiOpB-0003pR-Mn for qemu-devel@nongnu.org; Sun, 06 Apr 2008 02:57:57 -0400 Received: by fg-out-1718.google.com with SMTP id e12so690517fga.8 for ; Sat, 05 Apr 2008 23:57:56 -0700 (PDT) Message-ID: Date: Sun, 6 Apr 2008 09:57:56 +0300 From: "Blue Swirl" Subject: Re: [Qemu-devel] [PATCH 2/6] PCI DMA API (v2) In-Reply-To: <1207368175-19476-2-git-send-email-aliguori@us.ibm.com> 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> 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: kvm-devel@lists.sourceforge.net, Marcelo Tosatti , Anthony Liguori , Paul Brook , Aurelien Jarno On 4/5/08, Anthony Liguori wrote: > This patch introduces a PCI DMA API and some generic code to support other DMA > APIs. It introduces a IOVector type that contains physical address/length > pairs. These vectors can be translated by the PCI layer and passed either to > generic copying functions or directly to the block or network subsystems. But cpu_map_physical_page can't be the correct function for translation for every case. 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.