On 11/08/2015 15:59, Frederic Konrad wrote: >> - tb_lock usage in tb_find_fast is complicated and introduces the need >> for other complicated code such as the tb_invalidate callback. Instead, >> the tb locking should reuse the cpu-exec.c code for user-mode emulation, >> with additional locking in the spots identified by Fred. > > The reason for this is that locking around tb_find_fast just kills the > performance.
Let's make it correct first. :) >> - the whole signal-based qemu_cpu_kick can just go away. Just setting >> tcg_exit_req and exit_request will kick the TCG thread. The hairy Win32 >> SuspendThread/ResumeThread goes away too. I suggest doing it now, >> because proving it unnecessary is easier than proving it correct. > > Just setting tcg_exit_req and exit_request and signal the cpu->halt_cond > I guess? Yes. >> - the big QEMU lock is not taken anywhere for MMIO accesses that require >> it (i.e. basically all of them) > Isn't that handled by prepare_mmio_access? That's not used on the TCG path (which calls memory_region_dispatch_read/write directly). Paolo