[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 03/16] exec: Add cpu_probe_watchpoint

From: Richard Henderson
Subject: Re: [PATCH 03/16] exec: Add cpu_probe_watchpoint
Date: Fri, 17 Apr 2020 19:14:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]