From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOxKo-0005xB-Nm for qemu-devel@nongnu.org; Mon, 19 Jan 2009 11:50:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOxKk-0005st-5m for qemu-devel@nongnu.org; Mon, 19 Jan 2009 11:50:46 -0500 Received: from [199.232.76.173] (port=57507 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOxKj-0005si-Si for qemu-devel@nongnu.org; Mon, 19 Jan 2009 11:50:41 -0500 Received: from mail-bw0-f21.google.com ([209.85.218.21]:40179) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOxKj-0005zY-Bv for qemu-devel@nongnu.org; Mon, 19 Jan 2009 11:50:41 -0500 Received: by bwz14 with SMTP id 14so8558957bwz.10 for ; Mon, 19 Jan 2009 08:50:39 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <1232308399-21679-1-git-send-email-avi@redhat.com> References: <1232308399-21679-1-git-send-email-avi@redhat.com> Date: Mon, 19 Jan 2009 18:50:38 +0200 Message-ID: Subject: Re: [Qemu-devel] [PATCH 0/5] Direct memory access for devices From: Blue Swirl Content-Type: text/plain; charset=UTF-8 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: qemu-devel@nongnu.org On 1/18/09, Avi Kivity wrote: > One of the deficiencies of the current device layer is that it can only access > guest RAM via cpu_physical_memory_rw(). This means that the device emulation > code must copy the memory to or from a temporary buffer, even though the host > offers APIs which allow direct access to memory. This reduces efficiency on > DMA capable devices, especially disks. > > This patchset introduces a complement to the read/write API, > cpu_physical_memory_map() which allows device emulation code to map > guest memory directly. The API bounces memory regions which cannot be > mapped (such as mmio regions) using an internal buffer. > > As an example, IDE emulation is converted to use the new API. This exposes > another deficiency: lack of scatter/gather support in the block layer. To > work around this, a vectored block API is introduced, currently emulated > by bouncing. Additional work is needed to convert all block format drivers > to use the vectored API. Great! I'll try to use the API for ESP and Lance on Sparc32, that may reveal if there are any problems in the design.