Received: from eggs.gnu.org ([2001:4830:134:3::10]:37027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdfTM-0005BK-5S for qemu-devel@nongnu.org; Thu, 02 Apr 2015 09:47:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdfTH-0006s0-Ox for qemu-devel@nongnu.org; Thu, 02 Apr 2015 09:47:52 -0400 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:57216) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdfTH-0006ru-Er for qemu-devel@nongnu.org; Thu, 02 Apr 2015 09:47:47 -0400 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 2 Apr 2015 14:47:45 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id D2FEF2190063 for ; Thu, 2 Apr 2015 14:47:31 +0100 (BST) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t32DlilM1179932 for ; Thu, 2 Apr 2015 13:47:44 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t32Dlixx000478 for ; Thu, 2 Apr 2015 07:47:44 -0600 Date: Thu, 2 Apr 2015 15:47:42 +0200 From: Cornelia Huck Message-ID: <20150402154742.21d6c66e.cornelia.huck@de.ibm.com> In-Reply-To: <1427876112-12615-10-git-send-email-jasowang@redhat.com> References: <1427876112-12615-1-git-send-email-jasowang@redhat.com> <1427876112-12615-10-git-send-email-jasowang@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V5 09/18] virtio-ccw: introduce ccw specific queue limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jason Wang Cc: Alexander Graf , Richard Henderson , qemu-devel@nongnu.org, Christian Borntraeger , mst@redhat.com On Wed, 1 Apr 2015 16:15:03 +0800 Jason Wang 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 > Cc: Cornelia Huck > Cc: Christian Borntraeger > Cc: Richard Henderson > Signed-off-by: Jason Wang > --- > 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 >) > return -EINVAL; > } > In master, there's also a new instance of VIRTIO_PCI_QUEUE_MAX (in virtio_ccw_cb()) which needs a similar treatment. But on the whole, looks good.