Hi Phil, I've been staring myself blind trying to deal with qemu_tcg_mttcg_enabled()/icount_enabled() and I'm wondering if you have an ideas.
I'm leaning towards moving these globals to some TCG accelerator specific state (TCGState?) that's initialized once we know how many/what cpus are in the system. The problem is then making sure all uses have access to this state. For qemu_tcg_mttcg_enabled() there is one trickier use in tcg_region_init(). We probably need to delay the initialization of the tcg region until we know the cpus in the system, this is getting close to the configuration/initialization order issues we've discussed previously so I'm not sure how easy this would be. As for icount_enabled(), I'm not entirely sure yet, its uses are a lot more scattered throughout the codebase and I'm still going through them. Cheers, -- Anton Johansson rev.ng Labs Srl.