qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sergey Fedorov <serge.fdrv@gmail.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU breakpoint handling
Date: Mon, 12 Oct 2015 15:41:09 +0300	[thread overview]
Message-ID: <561BAA65.8030907@gmail.com> (raw)
In-Reply-To: <CAFEAcA_DYm+Jz8tEbNmz6u+oZQhZ1vybOjXsEgBTsf8geT7UOQ@mail.gmail.com>

On 08.10.2015 21:40, Peter Maydell wrote:
> Annoying corner case which I don't think we need to handle necessarily:
> if you set a breakpoint on a 32-bit Thumb instruction which spans a page
> boundary, and the second page is not present, we will end up taking the
> page fault when I think we should take the breakpoint. I can't think
> of a way to get that right, so just commenting that it isn't handled
> right would do.

What I found in ARM ARMv8 (DDI0487A_g) section G2.9.1 About Breakpoint
exceptions:

For each instruction in the program flow, all of the breakpoints are
tested. When a breakpoint is tested, it generates
a Breakpoint debug event if all of the following are true:
• The breakpoint is enabled. That is, the breakpoint enable control for
it, DBGBCR<n>.E, is 1.
• The conditions specified in the DBGBCR<n> are met.
• The comparisons with the values held in one or both of the DBGBVR<n>
and DBGBXVR<n>, as applicable,
are successful.
• If the breakpoint is linked to another breakpoint, the comparisons
made by that other breakpoint are also
successful.
• The instruction is committed for execution.

If I understand correctly, the last item in the list specifies that any
page fault exception which would occur in the normal instruction
execution has more priority than the breakpoint exception. If so,
Everything should be okay.

Best regards,
Sergey

  parent reply	other threads:[~2015-10-12 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28 10:07 [Qemu-devel] [PATCH v2 0/2] target-arm: Fix breakpoint handling Sergey Fedorov
2015-09-28 10:07 ` [Qemu-devel] [PATCH v2 1/2] target-arm: Fix GDB " Sergey Fedorov
2015-10-08 18:20   ` Peter Maydell
2015-09-28 10:07 ` [Qemu-devel] [PATCH v2 2/2] target-arm: Fix CPU " Sergey Fedorov
2015-10-08 18:40   ` Peter Maydell
2015-10-09 13:53     ` Sergey Fedorov
2015-10-09 14:00       ` Peter Maydell
2015-10-09 14:03         ` Sergey Fedorov
2015-10-09 13:59     ` Sergey Fedorov
2015-10-09 14:04       ` Peter Maydell
2015-10-09 15:55         ` Sergey Fedorov
2015-10-09 15:59           ` Peter Maydell
2015-10-09 16:31         ` Sergey Fedorov
2015-10-12 12:41     ` Sergey Fedorov [this message]
2015-10-12 13:22       ` Peter Maydell

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=561BAA65.8030907@gmail.com \
    --to=serge.fdrv@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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).