Re: [Qemu-devel] [PATCH v3 10/24] RISC-V: Hold rcu_read_lock when accessing memory

2018-03-21 Thread Peter Maydell
On 21 March 2018 at 13:55, Paolo Bonzini wrote: > On 19/03/2018 22:07, Michael Clark wrote: >> We need to use atomic_cmpxchg >> in the PTE update to detect the case where the PTE has changed between >> reading it and updating the accessed dirty bits. > > Yes, this makes

Re: [Qemu-devel] [PATCH v3 10/24] RISC-V: Hold rcu_read_lock when accessing memory

2018-03-21 Thread Paolo Bonzini
On 19/03/2018 22:07, Michael Clark wrote: > > > On Mon, Mar 19, 2018 at 2:41 AM, Paolo Bonzini > wrote: > > On 16/03/2018 20:41, Michael Clark wrote: > > From reading other code that accesses memory regions directly, > > it appears

Re: [Qemu-devel] [PATCH v3 10/24] RISC-V: Hold rcu_read_lock when accessing memory

2018-03-19 Thread Michael Clark
On Mon, Mar 19, 2018 at 2:41 AM, Paolo Bonzini wrote: > On 16/03/2018 20:41, Michael Clark wrote: > > From reading other code that accesses memory regions directly, > > it appears that the rcu_read_lock needs to be held. Note: the > > original code for accessing RAM directly

Re: [Qemu-devel] [PATCH v3 10/24] RISC-V: Hold rcu_read_lock when accessing memory

2018-03-19 Thread Paolo Bonzini
On 16/03/2018 20:41, Michael Clark wrote: > From reading other code that accesses memory regions directly, > it appears that the rcu_read_lock needs to be held. Note: the > original code for accessing RAM directly was added because > there is no other way to use atomic_cmpxchg on guest physical >

[Qemu-devel] [PATCH v3 10/24] RISC-V: Hold rcu_read_lock when accessing memory

2018-03-16 Thread Michael Clark
>From reading other code that accesses memory regions directly, it appears that the rcu_read_lock needs to be held. Note: the original code for accessing RAM directly was added because there is no other way to use atomic_cmpxchg on guest physical address space. Cc: Sagar Karandikar