On Sun, Aug 21, 2016 at 02:15:31PM +0200, Lluís Vilanova wrote: > > Can this approach be made thread-safe? > > > If not then it would be good to consider the problem right away and > > switch to something that is thread-safe, even if it depends on the > > target architecture. > > Kind of. The easiest solution is to have each thread have an mmap of its own of > the device (and moving qemu_control_{0,1} into CPUState). This would be > completely explicit and easy to understand. Yes. I don't know if the TCG and -user folks will accept the SIGSEGV approach, but I'd be okay with it if the multi-threading issue is solved by 1 device per thread. Stefan