public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: Bhushan Bharat-R65777 <R65777@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	Alexander Graf <agraf@suse.de>,
	"kvm-ppc@vger.kernel.org" <kvm-ppc@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH 8/8] KVM:PPC:booke: Allow debug interrupt injection to guest
Date: Mon, 4 Feb 2013 13:47:23 -0600	[thread overview]
Message-ID: <1360007243.14901.2@snotra> (raw)
In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D0659471E@039-SN2MPN1-023.039d.mgd.msft.net> (from R65777@freescale.com on Sun Feb  3 22:48:29 2013)

On 02/03/2013 10:48:29 PM, Bhushan Bharat-R65777 wrote:
> 
> 
> > -----Original Message-----
> > From: Wood Scott-B07421
> > Sent: Saturday, February 02, 2013 4:09 AM
> > To: Alexander Graf
> > Cc: Bhushan Bharat-R65777; kvm-ppc@vger.kernel.org;  
> kvm@vger.kernel.org
> > Subject: Re: [PATCH 8/8] KVM:PPC:booke: Allow debug interrupt  
> injection to guest
> >
> > On 01/31/2013 06:11:32 PM, Alexander Graf wrote:
> > > My main concern here is that we don't know when to remove MSR_DE  
> again
> > > from the (shadow) MSR. So how about this one instead?
> >
> > Why wouldn't you know this?  if (vcpu->guest_debug) { you never  
> remove it } else
> > { just copy whatever's in guest MSR }
> 
> I think we are ok with shadow_msr on e500v2 but we can have problem  
> on bookehv where we do not know when to clear MSR_DE in shared->msr.
> 
> How it works on e500mc:
> 	(1) User-space makes ioctl to use debug resource, we set  
> vcpu->guest_debug.
> 	(2) Before entering into the guest we check vcpu->guest_debug  
> flag and if set we set MSR_DE in shared->msr.
> 	(3) Sometime later user-space releases the debug resource then  
> in ioctl handling will clear vcpu->guest_debug.
> 	(4) Now when entering to guest we do not know what to do with  
> MSR_DE in shared->msr as we do now know if guest might have tried to  
> set/clear MSR_DE in between step (2) and step(3). What should be safe  
> thing to do? Can we leave MSR_DE set or clear MSR_DE. If we want to  
> clear MSR_DE then will it be good idea to clear this in step (3)  
> above (in ioctl where we clear vcpu->guest_debug).

Oh, you want to support dynamically changing the debug mode?  The  
hardware can't really deal with that, unless you paravirt MSR[DE],  
which doesn't seem worth it.  There's also the issue of confusing the  
guest if it checks EDM before you give debug to the host (this one  
applies to e500v2 as well).

-Scott

  reply	other threads:[~2013-02-04 19:47 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-16  8:24 [PATCH 2/8] KVM: PPC: booke: Allow multiple exception types Bharat Bhushan
2013-01-16  8:24 ` [PATCH 3/8] KVM: PPC: booke: Added debug handler Bharat Bhushan
2013-01-25 11:42   ` Alexander Graf
2013-01-30 11:30     ` Bhushan Bharat-R65777
2013-01-31 12:17       ` Alexander Graf
2013-01-31 16:58         ` Bhushan Bharat-R65777
2013-01-31 17:08           ` Alexander Graf
2013-01-31 17:11             ` Alexander Graf
2013-02-01  5:04             ` Bhushan Bharat-R65777
2013-02-01  8:06               ` Alexander Graf
2013-02-01  9:07                 ` Bhushan Bharat-R65777
2013-02-07 14:21                   ` Alexander Graf
2013-02-07 14:48                     ` Bhushan Bharat-R65777
2013-02-07 15:01                       ` Alexander Graf
2013-01-16  8:24 ` [PATCH 4/8] Added ONE_REG interface for debug instruction Bharat Bhushan
2013-01-25 11:48   ` Alexander Graf
2013-01-31 17:44     ` Bhushan Bharat-R65777
2013-01-31 17:52       ` Alexander Graf
2013-01-31 17:58         ` Bhushan Bharat-R65777
2013-01-31 18:22           ` Alexander Graf
2013-02-04  0:41   ` Paul Mackerras
2013-02-07 14:29     ` Alexander Graf
2013-02-11  0:22       ` Paul Mackerras
2013-01-16  8:24 ` [PATCH 5/8] KVM: PPC: debug stub interface parameter defined Bharat Bhushan
2013-01-17  7:22   ` Paul Mackerras
2013-01-17 11:11     ` Bhushan Bharat-R65777
2013-01-25 11:53       ` Alexander Graf
2013-01-30 14:15         ` Bhushan Bharat-R65777
2013-01-31 13:01           ` Alexander Graf
2013-01-31 14:05             ` Bhushan Bharat-R65777
2013-01-31 14:27               ` Alexander Graf
2013-01-31 14:44                 ` Bhushan Bharat-R65777
2013-01-16  8:24 ` [PATCH 6/8] booke: Added DBCR4 SPR number Bharat Bhushan
2013-01-16  8:24 ` [PATCH 7/8] KVM: PPC: booke/bookehv: Add debug stub support Bharat Bhushan
2013-01-25 12:07   ` Alexander Graf
2013-02-01  6:31     ` Bhushan Bharat-R65777
2013-02-01  8:21       ` Alexander Graf
2013-01-16  8:24 ` [PATCH 8/8] KVM:PPC:booke: Allow debug interrupt injection to guest Bharat Bhushan
2013-01-25 12:13   ` Alexander Graf
2013-01-30 11:12     ` Bhushan Bharat-R65777
2013-01-31 12:04       ` Alexander Graf
2013-01-31 17:59         ` Bhushan Bharat-R65777
2013-01-31 18:21           ` Alexander Graf
2013-01-31 18:43             ` Scott Wood
2013-01-31 18:52               ` Alexander Graf
2013-01-31 18:54                 ` Scott Wood
2013-01-31 19:05                   ` Alexander Graf
2013-01-31 19:20                     ` Alexander Graf
2013-01-31 22:40                       ` Scott Wood
2013-02-01  0:11                         ` Alexander Graf
2013-02-01 22:38                           ` Scott Wood
2013-02-04  4:48                             ` Bhushan Bharat-R65777
2013-02-04 19:47                               ` Scott Wood [this message]
2013-02-07 14:58                             ` Alexander Graf
2013-02-07 15:25                               ` Bhushan Bharat-R65777
2013-02-07 15:53                                 ` Alexander Graf
2013-02-07 15:00                             ` Bhushan Bharat-R65777
2013-02-07 15:08                               ` Alexander Graf
2013-01-31 18:03         ` 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=1360007243.14901.2@snotra \
    --to=scottwood@freescale.com \
    --cc=B07421@freescale.com \
    --cc=R65777@freescale.com \
    --cc=agraf@suse.de \
    --cc=kvm-ppc@vger.kernel.org \
    --cc=kvm@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox