From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCd25-0005nt-4T for qemu-devel@nongnu.org; Tue, 16 Dec 2008 11:44:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCd24-0005mb-4c for qemu-devel@nongnu.org; Tue, 16 Dec 2008 11:44:28 -0500 Received: from [199.232.76.173] (port=59099 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCd23-0005mQ-UC for qemu-devel@nongnu.org; Tue, 16 Dec 2008 11:44:28 -0500 Received: from mail-bw0-f12.google.com ([209.85.218.12]:60549) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LCd23-0001ED-Jk for qemu-devel@nongnu.org; Tue, 16 Dec 2008 11:44:27 -0500 Received: by bwz5 with SMTP id 5so6012632bwz.10 for ; Tue, 16 Dec 2008 08:44:25 -0800 (PST) Message-ID: Date: Tue, 16 Dec 2008 18:35:08 +0200 From: "Blue Swirl" Subject: Re: [Qemu-devel] Re: [PATCH 2 of 5] add can_dma/post_dma for direct IO In-Reply-To: <200812161630.00400.paul@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <4946D501.4020109@codemonkey.ws> <200812161630.00400.paul@codesourcery.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Andrea Arcangeli , chrisw@redhat.com, kvm@vger.kernel.org, qemu-devel@nongnu.org, Gerd Hoffmann , Avi Kivity On 12/16/08, Paul Brook wrote: > > The generic resolving API should look something like > > > > int (*resolve)(target_phys_addr_t address_in, target_phys_addr_t > > length_in, target_phys_addr_t &address_out, target_phys_addr_t > > &length_out) > > > I don't think this is sufficient. A paged iommu may split a single range into > multiple disjoint sections. i.e. we need SG lists. That's why there is the length_out, it is called repeatedly until the length is zero or it fails.