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();
> >
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()
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 +++