OSDN Git Service

KVM: s390: filter space-switch events when PER is enforced
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Tue, 23 Jun 2015 20:49:36 +0000 (22:49 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 29 Jul 2015 08:36:22 +0000 (10:36 +0200)
commit0df30abcd69b61d8163282c157f15ed3b0f1ac85
treebfc085b7899b38fc8ee70b1a72607fbc0ea62bb6
parent14d4a425e7df6aaaa3287108ce191ccb6644c264
KVM: s390: filter space-switch events when PER is enforced

When guest debugging is active, space-switch events might be enforced
by PER. While the PER events are correctly filtered out,
space-switch-events could be forwarded to the guest, although from a
guest point of view, they should not have been reported.

Therefore we have to filter out space-switch events being concurrently
reported with a PER event, if the PER event got filtered out. To do so,
we theoretically have to know which instruction was responsible for the
event. As the applicable instructions modify the PSW address, the
address space set in the PSW and even the address space in cr1, we
can't figure out the instruction that way.

For this reason, we have to rely on the information about the old and
new address space, in order to guess the responsible instruction type
and do appropriate checks for space-switch events.

Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/kvm/guestdbg.c