On Tue, Aug 14, 2018 at 08:31:02 +0200, Paolo Bonzini wrote: > On 14/08/2018 03:38, Emilio G. Cota wrote: > > Needed for MTTCG. > > > > Signed-off-by: Emilio G. Cota <c...@braap.org> > > Why not always use TLS, even in user-mode?
To avoid TLS waste; user-mode uses a single TCGContext, so a single copy of these variables is all that's needed because code generation is serialized with a lock. If in user-mode we just have a few threads it'd be no big deal, but apps can easily spawn thousands of threads. E.