Re: [Qemu-devel] [PATCH v5 03/11] dataplane: add host memory mapping code

2012-12-09 Thread Stefan Hajnoczi
On Sun, Dec 09, 2012 at 12:02:52PM +0800, liu ping fan wrote: > On Thu, Dec 6, 2012 at 4:47 AM, Stefan Hajnoczi wrote: > > +void hostmem_init(Hostmem *hostmem) > > +{ > > +memset(hostmem, 0, sizeof(*hostmem)); > > + > > +hostmem->listener = (MemoryListener){ > > +.begin = hostmem_l

Re: [Qemu-devel] [PATCH v5 03/11] dataplane: add host memory mapping code

2012-12-08 Thread liu ping fan
On Thu, Dec 6, 2012 at 4:47 AM, Stefan Hajnoczi wrote: > The data plane thread needs to map guest physical addresses to host > pointers. Normally this is done with cpu_physical_memory_map() but the > function assumes the global mutex is held. The data plane thread does > not touch the global mut

[Qemu-devel] [PATCH v5 03/11] dataplane: add host memory mapping code

2012-12-05 Thread Stefan Hajnoczi
The data plane thread needs to map guest physical addresses to host pointers. Normally this is done with cpu_physical_memory_map() but the function assumes the global mutex is held. The data plane thread does not touch the global mutex and therefore needs a thread-safe memory mapping mechanism.