From: Bharat Bhushan <r65777@freescale.com> To: <kvm-ppc@vger.kernel.org>, <kvm@vger.kernel.org>, <agraf@suse.de>, <scottwood@freescale.com>, <tiejun.chen@windriver.com> Cc: Bharat Bhushan <bharat.bhushan@freescale.com> Subject: [PATCH v4] KVM :PPC: Userspace Debug support Date: Tue, 7 May 2013 15:10:47 +0530 [thread overview] Message-ID: <1367919653-30414-1-git-send-email-Bharat.Bhushan@freescale.com> (raw) From: Bharat Bhushan <bharat.bhushan@freescale.com> 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 debug load interface during context_to is used to load debug conext for that selected process. v3->v4 - 4 out of 7 patches of initial patchset were applied. This patchset is on and above those 4 patches - KVM local "struct kvmppc_booke_debug_reg" is replaced by powerpc global "struct debug_reg" - use switch_booke_debug_regs() for debug register context switch. - Save DBSR before kernel pre-emption is enabled. - Some more cleanup v2->v3 - 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 debug load interface during context_to is used to load debug conext for that selected process. v1->v2 - Debug registers are save/restore in vcpu_put/vcpu_get. Earlier the debug registers are saved/restored in guest entry/exit Bharat Bhushan (6): powerpc: remove unnecessary line continuations powerpc: move debug registers in a structure powerpc: export debug register save function for KVM KVM: PPC: exit to user space on "ehpriv" instruction KVM: PPC: Using "struct debug_reg" KVM: PPC: Add userspace debug stub support arch/powerpc/include/asm/disassemble.h | 4 + arch/powerpc/include/asm/kvm_host.h | 16 +-- arch/powerpc/include/asm/processor.h | 38 +++-- arch/powerpc/include/asm/reg_booke.h | 8 +- arch/powerpc/include/asm/switch_to.h | 4 + arch/powerpc/include/uapi/asm/kvm.h | 22 ++- arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/kernel/process.c | 45 +++--- arch/powerpc/kernel/ptrace.c | 154 +++++++++--------- arch/powerpc/kernel/signal_32.c | 6 +- arch/powerpc/kernel/traps.c | 35 ++-- arch/powerpc/kvm/booke.c | 276 ++++++++++++++++++++++++++++---- arch/powerpc/kvm/booke.h | 5 + arch/powerpc/kvm/e500_emulate.c | 27 +++ 14 files changed, 458 insertions(+), 184 deletions(-)
WARNING: multiple messages have this Message-ID (diff)
From: Bharat Bhushan <r65777@freescale.com> To: kvm-ppc@vger.kernel.org, kvm@vger.kernel.org, agraf@suse.de, scottwood@freescale.com, tiejun.chen@windriver.com Cc: Bharat Bhushan <bharat.bhushan@freescale.com> Subject: [PATCH v4] KVM :PPC: Userspace Debug support Date: Tue, 07 May 2013 09:52:47 +0000 [thread overview] Message-ID: <1367919653-30414-1-git-send-email-Bharat.Bhushan@freescale.com> (raw) From: Bharat Bhushan <bharat.bhushan@freescale.com> 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 debug load interface during context_to is used to load debug conext for that selected process. v3->v4 - 4 out of 7 patches of initial patchset were applied. This patchset is on and above those 4 patches - KVM local "struct kvmppc_booke_debug_reg" is replaced by powerpc global "struct debug_reg" - use switch_booke_debug_regs() for debug register context switch. - Save DBSR before kernel pre-emption is enabled. - Some more cleanup v2->v3 - 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 debug load interface during context_to is used to load debug conext for that selected process. v1->v2 - Debug registers are save/restore in vcpu_put/vcpu_get. Earlier the debug registers are saved/restored in guest entry/exit Bharat Bhushan (6): powerpc: remove unnecessary line continuations powerpc: move debug registers in a structure powerpc: export debug register save function for KVM KVM: PPC: exit to user space on "ehpriv" instruction KVM: PPC: Using "struct debug_reg" KVM: PPC: Add userspace debug stub support arch/powerpc/include/asm/disassemble.h | 4 + arch/powerpc/include/asm/kvm_host.h | 16 +-- arch/powerpc/include/asm/processor.h | 38 +++-- arch/powerpc/include/asm/reg_booke.h | 8 +- arch/powerpc/include/asm/switch_to.h | 4 + arch/powerpc/include/uapi/asm/kvm.h | 22 ++- arch/powerpc/kernel/asm-offsets.c | 2 +- arch/powerpc/kernel/process.c | 45 +++--- arch/powerpc/kernel/ptrace.c | 154 +++++++++--------- arch/powerpc/kernel/signal_32.c | 6 +- arch/powerpc/kernel/traps.c | 35 ++-- arch/powerpc/kvm/booke.c | 276 ++++++++++++++++++++++++++++---- arch/powerpc/kvm/booke.h | 5 + arch/powerpc/kvm/e500_emulate.c | 27 +++ 14 files changed, 458 insertions(+), 184 deletions(-)
next reply other threads:[~2013-05-07 9:40 UTC|newest] Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-05-07 9:40 Bharat Bhushan [this message] 2013-05-07 9:52 ` [PATCH v4] KVM :PPC: Userspace Debug support Bharat Bhushan 2013-05-07 9:40 ` [PATCH] powerpc: remove unnecessary line continuations Bharat Bhushan 2013-05-07 9:52 ` Bharat Bhushan 2013-05-07 9:40 ` [PATCH] powerpc: move debug registers in a structure Bharat Bhushan 2013-05-07 9:52 ` Bharat Bhushan 2013-05-07 9:40 ` [PATCH] powerpc: export debug register save function for KVM Bharat Bhushan 2013-05-07 9:52 ` Bharat Bhushan 2013-05-10 9:15 ` Alexander Graf 2013-05-10 9:15 ` Alexander Graf 2013-05-07 9:40 ` [PATCH] KVM: PPC: exit to user space on "ehpriv" instruction Bharat Bhushan 2013-05-07 9:52 ` Bharat Bhushan 2013-05-07 9:40 ` [PATCH] KVM: PPC: Using "struct debug_reg" Bharat Bhushan 2013-05-07 9:52 ` Bharat Bhushan 2013-05-07 9:40 ` [PATCH] KVM: PPC: Add userspace debug stub support Bharat Bhushan 2013-05-07 9:52 ` Bharat Bhushan 2013-05-10 10:18 ` Alexander Graf 2013-05-10 10:18 ` Alexander Graf 2013-05-10 17:31 ` Bhushan Bharat-R65777 2013-05-10 17:31 ` Bhushan Bharat-R65777 2013-05-10 17:44 ` Alexander Graf 2013-05-10 17:44 ` Alexander Graf 2013-05-11 10:24 ` Bhushan Bharat-R65777 2013-05-11 10:24 ` Bhushan Bharat-R65777 2013-05-11 13:18 ` Alexander Graf 2013-05-11 13:18 ` Alexander Graf 2013-05-13 14:33 ` Scott Wood 2013-05-13 14:33 ` 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=1367919653-30414-1-git-send-email-Bharat.Bhushan@freescale.com \ --to=r65777@freescale.com \ --cc=agraf@suse.de \ --cc=bharat.bhushan@freescale.com \ --cc=kvm-ppc@vger.kernel.org \ --cc=kvm@vger.kernel.org \ --cc=scottwood@freescale.com \ --cc=tiejun.chen@windriver.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: linkBe 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.