From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LQ2uY-0003bD-9m for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:00:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LQ2uU-0003a1-QL for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:00:08 -0500 Received: from [199.232.76.173] (port=53717 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LQ2uT-0003Zo-1O for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:00:05 -0500 Received: from yx-out-1718.google.com ([74.125.44.152]:6580) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LQ2uS-00047D-Jt for qemu-devel@nongnu.org; Thu, 22 Jan 2009 12:00:04 -0500 Received: by yx-out-1718.google.com with SMTP id 3so1786751yxi.82 for ; Thu, 22 Jan 2009 09:00:04 -0800 (PST) Message-ID: <4978A5FD.2060803@codemonkey.ws> Date: Thu, 22 Jan 2009 10:59:41 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1232620587-11625-1-git-send-email-avi@redhat.com> In-Reply-To: <1232620587-11625-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 0/5] Direct memory access for devices (v2) Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org 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. > Applied all. Thanks. Regards, Anthony Liguori > Changes from v1: > - documented memory mapping API > - added access_len parameter to unmap operation, to indicate how much > memory was actually accessed > - move QEMUIOVector to cutils.c, and add flatten/unflatten operations > - change block format driver API to accept a QEMUIOVector rather than a > bare struct iovec > > Avi Kivity (5): > Add target memory mapping API > Add map client retry notification > I/O vector helpers > Vectored block device API > Convert IDE to directly access guest memory > > block.c | 68 +++++++++++++++++++++++++++ > block.h | 8 +++ > cpu-all.h | 8 +++ > cutils.c | 47 +++++++++++++++++++ > exec.c | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > hw/ide.c | 133 +++++++++++++++++++++++++++++++++++++++++++++++------ > qemu-common.h | 12 +++++ > 7 files changed, 402 insertions(+), 16 deletions(-) > > >