From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHIn9-0002Ul-Ir for qemu-devel@nongnu.org; Tue, 03 May 2011 12:49:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHIn8-0008O8-JP for qemu-devel@nongnu.org; Tue, 03 May 2011 12:49:43 -0400 Received: from mail-ww0-f53.google.com ([74.125.82.53]:39017) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHIn8-0008Nw-DC for qemu-devel@nongnu.org; Tue, 03 May 2011 12:49:42 -0400 Received: by wwj40 with SMTP id 40so288615wwj.10 for ; Tue, 03 May 2011 09:49:41 -0700 (PDT) Sender: Paolo Bonzini From: Paolo Bonzini Date: Tue, 3 May 2011 18:49:30 +0200 Message-Id: <1304441374-27314-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] introduce cpu_physical_memory_map_fast List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Paravirtualized devices (and also some real devices) can assume they are going to access RAM. For this reason, provide a fast-path function with the following properties: 1) it will never allocate a bounce buffer 2) it can be used for read-modify-write operations 3) unlike qemu_get_ram_ptr, it is safe because it recognizes "short" blocks Patches 3 and 4 use this function for virtio devices and the milkymist GPU. The latter is only compile-tested. Another function checks if it is possible to split a contiguous physical address range into multiple subranges, all of which use the fast path. I will introduce later a use for this function. Paolo Bonzini (4): exec: extract cpu_physical_memory_map_internal exec: introduce cpu_physical_memory_map_fast and cpu_physical_memory_map_check virtio: use cpu_physical_memory_map_fast milkymist: use cpu_physical_memory_map_fast cpu-common.h | 4 ++ exec.c | 108 +++++++++++++++++++++++++++++++++++++------------- hw/milkymist-tmu2.c | 39 ++++++++++-------- hw/vhost.c | 10 ++-- hw/virtio.c | 2 +- 5 files changed, 111 insertions(+), 52 deletions(-) -- 1.7.4.4