Re: [Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api

2013-04-12 Thread Stefan Hajnoczi
On Fri, Apr 12, 2013 at 12:49:45PM +0800, liu ping fan wrote: > On Thu, Apr 11, 2013 at 6:15 PM, Stefan Hajnoczi wrote: > > On Mon, Apr 01, 2013 at 04:20:32PM +0800, Liu Ping Fan wrote: > >> @@ -51,7 +50,7 @@ bool vring_setup(Vring *vring, VirtIODevice *vdev, int n) > >> > >> void vring_teardown(

Re: [Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api

2013-04-11 Thread liu ping fan
On Thu, Apr 11, 2013 at 6:15 PM, Stefan Hajnoczi wrote: > On Mon, Apr 01, 2013 at 04:20:32PM +0800, Liu Ping Fan wrote: >> @@ -51,7 +50,7 @@ bool vring_setup(Vring *vring, VirtIODevice *vdev, int n) >> >> void vring_teardown(Vring *vring) >> { >> -hostmem_finalize(&vring->hostmem); >> +m

Re: [Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api

2013-04-11 Thread Stefan Hajnoczi
On Mon, Apr 01, 2013 at 04:20:32PM +0800, Liu Ping Fan wrote: > @@ -51,7 +50,7 @@ bool vring_setup(Vring *vring, VirtIODevice *vdev, int n) > > void vring_teardown(Vring *vring) > { > -hostmem_finalize(&vring->hostmem); > +memory_region_unref(vring->vring_mr); > } dataplane keeps a re

[Qemu-devel] [PATCH 3/5] vring: use hostmem's RAM safe api

2013-04-01 Thread Liu Ping Fan
From: Liu Ping Fan When lookup gpa to hva, the corresponding MemoryRegion will be exposed to caller, and will release by caller later Signed-off-by: Liu Ping Fan --- hw/dataplane/vring.c | 88 ++ hw/dataplane/vring.h |5 ++- include/qem