On Guest entry: if guest is wants to use the debug register then
save h/w debug register in host_dbg_reg and load the debug registers
with shadow_dbg_reg. Otherwise leave h/w debug registers as is.
On guest exit: If guest/user-space is using the debug resource then
restore the h/w debug register w
Instruction emulation return EMULATE_DO_PAPR when it requires
exit to userspace on book3s. Similar return is required
for booke. EMULATE_DO_PAPR reads out to be confusing so it is
renamed to EMULATE_EXIT_USER.
Signed-off-by: Bharat Bhushan
---
arch/powerpc/include/asm/kvm_ppc.h |2 +-
arch/p
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.
Signed-off-by: Bharat Bhushan
---
arch/powerpc/include/uapi/asm/kvm.h | 22 +-
arch/powerpc/kvm/booke.c| 143 +
Installed debug handler will be used for guest debug support
and debug facility emulation features (patches for these
features will follow this patch).
Signed-off-by: Liu Yu
[bharat.bhus...@freescale.com: Substantial changes]
Signed-off-by: Bharat Bhushan
---
arch/powerpc/include/asm/kvm_host.h
This patch adds the one_reg interface to get the special instruction
to be used for setting software breakpoint from userspace.
Signed-off-by: Bharat Bhushan
---
Documentation/virtual/kvm/api.txt |1 +
arch/powerpc/include/asm/kvm_book3s.h |1 +
arch/powerpc/include/asm/kvm_booke.h
This patch defines the interface parameter for KVM_SET_GUEST_DEBUG
ioctl support. Follow up patches will use this for setting up
hardware breakpoints, watchpoints and software breakpoints.
Also kvm_arch_vcpu_ioctl_set_guest_debug() is brought one level below.
This is because I am not sure what is
On Guest entry: if guest is wants to use the debug register then
save h/w debug register in host_dbg_reg and load the debug registers
with shadow_dbg_reg. Otherwise leave h/w debug registers as is.
On guest exit: If guest/user-space is using the debug resource then
restore the h/w debug register w
This patchset adds the userspace debug support for booke/bookehv.
this is tested on powerpc e500v2/e500mc devices.
Bharat Bhushan (7):
KVM: PPC: booke: Added debug handler
Added ONE_REG interface for debug instruction
KVM: PPC: debug stub interface parameter defined
booke: Save and restore