Re: [PATCH v2 08/11] target/openrisc: Enable MTTCG

2022-07-04 Thread Stafford Horne
On Mon, Jul 04, 2022 at 03:37:04PM +0530, Richard Henderson wrote: > On 7/4/22 02:58, Stafford Horne wrote: > > case TO_SPR(10, 1): /* TTCR */ > > -cpu_openrisc_count_update(cpu); > > +if (cpu_openrisc_timer_has_advanced(cpu)) { > > +qemu_mutex_lock_iothread(); > >

Re: [PATCH v2 08/11] target/openrisc: Enable MTTCG

2022-07-04 Thread Richard Henderson
On 7/4/22 02:58, Stafford Horne wrote: case TO_SPR(10, 1): /* TTCR */ -cpu_openrisc_count_update(cpu); +if (cpu_openrisc_timer_has_advanced(cpu)) { +qemu_mutex_lock_iothread(); +cpu_openrisc_count_update(cpu); +qemu_mutex_unlock_iothread()

[PATCH v2 08/11] target/openrisc: Enable MTTCG

2022-07-03 Thread Stafford Horne
This patch enables multithread TCG for OpenRISC. Since the or1k shared syncrhonized timer can be updated from each vCPU via helpers we use a mutex to synchronize updates. Signed-off-by: Stafford Horne --- configs/targets/or1k-softmmu.mak | 1 + hw/openrisc/cputimer.c | 17 +++