Re: [PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-24 Thread Alexander Graf
On 24.06.2013, at 13:22, Bhushan Bharat-R65777 wrote: > > >> -Original Message- >> From: Alexander Graf [mailto:ag...@suse.de] >> Sent: Monday, June 24, 2013 4:13 PM >> To: Bhushan Bharat-R65777 >> Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Wood Scott-B07421; >> tiejun.c...@wind

RE: [PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-24 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Monday, June 24, 2013 4:13 PM > To: Bhushan Bharat-R65777 > Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Wood Scott-B07421; > tiejun.c...@windriver.com; Bhushan Bharat-R65777 > Subject: Re: [PATCH 6/6 v5] KVM

Re: [PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-24 Thread Alexander Graf
On 24.06.2013, at 11:08, Bharat Bhushan wrote: > This patch adds the debug stub support on booke/bookehv. > Now QEMU debug stub can use hw breakpoint, watchpoint and > software breakpoint to debug guest. > > This is how we save/restore debug register context when switching > between guest, users

RE: [PATCH 3/6 v5] powerpc: export debug register save function for KVM

2013-06-24 Thread Bhushan Bharat-R65777
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Monday, June 24, 2013 3:03 PM > To: Bhushan Bharat-R65777 > Cc: kvm-ppc@vger.kernel.org; k...@vger.kernel.org; Wood Scott-B07421; > tiejun.c...@windriver.com; Bhushan Bharat-R65777 > Subject: Re: [PATCH 3/6 v5] pow

Re: [PATCH 3/6 v5] powerpc: export debug register save function for KVM

2013-06-24 Thread Alexander Graf
On 24.06.2013, at 11:08, Bharat Bhushan wrote: > KVM need this function when switching from vcpu to user-space > thread. My subsequent patch will use this function. > > Signed-off-by: Bharat Bhushan > --- > arch/powerpc/include/asm/switch_to.h |4 > arch/powerpc/kernel/process.c

[PATCH 3/6 v5] powerpc: export debug register save function for KVM

2013-06-24 Thread Bharat Bhushan
KVM need this function when switching from vcpu to user-space thread. My subsequent patch will use this function. Signed-off-by: Bharat Bhushan --- arch/powerpc/include/asm/switch_to.h |4 arch/powerpc/kernel/process.c|3 ++- 2 files changed, 6 insertions(+), 1 deletions(-)

[PATCH 6/6 v5] KVM: PPC: Add userspace debug stub support

2013-06-24 Thread Bharat Bhushan
This patch adds the debug stub support on booke/bookehv. Now QEMU debug stub can use hw breakpoint, watchpoint and software breakpoint to debug guest. This is how we save/restore debug register context when switching between guest, userspace and kernel user-process: When QEMU is running -> threa

[PATCH 1/6 v5] powerpc: remove unnecessary line continuations

2013-06-24 Thread Bharat Bhushan
Signed-off-by: Bharat Bhushan --- v5: - no change arch/powerpc/kernel/process.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index ceb4e7b..639a8de 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/po

[PATCH 2/6 v5] powerpc: move debug registers in a structure

2013-06-24 Thread Bharat Bhushan
This way we can use same data type struct with KVM and also help in using other debug related function. Signed-off-by: Bharat Bhushan --- arch/powerpc/include/asm/processor.h | 38 + arch/powerpc/include/asm/reg_booke.h |8 +- arch/powerpc/kernel/asm-offsets.c|2 +- arch/po

[PATCH 0/6 v5] KVM :PPC: Userspace Debug support

2013-06-24 Thread Bharat Bhushan
From: Bharat Bhushan This patchset adds the userspace debug support for booke/bookehv. this is tested on powerpc e500v2/e500mc devices. We are now assuming that debug resource will not be used by kernel for its own debugging. It will be used for only kernel user process debugging. So the kernel

[PATCH 4/6 v5] KVM: PPC: exit to user space on "ehpriv" instruction

2013-06-24 Thread Bharat Bhushan
"ehpriv" instruction is used for setting software breakpoints by user space. This patch adds support to exit to user space with "run->debug" have relevant information. As this is the first point we are using run->debug, also defined the run->debug structure. Signed-off-by: Bharat Bhushan --- ar

[PATCH 5/6 v5] KVM: PPC: Using "struct debug_reg"

2013-06-24 Thread Bharat Bhushan
For KVM also use the "struct debug_reg" defined in asm/processor.h Signed-off-by: Bharat Bhushan --- arch/powerpc/include/asm/kvm_host.h | 13 + arch/powerpc/kvm/booke.c| 34 -- 2 files changed, 25 insertions(+), 22 deletions(-) diff -