Re: [Qemu-devel] [RFC 2/7] exec: keep CPUWatchpoint references internal

2016-06-17 Thread Paolo Bonzini
On 17/06/2016 18:33, Alex Bennée wrote: > +wp = g_array_index(cpu->watchpoints, CPUWatchpoint *, index); Worth adding macros or inline functions cpu_breakpoint_at(cpu, index) and cpu_watchpoint_at(cpu, index)? This will also be less churn in patch 4, because the macros will always return CP

[Qemu-devel] [RFC 2/7] exec: keep CPUWatchpoint references internal

2016-06-17 Thread Alex Bennée
In preparation for the conversion to an RCU controlled list of watchpoints I've removed all $ARCH local copies of the watchpoint structures. They can be accessed with cpu_watchpoint_get_by_ref() which will eventually offer them for the lifetime of the rcu_read_lock(). Instead of using pointers as