Re: [RFC PATCH 3/3] target/ppc: Implement reservation protection for larx/stcx

2024-02-20 Thread Richard Henderson
On 2/19/24 18:19, Nicholas Piggin wrote: +env->access_type = ACCESS_RES; +host = probe_access(env, addr, size, MMU_DATA_LOAD, mmu_idx, raddr); +if (host) { +cpu_set_llsc_prot(cs, qemu_ram_addr_from_host_nofail(host)); +} else { +/* XXX: fault? */ +g_assert_

[RFC PATCH 3/3] target/ppc: Implement reservation protection for larx/stcx

2024-02-19 Thread Nicholas Piggin
Use the generic llsc protection feature to implement real reservation protection for larx/stcx. This is more complicated and quite a bit slower than the cmpxchg pseudo-reservation, so it's questionable whether it should be merged or ever made the default. It could possibly be sped up more by tuni