Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-18 Thread Stefan Hajnoczi
On Sat, Nov 17, 2012 at 5:15 PM, Blue Swirl wrote: > On Thu, Nov 15, 2012 at 3:19 PM, 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. >>

Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-17 Thread Blue Swirl
On Thu, Nov 15, 2012 at 3:19 PM, 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 ke

Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-16 Thread Stefan Hajnoczi
On Fri, Nov 16, 2012 at 8:48 AM, Christian Borntraeger wrote: > On 15/11/12 16:19, Stefan Hajnoczi wrote: > >> +#include "trace.h" >> +#include "hw/dataplane/vring.h" >> + >> +/* Map target physical address to host address >> + */ >> +static inline void *phys_to_host(Vring *vring, hwaddr phys) >>

Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-15 Thread Christian Borntraeger
On 15/11/12 16:19, Stefan Hajnoczi wrote: > +#include "trace.h" > +#include "hw/dataplane/vring.h" > + > +/* Map target physical address to host address > + */ > +static inline void *phys_to_host(Vring *vring, hwaddr phys) > +{ > +/* Adjust for 3.6-4 GB PCI memory range */ > +if (phys >= 0

Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-15 Thread Stefan Hajnoczi
On Thu, Nov 15, 2012 at 9:09 PM, Anthony Liguori wrote: > Stefan Hajnoczi writes: > >> 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

Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-15 Thread Anthony Liguori
Stefan Hajnoczi writes: > 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

Re: [Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-15 Thread Paolo Bonzini
Il 15/11/2012 16:19, Stefan Hajnoczi ha scritto: > +/* Map target physical address to host address > + */ > +static inline void *phys_to_host(Vring *vring, hwaddr phys) > +{ > +/* Adjust for 3.6-4 GB PCI memory range */ > +if (phys >= 0x1) { > +phys -= 0x1 - 0xe0

[Qemu-devel] [PATCH 3/7] dataplane: add virtqueue vring code

2012-11-15 Thread Stefan Hajnoczi
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 ah