On 11/08/2016 17:24, Alex Bennée wrote:
> tb_lock() has long been used for linux-user mode to protect code
> generation. By enabling it now we prepare for MTTCG and ensure all code
> generation is serialised by this lock. The other major structure that
> needs protecting is the l1_map and its PageDesc structures. For the
> SoftMMU case we also use tb_lock() to protect these structures instead
> of linux-user mmap_lock() which as the name suggests serialises updates
> to the structure as a result of guest mmap operations.
> 
> Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
> 
> ---
> v4
>   - split from main tcg: enable thread-per-vCPU patch

Is it possible to extend this patch so that tb_lock/tb_unlock are no-ops
unless tcg_enabled()?  Maybe even move tb_lock/tb_unlock to tcg/tcg.h as
inlines and only leaving the actual TCG path in translate-all.c...

Thanks,

Paolo

Reply via email to