Re: [Qemu-devel] [PATCH v2 5/6] Vring: use hostmem's RAM safe api

2013-05-05 Thread liu ping fan
On Fri, May 3, 2013 at 6:02 PM, Stefan Hajnoczi wrote: > On Fri, May 03, 2013 at 10:45:21AM +0800, Liu Ping Fan wrote: >> @@ -109,11 +110,14 @@ bool vring_should_notify(VirtIODevice *vdev, Vring >> *vring) >> static int get_indirect(Vring *vring, >> struct iovec iov[], s

Re: [Qemu-devel] [PATCH v2 5/6] Vring: use hostmem's RAM safe api

2013-05-03 Thread Stefan Hajnoczi
On Fri, May 03, 2013 at 10:45:21AM +0800, Liu Ping Fan wrote: > @@ -109,11 +110,14 @@ bool vring_should_notify(VirtIODevice *vdev, Vring > *vring) > static int get_indirect(Vring *vring, > struct iovec iov[], struct iovec *iov_end, > unsigned int

[Qemu-devel] [PATCH v2 5/6] Vring: use hostmem's RAM safe api

2013-05-02 Thread Liu Ping Fan
From: Liu Ping Fan Before mm-ops done, we should gurantee the validaion of regions which is used by Vring self and the chunck pointed by vring desc. We acheive this goal by inc refcnt of RAM-Device. When finished, we dec this cnt through the interface of MemoryRegion. Signed-off-by: Liu Ping Fan