On 01/16/2015 09:19 AM, fred.kon...@greensocs.com wrote: > @@ -759,7 +760,9 @@ static void page_flush_tb_1(int level, void **lp) > PageDesc *pd = *lp; > > for (i = 0; i < V_L2_SIZE; ++i) { > - pd[i].first_tb = NULL; > + for (j = 0; j < MAX_CPUS; j++) { > + pd[i].first_tb[j] = NULL; > + } > invalidate_page_bitmap(pd + i); > } > } else {
Surely you've got to do some locking somewhere in order to be able to modify another thread's cpu tb list. I realize that we do have to solve this problem for x86, but for most other targets we ought, in principal, be able to avoid it. Which simply requires that we not treat icache flushes as nops. When the kernel has modified a page, like so, it will also have notified the other cpus that like so, if (smp_call_function(ipi_flush_icache_page, mm, 1)) { We ought to be able to leverage this to avoid some locking at the qemu level. r~