]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit9d35aca1ba8aac73c6adb9bbea5244cbe465b7ef
tree1c735ee1c90c691b0246c9bb07811030734d14e4
parentfb78104de5b6f5ff992f3d698772922628a76254
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