qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] CPU TLB flush with multithread TCG.


From: Frederic Konrad
Subject: [Qemu-devel] CPU TLB flush with multithread TCG.
Date: Mon, 09 Feb 2015 11:02:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0

Hi everybody,

In multithread tlb_flush is broken as CPUA can flush an other CPUB and CPUB can be
executing code, and fixing this can be quite hard:
  * We need to exit the CPU which is flushed.
  * Makes sure the CPU is stopped.
  * Then we can flush tlb.
The big issues are:
  * Two threads can be doing a flush at the same time.
  * Something can restart the CPU during the flush.

A better idea I think is that instead of flushing tlb we can put a flag in CPUState such
as flush_request and ask the cpu to exit.
Then later once the CPU is exited we can flush tlbs if flush_request is set.
It will ensure that the CPU won't execute code as it's associated thread will be
flushing.

Can this work?

Thanks,
Fred



reply via email to

[Prev in Thread] Current Thread [Next in Thread]