On 28/08/2015 16:56, Peter Maydell wrote: > What's the rationale for this? Mostly we prefer not to > add ifdefs in code if we can get away with compiling it for > both cases, even if the resulting code isn't used.
True. The rationale is three-fold: 1) It makes sense to abort if TB_EXIT_ICOUNT_EXPIRED is returned from user-mode emulation TCG code. Then you need to either leave the unreachable code after abort() or #ifdef cpu_exec_nocache out. 2) Dually, cpu_exec_nocache's future locking requirements (take tb_lock, mostly) are not yet respected as of this patch. Marking the function as #ifdef CONFIG_SOFTMMU explains why. Once you do that, you have to abort() either in cpu_exec_nocache or in the caller. Reason (2) is stronger for me. You mentioned a few times your hope that MTTCG would lead to more correct and more documented thread support in user-mode emulation, and I think this patch does improve the documentation slightly. Paolo