[PATCH 5/7] bookehv: Save and restore debug registers on guest entry and exit

2013-02-27 Thread Bharat Bhushan
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

[PATCH 6/7] Rename EMULATE_DO_PAPR to EMULATE_EXIT_USER

2013-02-27 Thread Bharat Bhushan
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

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

2013-02-27 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. Signed-off-by: Bharat Bhushan --- arch/powerpc/include/uapi/asm/kvm.h | 22 +- arch/powerpc/kvm/booke.c| 143 +

[PATCH 1/7] KVM: PPC: booke: Added debug handler

2013-02-27 Thread Bharat Bhushan
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

[PATCH 2/7] Added ONE_REG interface for debug instruction

2013-02-27 Thread Bharat Bhushan
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

[PATCH 3/7] KVM: PPC: debug stub interface parameter defined

2013-02-27 Thread Bharat Bhushan
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

[PATCH 4/7] booke: Save and restore debug registers on guest entry and exit

2013-02-27 Thread Bharat Bhushan
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

[PATCH 0/7] KVM :PPC: Userspace Debug support

2013-02-27 Thread Bharat Bhushan
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