On Wed, 1 Apr 2015 16:15:03 +0800
Jason Wang <address@hidden> wrote:
Instead of depending on marco, using a bus specific limit. Also make
it clear that the number of gsis per I/O adapter is not directly
depending on the number of virtio queues, but rather the other way
around.
Cc: Alexander Graf <address@hidden>
Cc: Cornelia Huck <address@hidden>
Cc: Christian Borntraeger <address@hidden>
Cc: Richard Henderson <address@hidden>
Signed-off-by: Jason Wang <address@hidden>
---
hw/s390x/s390-virtio-ccw.c | 7 +++++--
hw/s390x/virtio-ccw.c | 19 ++++++++++++-------
include/hw/s390x/s390_flic.h | 4 +++-
3 files changed, 20 insertions(+), 10 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index dfe6ded..935b880 100644
--- a/hw/s390x/virtio-ccw.c
+++ b/hw/s390x/virtio-ccw.c
@@ -265,8 +267,9 @@ static int virtio_ccw_set_vqs(SubchDev *sch,
uint64_t addr, uint32_t align,
uint16_t index, uint16_t num)
{
VirtIODevice *vdev = virtio_ccw_get_vdev(sch);
+ int queue_max = virtio_get_queue_max(vdev);
- if (index > VIRTIO_PCI_QUEUE_MAX) {
+ if (index > queue_max) {
trivial conflict on master (>= instead of >)