KVM: s390: Limit sthyi execution
authorJanosch Frank <frankja@linux.vnet.ibm.com>
Tue, 10 May 2016 13:03:42 +0000 (15:03 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Fri, 10 Jun 2016 10:07:12 +0000 (12:07 +0200)
commit7d0a5e62411a9223512c6af2e4c08a2d7c00fa2e
tree1c735ee1c90c691b0246c9bb07811030734d14e4
parent95ca2cb57985b07f5b136405f80a5106f5b06641
KVM: s390: Limit sthyi execution

Store hypervisor information is a valid instruction not only in
supervisor state but also in problem state, i.e. the guest's
userspace. Its execution is not only computational and memory
intensive, but also has to get hold of the ipte lock to write to the
guest's memory.

This lock is not intended to be held often and long, especially not
from the untrusted guest userspace. Therefore we apply rate limiting
of sthyi executions per VM.

Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Acked-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/kvm/kvm-s390.c
arch/s390/kvm/sthyi.c