On 4/16/20 5:08 AM, Peter Maydell wrote: >> void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len, >> MemTxAttrs attrs, int flags, uintptr_t ra); >> +bool cpu_probe_watchpoint(CPUState *cpu, vaddr addr, vaddr len, int flags); > > Could we have a doc comment for the new function? > >> int cpu_watchpoint_address_matches(CPUState *cpu, vaddr addr, vaddr len);
Hah. In the process of doing that, I notice that cpu_watchpoint_address_matches actually does what I want. I have added documentation for cpu_check_watchpoint and cpu_watchpoint_address_matches and have dropped this new function. > Clearly the insn emulation needs to do the right thing for > guest architectural watchpoints, but should a gdb watchpoint > also affect no-fault-load behaviour? I suppose making them > both behave the same way is probably the least-surprising choice. In both cases we need to interrupt the execution in order to actually honor the watchpoint. So yes, treating them the same seems the only reasonable way. r~