From: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
To: agraf@suse.de, benh@kernel.crashing.org, paulus@samba.org,
mpe@ellerman.id.au
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, kvm-ppc@vger.kernel.org,
kvm@vger.kernel.org
Subject: [PATCH 0/2 v5] powerpc/kvm: support to handle sw breakpoint
Date: Sun, 7 Sep 2014 22:01:31 +0530 [thread overview]
Message-ID: <1410107494-25556-1-git-send-email-maddy@linux.vnet.ibm.com> (raw)
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
next reply other threads:[~2014-09-07 16:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-07 16:31 Madhavan Srinivasan [this message]
2014-09-07 16:31 ` [PATCH 1/2 v5] powerpc/kvm: support to handle sw breakpoint 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
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=1410107494-25556-1-git-send-email-maddy@linux.vnet.ibm.com \
--to=maddy@linux.vnet.ibm.com \
--cc=agraf@suse.de \
--cc=benh@kernel.crashing.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).