From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: Alexander Bulekov <alxndr@bu.edu>,
Paolo Bonzini <pbonzini@redhat.com>,
qemu-devel@nongnu.org, Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH v2] exec: flush the whole TLB if a watchpoint crosses a page boundary
Date: Fri, 05 Jun 2020 17:27:39 +0100 [thread overview]
Message-ID: <875zc54gw4.fsf@linaro.org> (raw)
In-Reply-To: <1bf57207-43c7-cfce-7c38-b0b6bea7b74b@redhat.com>
Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> On 6/3/20 2:46 PM, Philippe Mathieu-Daudé wrote:
>> On 6/3/20 1:24 PM, Alex Bennée wrote:
>>> There is no particular reason why you can't have a watchpoint in TCG
>>> that covers a large chunk of the address space. We could be clever
>>> about it but these cases are pretty rare and we can assume the user
>>> will expect a little performance degradation.
>>>
>>> NB: In my testing gdb will silently squash a watchpoint like:
>>>
>>> watch (char[0x7fffffffff]) *0x0
>>>
>>> to a 4 byte watchpoint. Practically it will limit the maximum size
>>> based on max-value-size. However given enough of a tweak the sky is
>>> the limit.
>>>
>>> Reported-by: Alexander Bulekov <alxndr@bu.edu>
>>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>>>
>>> ---
>>> v2
>>> - use cleaner in_page = -(addr | TARGET_PAGE_MASK) logic per rth
>>
>> Can we have a macro for this?
>> Maybe QEMU_IN_PAGE_OFFSET(addr, TARGET_PAGE_MASK)?
>> or QEMU_OFFSET_IN_PAGE()...
>
> As this is queued, I suppose the implicit answer is "no."
Richard took it into tcg/next as is. I think having a macro may well be
nice clean-up but I struggled to pick a good include location so left it
for a future clean-up series ;-)
--
Alex Bennée
next prev parent reply other threads:[~2020-06-05 16:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 11:24 [PATCH v2] exec: flush the whole TLB if a watchpoint crosses a page boundary Alex Bennée
2020-06-03 12:46 ` Philippe Mathieu-Daudé
2020-06-05 16:11 ` Philippe Mathieu-Daudé
2020-06-05 16:27 ` Alex Bennée [this message]
2020-06-03 16:12 ` 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=875zc54gw4.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=alxndr@bu.edu \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.