From 88807f89d945acad54c8365ff7b6ef0f0d0ddd56 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Wed, 14 Nov 2012 15:15:50 +0100 Subject: dataplane: add virtqueue vring code The virtio-blk-data-plane cannot access memory using the usual QEMU functions since it executes outside the global mutex and the memory APIs are this time are not thread-safe. This patch introduces a virtqueue module based on the kernel's vhost vring code. The trick is that we map guest memory ahead of time and access it cheaply outside the global mutex. Once the hardware emulation code can execute outside the global mutex it will be possible to drop this code. Signed-off-by: Stefan Hajnoczi --- trace-events | 3 +++ 1 file changed, 3 insertions(+) (limited to 'trace-events') diff --git a/trace-events b/trace-events index bb7621eeb6..167d776eff 100644 --- a/trace-events +++ b/trace-events @@ -98,6 +98,9 @@ virtio_blk_rw_complete(void *req, int ret) "req %p ret %d" virtio_blk_handle_write(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu" virtio_blk_handle_read(void *req, uint64_t sector, size_t nsectors) "req %p sector %"PRIu64" nsectors %zu" +# hw/dataplane/vring.c +vring_setup(uint64_t physical, void *desc, void *avail, void *used) "vring physical %#"PRIx64" desc %p avail %p used %p" + # thread-pool.c thread_pool_submit(void *req, void *opaque) "req %p opaque %p" thread_pool_complete(void *req, void *opaque, int ret) "req %p opaque %p ret %d" -- cgit v1.2.3