From: Sergey Fedorov <serge.fdrv@gmail.com>
To: Richard Henderson <rth@twiddle.net>,
Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] target-*: Advance pc after recognizing a breakpoint
Date: Fri, 16 Oct 2015 21:03:04 +0300 [thread overview]
Message-ID: <56213BD8.1070202@gmail.com> (raw)
In-Reply-To: <5621277D.1000303@gmail.com>
On 16.10.2015 19:36, Sergey Fedorov wrote:
> On 16.10.2015 17:08, Sergey Fedorov wrote:
>> On 16.10.2015 04:14, Richard Henderson wrote:
>>> On 10/16/2015 03:36 AM, Peter Maydell wrote:
>>>> On 14 October 2015 at 22:02, Richard Henderson <rth@twiddle.net> wrote:
>>>>> On 10/15/2015 06:34 AM, Peter Maydell wrote:
>>>>>> This is still the same cryptic comment we have in the
>>>>>> targets which do do this. Can we have something
>>>>>> that is a bit more explanatory about what is going on and
>>>>>> why we need to do this, please?
>>>>> Suggestions?
>>>> ...well, I don't entirely understand the problem it's
>>>> fixing, which is why I'm asking for a better comment :-)
>>> Heh. Fair enough. How about
>>>
>>> /* The address covered by the breakpoint must be included in
>>> [tb->pc, tb->pc + tb->size) in order to for it to be
>>> properly cleared -- thus we increment the PC here so that
>>> the logic setting tb->size below does the right thing. */
>>>
>>> There are two edge cases that cause the problem with clearing that
>>> could be described, but I think that the comment becomes too bulky, as
>>> well as confuses the situation for someone cutting-and-pasting the
>>> logic to a new port.
>> Maybe we could rather fix that condition in
>> tb_invalidate_phys_page_range()? It seems weird that it can't handle a
>> zero-sized TB.
> I think extending "!(tb_end <= start || tb_start >= end)" condition to
> "!(tb_end <= start || tb_start >= end) || tb_start == start" would work
> fine. Thoughts? I could prepare a patch for that.
But there are at least two other places which doesn't seem to support a
zero-sized TB: build_page_bitmap(), and tb_gen_code() when checking if a
next page is needed.
Best,
Sergey
next prev parent reply other threads:[~2015-10-16 18:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 22:10 [Qemu-devel] [PATCH] target-*: Advance pc after recognizing a breakpoint Richard Henderson
2015-10-14 9:04 ` Sergey Fedorov
2015-10-14 19:34 ` Peter Maydell
2015-10-14 21:02 ` Richard Henderson
2015-10-15 16:36 ` Peter Maydell
2015-10-16 1:14 ` Richard Henderson
2015-10-16 7:33 ` Peter Maydell
2015-10-16 14:08 ` Sergey Fedorov
2015-10-16 16:36 ` Sergey Fedorov
2015-10-16 18:03 ` Sergey Fedorov [this message]
2015-10-18 22:46 ` Richard Henderson
2015-10-19 11:04 ` Sergey Fedorov
2015-10-19 17:04 ` Richard Henderson
2015-10-19 17:26 ` Sergey Fedorov
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=56213BD8.1070202@gmail.com \
--to=serge.fdrv@gmail.com \
--cc=peter.maydell@linaro.org \
--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 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).