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

2012-12-17 Thread Stefan Hajnoczi
On Fri, Dec 14, 2012 at 9:34 PM, Blue Swirl wrote: > On Fri, Dec 14, 2012 at 6:00 PM, Stefan Hajnoczi wrote: >> +typedef struct { >> +void *host_addr; >> +hwaddr guest_addr; >> +uint64_t size; >> +bool readonly; >> +} HostmemRegion; > > This should be HostMemRegion. > >> + >> +typ

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

2012-12-14 Thread Blue Swirl
On Fri, Dec 14, 2012 at 6:00 PM, 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 mu

[Qemu-devel] [PATCH v7 03/12] dataplane: add host memory mapping code

2012-12-14 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.