From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Richard Henderson <richard.henderson@linaro.org>, qemu-devel@nongnu.org
Cc: david@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2 2/8] exec: Factor out core logic of check_watchpoint()
Date: Fri, 30 Aug 2019 19:52:25 +0200 [thread overview]
Message-ID: <5592f142-429e-5f22-fda4-3f16c3493b90@redhat.com> (raw)
In-Reply-To: <50debd18-518a-ab16-2084-8848bd5f39e7@linaro.org>
On 8/30/19 3:21 AM, Richard Henderson wrote:
> On 8/29/19 10:26 AM, Philippe Mathieu-Daudé wrote:
>>> - wp->hitaddr = vaddr;
>>> + wp->hitaddr = MAX(addr, wp->vaddr);
>>
>> When is addr > wp->vaddr?
>
> Both the watchpoint and the access are arbitrary ranges.
>
> wp: [ 1000 - 1008 ]
> store: [ 1002 - 1004 ]
>
> wp: [ 1004 - 1008 ]
> store: [ 1000 - 1008 ]
>
> The old code would, for the first case, return 1002 and not the 1000 of the
> watch point, which seems reasonable. For the second case, we would set 1000,
> an address outside of the watchpoint.
>
> David's change makes sure that the address signaled is inside the watchpoint.
> I.e. leaving the first case unchanged and making the second set 1004.
>
> It seems very reasonable to me.
Thanks for the very clear explanation :)
If you have time, few lines of comment around would be very appreciated...
Now that it is clearer:
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Regards,
Phil.
next prev parent reply other threads:[~2019-08-30 17:57 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-28 23:16 [Qemu-devel] [PATCH v2 0/8] exec: Cleanup watchpoints Richard Henderson
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 1/8] exec: Move user-only watchpoint stubs inline Richard Henderson
2019-08-29 16:58 ` Philippe Mathieu-Daudé
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 2/8] exec: Factor out core logic of check_watchpoint() Richard Henderson
2019-08-29 17:26 ` Philippe Mathieu-Daudé
2019-08-30 1:21 ` Richard Henderson
2019-08-30 17:52 ` Philippe Mathieu-Daudé [this message]
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 3/8] cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK Richard Henderson
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 4/8] exec: Factor out cpu_watchpoint_address_matches Richard Henderson
2019-08-29 17:20 ` Philippe Mathieu-Daudé
2019-08-30 1:32 ` Richard Henderson
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 5/8] cputlb: Fix size operand for tlb_fill on unaligned store Richard Henderson
2019-08-29 6:57 ` David Hildenbrand
2019-08-29 16:59 ` Philippe Mathieu-Daudé
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 6/8] cputlb: Remove double-alignment in store_helper Richard Henderson
2019-08-29 6:57 ` David Hildenbrand
2019-08-29 17:00 ` Philippe Mathieu-Daudé
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 7/8] cputlb: Handle watchpoints via TLB_WATCHPOINT Richard Henderson
2019-08-29 6:57 ` David Hildenbrand
2019-08-29 17:15 ` Philippe Mathieu-Daudé
2019-08-28 23:16 ` [Qemu-devel] [PATCH v2 8/8] tcg: Check for watchpoints in probe_write() Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5592f142-429e-5f22-fda4-3f16c3493b90@redhat.com \
--to=philmd@redhat.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).