This version fixes the return value `old_pte` not correctly handled in my previous patch.
This patch refers to common usages of qatomic_cmpxchg like those in target/i386/tcg/system/excp_helper.c and target/arm/ptw.c. I also add a brief explanation of the correctness in the commit message. Thanks Philippe Mathieu-Daudé for offering previous review for my previous patch! Ziqiao Kong (1): target/riscv: fix endless translation loop on big endian systems target/riscv/cpu_helper.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.34.1