[Qemu-devel] [PATCH 0/6] exec: Cleanup watchpoints

Richard Henderson posted 6 patches 4 years, 7 months ago
Failed in applying to current master (apply log)
There is a newer version of this series
include/exec/cpu-all.h |   8 +-
include/hw/core/cpu.h  |  37 +++++++++
accel/tcg/cputlb.c     | 156 ++++++++++++++++++++++++--------------
exec.c                 | 167 +++++++++--------------------------------
4 files changed, 173 insertions(+), 195 deletions(-)
[Qemu-devel] [PATCH 0/6] exec: Cleanup watchpoints
Posted by Richard Henderson 4 years, 7 months ago
As discussed with David earlier this week, the current implementation
of watchpoints cannot work, at least reliably.  We are raising an
exception out of the middle of the i/o access path which does not
even attempt to unwind the guest cpu state, nor does it have the
information required to do so.

This moves the implementation to the cputlb helpers.  This is a point
at which we can and do raise exceptions properly.

In addition, this fixes a bug in that unaligned stores were detecting
watchpoints in the middle of the byte-by-byte operation, which means
that we didn't signal the watchpoint early enough to avoid state change.


r~


David Hildenbrand (2):
  exec: Factor out core logic of check_watchpoint()
  tcg: Check for watchpoints in probe_write()

Richard Henderson (4):
  exec: Move user-only watchpoint stubs inline
  cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK
  exec: Factor out cpu_watchpoint_address_matches
  cputlb: Handle watchpoints via TLB_WATCHPOINT

 include/exec/cpu-all.h |   8 +-
 include/hw/core/cpu.h  |  37 +++++++++
 accel/tcg/cputlb.c     | 156 ++++++++++++++++++++++++--------------
 exec.c                 | 167 +++++++++--------------------------------
 4 files changed, 173 insertions(+), 195 deletions(-)

-- 
2.17.1


Re: [Qemu-devel] [PATCH 0/6] exec: Cleanup watchpoints
Posted by Richard Henderson 4 years, 7 months ago
Ping for 5/6, as yet unreviewed.


r~

On 8/24/19 2:34 PM, Richard Henderson wrote:
> As discussed with David earlier this week, the current implementation
> of watchpoints cannot work, at least reliably.  We are raising an
> exception out of the middle of the i/o access path which does not
> even attempt to unwind the guest cpu state, nor does it have the
> information required to do so.
> 
> This moves the implementation to the cputlb helpers.  This is a point
> at which we can and do raise exceptions properly.
> 
> In addition, this fixes a bug in that unaligned stores were detecting
> watchpoints in the middle of the byte-by-byte operation, which means
> that we didn't signal the watchpoint early enough to avoid state change.
> 
> 
> r~
> 
> 
> David Hildenbrand (2):
>   exec: Factor out core logic of check_watchpoint()
>   tcg: Check for watchpoints in probe_write()
> 
> Richard Henderson (4):
>   exec: Move user-only watchpoint stubs inline
>   cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK
>   exec: Factor out cpu_watchpoint_address_matches
>   cputlb: Handle watchpoints via TLB_WATCHPOINT
> 
>  include/exec/cpu-all.h |   8 +-
>  include/hw/core/cpu.h  |  37 +++++++++
>  accel/tcg/cputlb.c     | 156 ++++++++++++++++++++++++--------------
>  exec.c                 | 167 +++++++++--------------------------------
>  4 files changed, 173 insertions(+), 195 deletions(-)
>