On 08/11/2016 08:24 AM, Alex Bennée wrote:
> + * Since QEMU doesn't currently implement a global/not-global flag
> + * for tlb entries, at the moment tlb_flush() will also flush all
> + * tlb entries in the flush_global == false case. This is OK because
> + * CPU architectures generally permit an i
On 11/08/2016 17:24, Alex Bennée wrote:
> +if (cpu->created && !qemu_cpu_is_self(cpu)) {
Is the cpu->created necessary? It may introduce some potential races
and doesn't really add much.
> +if (atomic_bool_cmpxchg(&cpu->pending_tlb_flush, false, true)) {
This is slightly cheaper:
From: KONRAD Frederic
Some architectures allow to flush the tlb of other VCPUs. This is not a problem
when we have only one thread for all VCPUs but it definitely needs to be an
asynchronous work when we are in true multithreaded work.
This patch doesn't do anything to protect other cputlb funct