From: Changbin Du <changbin.du@gmail.com>
To: Richard Henderson <richard.henderson@linaro.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
qemu-stable@nongnu.org, qemu-devel@nongnu.org,
Changbin Du <changbin.du@gmail.com>
Subject: Re: [PATCH] tcg: gdbstub: Fix missing breakpoint issue
Date: Thu, 6 Feb 2020 02:33:06 +0000 [thread overview]
Message-ID: <20200206023305.dp47phjlyqhxxix3@mail.google.com> (raw)
In-Reply-To: <1c765091-54dc-1ea5-ef25-ec4786506fb4@linaro.org>
On Wed, Feb 05, 2020 at 11:03:23AM +0000, Richard Henderson wrote:
> On 1/24/20 2:17 AM, Changbin Du wrote:
> > When inserting breakpoints, we need to invalidate related TBs to apply
> > helper call. This is done by breakpoint_invalidate(). But many users
> > found the BPs sometimes never hit.
> >
> > In system mode emulation, the BPs are global in guest but not particular
> > address space. The issue is that the current implementation only trys to
> > invalidate TB of paddr corresponding to the target vaddr in current MMU
> > context. Then some cached TBs continue running without BPs applied.
> >
> > To fix this issue, we can just invalidate all TBs as what step mode does.
> > (For old version users, issuing a step command can workaround this problem.)
> >
> > Signed-off-by: Changbin Du <changbin.du@gmail.com>
> > ---
> > exec.c | 29 +----------------------------
> > 1 file changed, 1 insertion(+), 28 deletions(-)
> >
> > diff --git a/exec.c b/exec.c
> > index 67e520d18e..9d9fd48519 100644
> > --- a/exec.c
> > +++ b/exec.c
> > @@ -997,36 +997,9 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
> > tb_invalidate_phys_addr(pc);
> > }
> > #else
> > -void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr, MemTxAttrs attrs)
>
> You can't remove this function yet.
> You should have seen that xtensa-softmmu no longer builds.
>
> I've cc'd you into Max Filippov's thread that addresses the same problem, and
> I'm going to apply his fix for now.
>
>
> r~
>
Got it, just go ahead with that one. thanks~
--
Cheers,
Changbin Du
prev parent reply other threads:[~2020-02-06 2:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-24 2:17 [PATCH] tcg: gdbstub: Fix missing breakpoint issue Changbin Du
2020-02-03 12:58 ` Changbin Du
2020-02-05 11:03 ` Richard Henderson
2020-02-06 2:33 ` Changbin Du [this message]
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=20200206023305.dp47phjlyqhxxix3@mail.google.com \
--to=changbin.du@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).