Re: [Qemu-devel] [PATCH 1/3] memory_ldst: Add atomic ops for PTE updates

2018-12-13 Thread Benjamin Herrenschmidt
On Thu, 2018-12-13 at 21:01 -0600, Richard Henderson wrote: > On 12/13/18 5:58 PM, Benjamin Herrenschmidt wrote: > > +#ifdef CONFIG_ATOMIC64 > > +/* This is meant to be used for atomic PTE updates under MT-TCG */ > > +uint32_t glue(address_space_cmpxchgq_notdirty, SUFFIX)(ARG1_DECL, > > +

Re: [Qemu-devel] [PATCH 1/3] memory_ldst: Add atomic ops for PTE updates

2018-12-13 Thread Richard Henderson
On 12/13/18 5:58 PM, Benjamin Herrenschmidt wrote: > +#ifdef CONFIG_ATOMIC64 > +/* This is meant to be used for atomic PTE updates under MT-TCG */ > +uint32_t glue(address_space_cmpxchgq_notdirty, SUFFIX)(ARG1_DECL, > +hwaddr addr, uint64_t old, uint64_t new, MemTxAttrs attrs, MemTxResult >

[Qemu-devel] [PATCH 1/3] memory_ldst: Add atomic ops for PTE updates

2018-12-13 Thread Benjamin Herrenschmidt
On some architectures, PTE updates for dirty and changed bits need to be performed atomically. This adds a couple of address_space_cmpxchg* helpers for that purpose. Signed-off-by: Benjamin Herrenschmidt --- include/exec/memory_ldst.inc.h | 6 +++ memory_ldst.inc.c | 78