Re: [PATCH v2] target/riscv: Call probe_write() before atomic operations

2022-04-01 Thread Richard Henderson
On 3/31/22 19:49, Alistair Francis wrote: +void helper_atomic_check(CPURISCVState *env, target_ulong address, + int mmu_idx) +{ +#ifndef CONFIG_USER_ONLY +void *phost; +int ret = probe_access_flags(env, address, MMU_DATA_STORE, mmu_idx, false, +

[PATCH v2] target/riscv: Call probe_write() before atomic operations

2022-03-31 Thread Alistair Francis
From: Alistair Francis If an atomic operation fails on RISC-V we want to generate a store/amo fault and not a load fault. Currently if we have no permissions to access the memory location the atomic operation will sometimes fail with a load fault (depending on the path taken in tcg/tcg-op.c) as