On Thu, Dec 06, 2012 at 01:22:29PM +0200, Michael S. Tsirkin wrote: > On Wed, Dec 05, 2012 at 09:47:03PM +0100, Stefan Hajnoczi wrote: > > 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. > > Question: can virtio.c be reworked to use vring.c instead? > The cost of keeping an extra memory listener around seems negligeable. > The only issue I see is around dirty tracking for used ring writes. > Maybe we could add a callback for this?
virtio.c and dataplane/vring.c will be unified but I think it's beyond the scope of this series. This is the thread-safe memory API refactoring we discussed. Stefan