On Mon, Feb 3, 2020 at 8:52 AM Richard Henderson <[email protected]> wrote: > On 2/2/20 3:34 PM, James Clarke wrote: > > From: Alex Richardson <[email protected]> > > > > After 7dd547e5ab6b31e7a0cfc182d3ad131dd55a948f the env->llval value is > > loaded as an unsigned value (instead of sign-extended as before). > > Therefore, the CMPXCHG in gen_st_cond() in translate.c fails if the sign > > bit is set in the loaded value. > > Fix this by sign-extending the llval value for the 32-bit case.
Thanks! This fix the problem I spent my Saturday debugging: https://lists.gnu.org/archive/html/qemu-devel/2020-02/msg00071.html Too bad we crossed by few hours, you'd have saved my Saturday. Thomas, I think this also fixes the problem you reported here: https://www.mail-archive.com/[email protected]/msg676025.html Tested-by: Philippe Mathieu-Daudé <[email protected]> > > > > I discovered this issue because FreeBSD MIPS64 was looping forever in an > > atomic helper function when trying to start /sbin/init. > > > > Signed-off-by: Alex Richardson <[email protected]> > > Fixes: 7dd547e5ab6b ("target/mips: Use cpu_*_mmuidx_ra instead of > > MMU_MODE*_SUFFIX") > > Buglink: https://bugs.launchpad.net/qemu/+bug/1861605 > > Cc: Aurelien Jarno <[email protected]> > > Cc: Aleksandar Markovic <[email protected]> > > Cc: Aleksandar Rikalo <[email protected]> > > Cc: Richard Henderson <[email protected]> > > Signed-off-by: James Clarke <[email protected]> > > --- > > target/mips/op_helper.c | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > My fault. Sorry about that. > > Reviewed-by: Richard Henderson <[email protected]> > > > r~ >
