From: Halil Pasic Date: Mon, 7 Dec 2015 14:21:46 +0000 (+0100) Subject: virtio-ccw: fix sanity check for vector X-Git-Tag: qemu-xen-4.8.0-rc1~584^2~1 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1789f4e37c78d408dfa61655dfd8b397554152f9;p=qemu-xen.git virtio-ccw: fix sanity check for vector The commit 8dfbaa6ac ("virtio-ccw: introduce ccw specific queue limit") did not touch the sanity check for the vector argument of the method virtio_ccw_notify, despite intended as seen from https://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg02705.html To be able to scale number of virtqueues using the constant this sanity check needs to be altered. Fixes: 8dfbaa6ac ("virtio-ccw: introduce ccw specific queue limit") Reviewed-by: Cornelia Huck Signed-off-by: Halil Pasic Signed-off-by: Cornelia Huck --- diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index 63da303864..95a6c142b8 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -1177,7 +1177,8 @@ static void virtio_ccw_notify(DeviceState *d, uint16_t vector) SubchDev *sch = dev->sch; uint64_t indicators; - if (vector >= 128) { + /* queue indicators + secondary indicators */ + if (vector >= VIRTIO_CCW_QUEUE_MAX + 64) { return; }