linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2 v5] powerpc/kvm: support to handle sw breakpoint
@ 2014-09-07 16:31 Madhavan Srinivasan
  2014-09-07 16:31 ` [PATCH 1/2 " Madhavan Srinivasan
  2014-09-07 16:31 ` [PATCH 2/2 v5] powerpc/kvm: common sw breakpoint instr across ppc Madhavan Srinivasan
  0 siblings, 2 replies; 7+ messages in thread
From: Madhavan Srinivasan @ 2014-09-07 16:31 UTC (permalink / raw)
  To: agraf, benh, paulus, mpe; +Cc: Madhavan Srinivasan, linuxppc-dev, kvm-ppc, kvm

This patchset adds ppc64 server side support for software breakpoint
and extends the use of illegal instruction as software
breakpoint across ppc platform.

Patch 1, adds kernel side support for software breakpoint.
Design is that, by using an illegal instruction, we trap to
hypervisor via Emulation Assistance interrupt, where we check
for the illegal instruction and accordingly we return to Host
or Guest. Patch also adds support for software breakpoint
in PR KVM.

Patch 2,extends the use of illegal instruction as software
breakpoint instruction across the ppc platform. Patch extends
booke program interrupt code to support software breakpoint.

Patch 2 is only compile tested. Will really help if
someone can try it out and let me know comments.

Changes v4->v5:
 Made changes to code comments and commit messages
 Added debugging active checks for illegal instr comparison
 Added debug instruction check in emulate code
 Extended SW breakpoint to booke

Changes v3->v4:
 Made changes to code comments and removed #define of zero opcode
 Added a new function to handle the debug instruction emulation in book3s_hv
 Rebased the code to latest upstream source.

Changes v2->v3:
 Changed the debug instructions. Using the all zero opcode in the instruction word
  as illegal instruction as mentioned in Power ISA instead of ABS
 Removed reg updated in emulation assist and added a call to
  kvmppc_emulate_instruction for reg update.

Changes v1->v2:

 Moved the debug instruction #def to kvm_book3s.h. This way PR_KVM can also share it.
 Added code to use KVM get one reg infrastructure to get debug opcode.
 Updated emulate.c to include emulation of debug instruction incase of PR_KVM.
 Made changes to commit message.

Madhavan Srinivasan (2):
  powerpc/kvm: support to handle sw breakpoint
  powerpc/kvm: common sw breakpoint instr across ppc

 arch/powerpc/include/asm/kvm_ppc.h |  6 ++++++
 arch/powerpc/kvm/book3s.c          |  3 ++-
 arch/powerpc/kvm/book3s_hv.c       | 41 ++++++++++++++++++++++++++++++++++----
 arch/powerpc/kvm/book3s_pr.c       |  3 +++
 arch/powerpc/kvm/booke.c           | 18 +++++++++++++++--
 arch/powerpc/kvm/emulate.c         | 18 +++++++++++++++++
 6 files changed, 82 insertions(+), 7 deletions(-)

-- 
1.7.11.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-09-09  7:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-07 16:31 [PATCH 0/2 v5] powerpc/kvm: support to handle sw breakpoint Madhavan Srinivasan
2014-09-07 16:31 ` [PATCH 1/2 " Madhavan Srinivasan
2014-09-08 13:05   ` Alexander Graf
2014-09-09  7:31     ` Madhavan Srinivasan
2014-09-07 16:31 ` [PATCH 2/2 v5] powerpc/kvm: common sw breakpoint instr across ppc Madhavan Srinivasan
2014-09-08 13:09   ` Alexander Graf
2014-09-09  7:41     ` Madhavan Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).