From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOdi8-0005Kh-Qg for qemu-devel@nongnu.org; Sun, 18 Jan 2009 14:53:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOdi6-0005J2-1K for qemu-devel@nongnu.org; Sun, 18 Jan 2009 14:53:32 -0500 Received: from [199.232.76.173] (port=52593 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOdi5-0005Ii-AS for qemu-devel@nongnu.org; Sun, 18 Jan 2009 14:53:29 -0500 Received: from mx2.redhat.com ([66.187.237.31]:57973) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOdi4-0000K0-Di for qemu-devel@nongnu.org; Sun, 18 Jan 2009 14:53:28 -0500 From: Avi Kivity Date: Sun, 18 Jan 2009 21:53:14 +0200 Message-Id: <1232308399-21679-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH 0/5] Direct memory access for devices 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, Anthony Liguori 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. Avi Kivity (5): Add target memory mapping API Add map client retry notification Vectored block device API I/O vector helpers Convert IDE to directly access guest memory block.c | 92 ++++++++++++++++++++++++++++++++++++++++ block.h | 7 +++ cpu-all.h | 8 ++++ exec.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/ide.c | 127 +++++++++++++++++++++++++++++++++++++++++++++++++------ qemu-common.h | 10 ++++ vl.c | 25 +++++++++++ 7 files changed, 386 insertions(+), 14 deletions(-)