Re: hexagon: modeling a shared lock state

2024-01-26 Thread Richard Henderson
On 1/26/24 02:28, Brian Cain wrote: static void do_hwlock(CPUHexagonState *env, bool *lock) { bql_lock(); if (*lock) { env->hwlock_pending = true; cs->halted = true; cs->exception_index = EXCP_HALTED; bql_unlock(); cpu_loop_exit(cs);

RE: hexagon: modeling a shared lock state

2024-01-25 Thread Brian Cain
> -Original Message- > From: Richard Henderson > Sent: Wednesday, January 24, 2024 6:22 PM > To: Brian Cain ; Philippe Mathieu-Daudé > > Cc: qemu-devel@nongnu.org; Sid Manning ; Marco > Liebel ; Matheus Bernardino > > Subject: Re: hexagon: modeling a sha

Re: hexagon: modeling a shared lock state

2024-01-24 Thread Richard Henderson
On 1/25/24 01:07, Brian Cain wrote: Philippe, For hexagon sysemu, while internally reviewing patches to be upstreamed we noticed that our design for a lock instruction is not quite suitable.  The k0lock instruction will halt if some other hexagon hardware CPU has already claimed the kernel

hexagon: modeling a shared lock state

2024-01-24 Thread Brian Cain
Philippe, For hexagon sysemu, while internally reviewing patches to be upstreamed we noticed that our design for a lock instruction is not quite suitable. The k0lock instruction will halt if some other hexagon hardware CPU has already claimed the kernel lock, only to continue executing once