KVM: PPC: Book3S PR: Manage single-step mode
authorLaurent Vivier <lvivier@redhat.com>
Fri, 8 Apr 2016 16:05:00 +0000 (18:05 +0200)
committerPaul Mackerras <paulus@samba.org>
Wed, 11 May 2016 11:19:10 +0000 (21:19 +1000)
commit11dd6ac0254ed9a2b6994e22c903192edd0fa8fc
treeb2c1a13f033dc9b1dc54c510633c7333e7df8cfc
parent05b1159e641fa45e885aec8bf8e515117c8977d9
KVM: PPC: Book3S PR: Manage single-step mode

Until now, when we connect gdb to the QEMU gdb-server, the
single-step mode is not managed.

This patch adds this, only for kvm-pr:

If KVM_GUESTDBG_SINGLESTEP is set, we enable single-step trace bit in the
MSR (MSR_SE) just before the __kvmppc_vcpu_run(), and disable it just after.
In kvmppc_handle_exit_pr, instead of routing the interrupt to
the guest, we return to host, with KVM_EXIT_DEBUG reason.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/kvm/book3s_pr.c