> On 11 Feb 2015, at 04:33, Alex Bennée <alex.ben...@linaro.org> wrote: > > > Frederic Konrad <fred.kon...@greensocs.com> writes: > >> 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? > > Does this imply deferring the work? Surely if we don't flush when > instructed things could break down very quickly? >
thats exactly the question. Cheers Mark. > > >> >> Thanks, >> Fred > > -- > Alex Bennée +44 (0)20 7100 3485 x 210 +33 (0)5 33 52 01 77x 210 +33 (0)603762104 mark.burton