KVM: s390: limit floating irqs
authorJens Freimann <jfrei@linux.vnet.ibm.com>
Thu, 30 Jan 2014 07:40:23 +0000 (08:40 +0100)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 30 Jan 2014 09:25:23 +0000 (10:25 +0100)
commita91b8ebe8671980151e0a19ee9fec6b0e1ae1d58
treecb49f6acefa5925bc5f525795ca737b9fe4cfe86
parentc05c4186bbe4e99d64e8a36f7ca7f480da5d109f
KVM: s390: limit floating irqs

Userspace can flood the kernel with interrupts as of now, so let's
limit the number of pending floating interrupts injected via either
the floating interrupt controller or the KVM_S390_INTERRUPT ioctl.

We can have up to 4*64k pending subchannels + 8 adapter interrupts,
as well as up to ASYNC_PF_PER_VCPU*KVM_MAX_VCPUS pfault done interrupts.
There are also sclp and machine checks. This gives us
(4*65536+8+64*64+1+1) = 266250 interrupts.

Suggested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Jens Freimann <jfrei@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.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/interrupt.c
This page took 0.025262 seconds and 5 git commands to generate.