From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JiWhc-0005O3-Md for qemu-devel@nongnu.org; Sun, 06 Apr 2008 11:22:40 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JiWha-0005LV-8P for qemu-devel@nongnu.org; Sun, 06 Apr 2008 11:22:39 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JiWha-0005LC-0M for qemu-devel@nongnu.org; Sun, 06 Apr 2008 11:22:38 -0400 Received: from an-out-0708.google.com ([209.85.132.241]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JiWhZ-0000fp-Lo for qemu-devel@nongnu.org; Sun, 06 Apr 2008 11:22:37 -0400 Received: by an-out-0708.google.com with SMTP id d26so312569and.130 for ; Sun, 06 Apr 2008 08:22:22 -0700 (PDT) Message-ID: <47F8EAAB.2080806@codemonkey.ws> Date: Sun, 06 Apr 2008 10:22:19 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [kvm-devel] [Qemu-devel] [PATCH 2/6] PCI DMA API (v2) References: <1207368175-19476-1-git-send-email-aliguori@us.ibm.com> <1207368175-19476-2-git-send-email-aliguori@us.ibm.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Blue Swirl Cc: kvm-devel@lists.sourceforge.net, Marcelo Tosatti , qemu-devel@nongnu.org, Aurelien Jarno , Paul Brook Blue Swirl wrote: > 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. cpu_map_physical_page is the last function you call after you have already translated the IOVector however many times you need to. It's only used within the IO infrastructure (net, block) which are passed fully translated IOVectors. > 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. Regards, Anthony Liguori > ------------------------------------------------------------------------- > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > Register now and save $200. Hurry, offer ends at 11:59 p.m., > Monday, April 7! Use priority code J8TLD2. > http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone > _______________________________________________ > kvm-devel mailing list > kvm-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/kvm-devel >