From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 4/4 v2] KVM: PPC: Add userspace debug stub support Date: Tue, 2 Apr 2013 13:00:01 -0500 Message-ID: <1364925601.24520.9@snotra> References: <1363847101-26503-1-git-send-email-Bharat.Bhushan@freescale.com> <1363847101-26503-5-git-send-email-Bharat.Bhushan@freescale.com> <7355982C-05D1-4C58-A189-2F8F926AD11B@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D06FB82BE@039-SN2MPN1-013.039d.mgd> <7C9A47BE-0385-4B45-B4F9-D5069C9ADBA2@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D06FBBF38@039-SN2MPN1-013.039d.mgd.msft.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; delsp=Yes; format=Flowed Content-Transfer-Encoding: 8BIT Cc: Alexander Graf , "kvm-ppc@vger.kernel.org" , "kvm@vger.kernel.org" , Wood Scott-B07421 To: Bhushan Bharat-R65777 Return-path: Received: from co9ehsobe001.messaging.microsoft.com ([207.46.163.24]:19597 "EHLO co9outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759360Ab3DBSAK convert rfc822-to-8bit (ORCPT ); Tue, 2 Apr 2013 14:00:10 -0400 In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D06FBBF38@039-SN2MPN1-013.039d.mgd.msft.net> (from R65777@freescale.com on Tue Apr 2 09:09:34 2013) Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On 04/02/2013 09:09:34 AM, Bhushan Bharat-R65777 wrote: > > > > -----Original Message----- > > From: Alexander Graf [mailto:agraf@suse.de] > > Sent: Tuesday, April 02, 2013 1:57 PM > > To: Bhushan Bharat-R65777 > > Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Wood Scott-B07421 > > Subject: Re: [PATCH 4/4 v2] KVM: PPC: Add userspace debug stub > support > > > > > > On 29.03.2013, at 07:04, Bhushan Bharat-R65777 wrote: > > > > > > > > > > >> -----Original Message----- > > >> From: Alexander Graf [mailto:agraf@suse.de] > > >> Sent: Thursday, March 28, 2013 10:06 PM > > >> To: Bhushan Bharat-R65777 > > >> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Wood > Scott-B07421; > > >> Bhushan > > >> Bharat-R65777 > > >> Subject: Re: [PATCH 4/4 v2] KVM: PPC: Add userspace debug stub > > >> support > > >> > > >> > > >> How does the normal debug register switching code work in Linux? > > >> Can't we just reuse that? Or rely on it to restore working state > when > > >> another process gets scheduled in? > > > > > > Good point, I can see debug registers loading in function > __switch_to()- > > >switch_booke_debug_regs() in file arch/powerpc/kernel/process.c. > > > So as long as assume that host will not use debug resources we > can rely on > > this restore. But I am not sure that this is a fare assumption. As > Scott earlier > > mentioned someone can use debug resource for kernel debugging also. > > > > Someone in the kernel can also use floating point registers. But > then it's his > > responsibility to clean up the mess he leaves behind. > > I am neither convinced by what you said and nor even have much reason > to oppose :) > > Scott, > I remember you mentioned that host can use debug resources, you > comment on this ? I thought the conclusion we reached was that it was OK as long as KVM waits until it actually needs the debug resources to mess with the registers. -Scott From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Date: Tue, 02 Apr 2013 18:00:01 +0000 Subject: Re: [PATCH 4/4 v2] KVM: PPC: Add userspace debug stub support Message-Id: <1364925601.24520.9@snotra> List-Id: References: <1363847101-26503-1-git-send-email-Bharat.Bhushan@freescale.com> <1363847101-26503-5-git-send-email-Bharat.Bhushan@freescale.com> <7355982C-05D1-4C58-A189-2F8F926AD11B@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D06FB82BE@039-SN2MPN1-013.039d.mgd> <7C9A47BE-0385-4B45-B4F9-D5069C9ADBA2@suse.de> <6A3DF150A5B70D4F9B66A25E3F7C888D06FBBF38@039-SN2MPN1-013.039d.mgd.msft.net> In-Reply-To: <6A3DF150A5B70D4F9B66A25E3F7C888D06FBBF38@039-SN2MPN1-013.039d.mgd.msft.net> (from R65777@freescale.com on Tue Apr 2 09:09:34 2013) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Bhushan Bharat-R65777 Cc: Alexander Graf , "kvm-ppc@vger.kernel.org" , "kvm@vger.kernel.org" , Wood Scott-B07421 On 04/02/2013 09:09:34 AM, Bhushan Bharat-R65777 wrote: > > > > -----Original Message----- > > From: Alexander Graf [mailto:agraf@suse.de] > > Sent: Tuesday, April 02, 2013 1:57 PM > > To: Bhushan Bharat-R65777 > > Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Wood Scott-B07421 > > Subject: Re: [PATCH 4/4 v2] KVM: PPC: Add userspace debug stub > support > > > > > > On 29.03.2013, at 07:04, Bhushan Bharat-R65777 wrote: > > > > > > > > > > >> -----Original Message----- > > >> From: Alexander Graf [mailto:agraf@suse.de] > > >> Sent: Thursday, March 28, 2013 10:06 PM > > >> To: Bhushan Bharat-R65777 > > >> Cc: kvm-ppc@vger.kernel.org; kvm@vger.kernel.org; Wood > Scott-B07421; > > >> Bhushan > > >> Bharat-R65777 > > >> Subject: Re: [PATCH 4/4 v2] KVM: PPC: Add userspace debug stub > > >> support > > >> > > >> > > >> How does the normal debug register switching code work in Linux? > > >> Can't we just reuse that? Or rely on it to restore working state > when > > >> another process gets scheduled in? > > > > > > Good point, I can see debug registers loading in function > __switch_to()- > > >switch_booke_debug_regs() in file arch/powerpc/kernel/process.c. > > > So as long as assume that host will not use debug resources we > can rely on > > this restore. But I am not sure that this is a fare assumption. As > Scott earlier > > mentioned someone can use debug resource for kernel debugging also. > > > > Someone in the kernel can also use floating point registers. But > then it's his > > responsibility to clean up the mess he leaves behind. > > I am neither convinced by what you said and nor even have much reason > to oppose :) > > Scott, > I remember you mentioned that host can use debug resources, you > comment on this ? I thought the conclusion we reached was that it was OK as long as KVM waits until it actually needs the debug resources to mess with the registers. -Scott