KVM: s390: guestdbg: filter PER i-fetch on EXECUTE properly
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 24 May 2016 10:40:11 +0000 (12:40 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 30 Jan 2017 10:19:17 +0000 (11:19 +0100)
commita69cbe81b2f38437113c05019a134a4731a3aa78
treec73438a4bb6fe4518f3a03c44fe84cb7a5befbb9
parent3fa8cad7402cfe982a60d746609e89aafe15d131
KVM: s390: guestdbg: filter PER i-fetch on EXECUTE properly

When we get a PER i-fetch event on an EXECUTE or EXECUTE RELATIVE LONG
instruction, because the executed instruction generated a PER i-fetch
event, then the PER address points at the EXECUTE function, not the
fetched one.

Therefore, when filtering PER events, we have to take care of the
really fetched instruction, which we can only get by reading in guest
virtual memory.

For icpt code 4 and 56, we directly have additional information about an
EXECUTE instruction at hand. For icpt code 8, we always have to read
in guest virtual memory.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[small fixes]
arch/s390/kvm/guestdbg.c
arch/s390/kvm/intercept.c
arch/s390/kvm/kvm-s390.h