From: Hollis Blanchard <hollisb@us.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 2 of 2] Add gdb break point support to PowerPC kvm
Date: Mon, 09 Jun 2008 14:57:26 +0000 [thread overview]
Message-ID: <1213023446.3358.5.camel@localhost.localdomain> (raw)
In-Reply-To: <d917195fbef25227967d.1212771276@thinkpadL>
On Fri, 2008-06-06 at 15:23 -0500, Jerone Young wrote:
>
> > > > > + case BOOKE_INTERRUPT_DEBUG: {
> > > > > + u32 dbsr;
> > > > > + struct kvm_guest_debug *dbg > &vcpu->guest_debug;
> > > > > +
> > > > > + vcpu->arch.pc = mfspr(SPRN_CSRR0);
> > > > > +
> > > > > + /* clear events in DBSR register */
> > > > > + dbsr = mfspr(SPRN_DBSR);
> > > > > +
> > > > > + if (vcpu->arch.pc = dbg->bp[0])
> > > > > + dbsr |= 1<<23; /* clear IAC1 event */
> > > > > + if (vcpu->arch.pc = dbg->bp[1])
> > > > > + dbsr |= 1<<22; /* clear IAC2 event */
> > > > > + if (vcpu->arch.pc = dbg->bp[2])
> > > > > + dbsr |= 1<<21; /* clear IAC3 event */
> > > > > + if (vcpu->arch.pc = dbg->bp[3])
> > > > > + dbsr |= 1<<20; /* clear IAC4 event */
> > > >
> > > > This doesn't seem like the right thing to do here. What if the
> > > > breakpoint isn't due to any of the IACs?
> > >
> > > If it is an IAC register that triggered the event then you have to
> clear
> > > it. The exact event in the DBSR.
> >
> > That's my point: why are you using dbg->bp[] instead of DBSR bits?
> If
> > anything, I would expect an error message if unexpected DBSR bits
> were
> > set, and in any case:
> > dbsr = mfspr(SPRN_DBSR);
> > mtspr(SPRN_DBSR, dbsr);
>
> Oh the issue is if 2 debug interrupts got off from two different
> registers. At least that was my train of the thought. Though the fact
> if
> that does happen that would mean they both had the exact same
> breakpoint. So we would only wat to process one of them.
That may be your train of thought, but it's not mine. Please reread my
comments and let me know if you still have questions.
--
Hollis Blanchard
IBM Linux Technology Center
prev parent reply other threads:[~2008-06-09 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-06 16:54 [PATCH 2 of 2] Add gdb break point support to PowerPC kvm Jerone Young
2008-06-06 18:10 ` Hollis Blanchard
2008-06-06 19:11 ` Jerone Young
2008-06-06 19:27 ` Hollis Blanchard
2008-06-06 20:23 ` Jerone Young
2008-06-09 14:57 ` Hollis Blanchard [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=1213023446.3358.5.camel@localhost.localdomain \
--to=hollisb@us.ibm.com \
--cc=kvm-ppc@vger.kernel.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 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.