]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - arch/s390/kvm/kvm-s390.c
KVM: s390: hardware support for guest debugging
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Thu, 23 Jan 2014 11:26:52 +0000 (12:26 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Tue, 22 Apr 2014 11:24:51 +0000 (13:24 +0200)
commit27291e2165b6de70c476b7b675308113edd69a60
tree1508e3bb47e7171c176d82ab4fa231947a267140
parentaf1827e773c983f1d601d674447aea89efdb1acb
KVM: s390: hardware support for guest debugging

This patch adds support to debug the guest using the PER facility on s390.
Single-stepping, hardware breakpoints and hardware watchpoints are supported. In
order to use the PER facility of the guest without it noticing it, the control
registers of the guest have to be patched and access to them has to be
intercepted(stctl, stctg, lctl, lctlg).

All PER program interrupts have to be intercepted and only the relevant PER
interrupts for the guest have to be given back. Special care has to be taken
about repeated exits on the same hardware breakpoint. The intervention of the
host in the guests PER configuration is not fully transparent. PER instruction
nullification can not be used by the guest and too many storage alteration
events may be reported to the guest (if it is activated for special address
ranges only) when the host concurrently debugging it.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/include/asm/kvm_host.h
arch/s390/include/uapi/asm/kvm.h
arch/s390/kvm/Makefile
arch/s390/kvm/guestdbg.c [new file with mode: 0644]
arch/s390/kvm/intercept.c
arch/s390/kvm/interrupt.c
arch/s390/kvm/kvm-s390.c
arch/s390/kvm/kvm-s390.h