virtio-ccw: Check the number of vqs in CCW_CMD_SET_IND
commit797b608638c5ac7492e789563bcbed9feff0423d
authorHalil Pasic <pasic@linux.vnet.ibm.com>
Thu, 10 Dec 2015 11:55:06 +0000 (10 12:55 +0100)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Fri, 24 Feb 2017 09:15:18 +0000 (24 10:15 +0100)
treed3beb3d7b00415324b2188fe495a75849255c34d
parentd2256070d207ec49a42bed6a99c2cf55a720fb43
virtio-ccw: Check the number of vqs in CCW_CMD_SET_IND

We cannot support more than 64 virtqueues with the 64 bits provided by
classic indicators. If a driver tries to setup classic indicators
(which it is free to do even for virtio-1 devices) for a device with
more than 64 virtqueues, we should reject the attempt so that the
driver does not end up with an unusable device.

This is in preparation for bumping the number of supported virtqueues
on the ccw transport.

Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/virtio-ccw.c