From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60147) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUHps-0007Gq-KX for qemu-devel@nongnu.org; Thu, 10 Oct 2013 11:07:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VUHpm-0000go-DE for qemu-devel@nongnu.org; Thu, 10 Oct 2013 11:07:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38405) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VUHpm-0000gW-4l for qemu-devel@nongnu.org; Thu, 10 Oct 2013 11:07:26 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r9AF7PUd023587 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 10 Oct 2013 11:07:25 -0400 From: Paolo Bonzini Date: Thu, 10 Oct 2013 17:07:15 +0200 Message-Id: <1381417639-22547-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PATCH 0/4] dataplane: use more of the generic virtio data structures, drop hostmem List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: stefanha@redhat.com Now that the memory API is thread-safe, we can use it in virtio-blk-dataplane and replace hostmem.[ch]. This series does this, and also changes the vring API to use VirtQueueElement (with an eye towards migration). With this change, virtio-blk-dataplane is also safe against memory hot-unplug. The next step would be to replace memory_region_find with address_space_{map,unmap}, which handle dirtying of memory correctly. However these APIs are not thread-safe yet, and neither is the handling of dirty memory (Juan's patches may be a start here). Also, the usage of iov_discard_{front,back} may cause some complication when we use address_space_{map,unmap}. We may have to change a bit the logic in virtio-blk-dataplane to switch to address_space_{map,unmap}. If we do not want to do this intermediate step, the first three patches can be applied separately from the fourth. Paolo Bonzini (4): vring: create a common function to parse descriptors vring: factor common code for error exits dataplane: change vring API to use VirtQueueElement dataplane: replace hostmem with memory_region_find hw/block/dataplane/virtio-blk.c | 86 +++++------- hw/virtio/dataplane/Makefile.objs | 2 +- hw/virtio/dataplane/hostmem.c | 183 ------------------------- hw/virtio/dataplane/vring.c | 244 +++++++++++++++++++++------------- include/hw/virtio/dataplane/hostmem.h | 58 -------- include/hw/virtio/dataplane/vring.h | 9 +- 6 files changed, 193 insertions(+), 389 deletions(-) delete mode 100644 hw/virtio/dataplane/hostmem.c delete mode 100644 include/hw/virtio/dataplane/hostmem.h -- 1.8.3.1