s390x: Limit s390-ccw machines to 248 CPUs
commitdcddc75e4756eac166bb002f71dfb09aca9b59fc
authorChristian Borntraeger <borntraeger@de.ibm.com>
Thu, 2 Jun 2016 12:06:10 +0000 (2 14:06 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 14 Jun 2016 12:00:05 +0000 (14 14:00 +0200)
tree8b713d638227aab0301f75e5e1ad558dddc68643
parent06409bd91b0a40f30d2e41159627a6eb8f5ac322
s390x: Limit s390-ccw machines to 248 CPUs

The sclp scp read info call fills in a buffer with information about the
system. With more than 248 CPUs we overflow the 4k buffer of the SCCB,
leading to random data corruption. Basically ALL guest operating systems
call scp read info, so let's limit the machines to 248 CPUs to make it
obvious that >=249 does not work.

As KVM also limits itself to 248 and TCG on s390 does not support
SMP, this should cause no regression for any user as no VMs with more
than 248 VCPUs were ever possible.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/s390-virtio-ccw.c