summaryrefslogtreecommitdiffstats
path: root/hw/s390x
diff options
context:
space:
mode:
authorHalil Pasic <pasic@linux.vnet.ibm.com>2015-12-07 15:21:46 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:28:24 -0600
commit3727c249373b355c47229879f0b7bf7b233404f1 (patch)
tree1f19424371b9135aa9b8761875064fa434ab4b60 /hw/s390x
parentce41745423e63ac24eae991cbb5c32357e71aa35 (diff)
downloadhqemu-3727c249373b355c47229879f0b7bf7b233404f1.zip
hqemu-3727c249373b355c47229879f0b7bf7b233404f1.tar.gz
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 <cornelia.huck@de.ibm.com> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x')
-rw-r--r--hw/s390x/virtio-ccw.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index 63da303..95a6c14 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;
}
OpenPOWER on IntegriCloud