From: Scott Wood <scottwood@freescale.com>
To: Bhushan Bharat-R65777 <Bharat.Bhushan@freescale.com>
Cc: "agraf@suse.de" <agraf@suse.de>,
"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
"Yoder Stuart-B08248" <stuart.yoder@freescale.com>
Subject: Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register
Date: Wed, 30 Jul 2014 13:15:20 -0500 [thread overview]
Message-ID: <1406744120.29414.271.camel@snotra.buserror.net> (raw)
In-Reply-To: <67e3955a5dec4351a1ceb2b39cf1f6ca@BLUPR03MB566.namprd03.prod.outlook.com>
On Wed, 2014-07-30 at 12:57 -0500, Bhushan Bharat-R65777 wrote:
>
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Wednesday, July 30, 2014 11:18 PM
> > To: Bhushan Bharat-R65777
> > Cc: agraf@suse.de; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Yoder Stuart-
> > B08248
> > Subject: Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest
> > visible register
> >
> > On Wed, 2014-07-30 at 00:21 -0500, Bhushan Bharat-R65777 wrote:
> > >
> > > > -----Original Message-----
> > > > From: Wood Scott-B07421
> > > > Sent: Tuesday, July 29, 2014 3:22 AM
> > > > To: Bhushan Bharat-R65777
> > > > Cc: agraf@suse.de; kvm-ppc@vger.kernel.org; kvm@vger.kernel.org;
> > > > Yoder Stuart-
> > > > B08248
> > > > Subject: Re: [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM
> > > > in guest visible register
> > > >
> > > > On Fri, 2014-07-11 at 14:08 +0530, Bharat Bhushan wrote:
> > > > > This is not used and even I do not remember why this was added in
> > > > > first place.
> > > > >
> > > > > Signed-off-by: Bharat Bhushan <Bharat.Bhushan@freescale.com>
> > > > > ---
> > > > > arch/powerpc/kvm/booke.c | 2 --
> > > > > 1 file changed, 2 deletions(-)
> > > > >
> > > > > diff --git a/arch/powerpc/kvm/booke.c b/arch/powerpc/kvm/booke.c
> > > > > index ab62109..a5ee42c 100644
> > > > > --- a/arch/powerpc/kvm/booke.c
> > > > > +++ b/arch/powerpc/kvm/booke.c
> > > > > @@ -1804,8 +1804,6 @@ int
> > > > > kvm_arch_vcpu_ioctl_set_guest_debug(struct kvm_vcpu
> > > > *vcpu,
> > > > > kvm_guest_protect_msr(vcpu, MSR_DE, true);
> > > > > vcpu->guest_debug = dbg->control;
> > > > > vcpu->arch.shadow_dbg_reg.dbcr0 = 0;
> > > > > - /* Set DBCR0_EDM in guest visible DBCR0 register. */
> > > > > - vcpu->arch.dbg_reg.dbcr0 = DBCR0_EDM;
> > > > >
> > > > > if (vcpu->guest_debug & KVM_GUESTDBG_SINGLESTEP)
> > > > > vcpu->arch.shadow_dbg_reg.dbcr0 |= DBCR0_IDM | DBCR0_IC;
> > > >
> > > > This was intended to let the guest know that the host owns the debug
> > > > resources, by analogy to what a JTAG debugger would do.
> > > >
> > > > The Power ISA has this "Virtualized Implementation Note":
> > > >
> > > > It is the responsibility of the hypervisor to ensure that
> > > > DBCR0[EDM] is consistent with usage of DEP.
> > >
> > > Ok, That means that if MSRP_DEP is set then set DBCR0_EDM and if MSRP_DEP is
> > clear then clear DBCR0_EDM, right?
> > > We need to implement above mentioned this.
> >
> > We should probably clear EDM only when guest debug emulation is working and
> > enabled (i.e. not until at least patch 6/6).
>
> But if EDM is set then guest debug emulation will not start/allowed.
I don't mean after the guest tries to write to the registers -- I mean
after the code has been added to KVM to allow it to work.
-Scott
next prev parent reply other threads:[~2014-07-30 18:15 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-11 8:38 [PATCH 0/6] Guest debug emulation Bharat Bhushan
2014-07-11 8:38 ` [PATCH 1/6] KVM: PPC: BOOKE: No need to set DBCR0_EDM in guest visible register Bharat Bhushan
2014-07-28 21:52 ` Scott Wood
2014-07-30 5:21 ` Bharat.Bhushan
2014-07-30 17:47 ` Scott Wood
2014-07-30 17:57 ` Bharat.Bhushan
2014-07-30 18:15 ` Scott Wood [this message]
2014-07-11 8:38 ` [PATCH 2/6] KVM: PPC: BOOKE: Force MSR_DE in rfci if guest is under debug Bharat Bhushan
2014-07-28 13:54 ` Alexander Graf
2014-07-28 21:54 ` Scott Wood
2014-07-30 5:30 ` Bharat.Bhushan
2014-07-11 8:38 ` [PATCH 3/6] KVM: PPC: BOOKE: allow debug interrupt at "debug level" Bharat Bhushan
2014-07-11 8:38 ` [PATCH 4/6] KVM: PPC: BOOKE : Emulate rfdi instruction Bharat Bhushan
2014-07-11 8:39 ` [PATCH 5/6] KVM: PPC: BOOKE: Allow guest to change MSR_DE Bharat Bhushan
2014-07-28 22:01 ` Scott Wood
2014-07-29 14:05 ` Alexander Graf
2014-07-30 5:37 ` Bharat.Bhushan
2014-07-11 8:39 ` [PATCH 6/6] KVM: PPC: BOOKE: Emulate debug registers and exception Bharat Bhushan
2014-07-28 14:04 ` Alexander Graf
2014-07-28 22:33 ` Scott Wood
2014-07-29 14:06 ` Alexander Graf
2014-07-29 17:50 ` Scott Wood
2014-07-29 18:23 ` Alexander Graf
2014-07-30 5:43 ` Bharat.Bhushan
2014-07-30 6:33 ` Alexander Graf
2014-07-30 6:49 ` Bharat.Bhushan
2014-07-28 22:28 ` Scott Wood
2014-07-30 6:43 ` Bharat.Bhushan
2014-07-31 2:47 ` Scott Wood
2014-07-31 6:15 ` Bharat.Bhushan
2014-07-31 20:45 ` Scott Wood
2014-08-01 9:34 ` Bharat.Bhushan
2014-08-02 3:35 ` Scott Wood
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=1406744120.29414.271.camel@snotra.buserror.net \
--to=scottwood@freescale.com \
--cc=Bharat.Bhushan@freescale.com \
--cc=agraf@suse.de \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=stuart.yoder@freescale.com \
/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