Received: from eggs.gnu.org ([2001:4830:134:3::10]:53112) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQy7w-0007cP-Fm for qemu-devel@nongnu.org; Thu, 26 Feb 2015 08:05:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YQy7s-0007P3-S4 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 08:05:16 -0500 Received: from e06smtp14.uk.ibm.com ([195.75.94.110]:56459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YQy7s-0007Nk-C5 for qemu-devel@nongnu.org; Thu, 26 Feb 2015 08:05:12 -0500 Received: from /spool/local by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 26 Feb 2015 13:05:11 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 3BCB017D8042 for ; Thu, 26 Feb 2015 13:05:26 +0000 (GMT) Received: from d06av09.portsmouth.uk.ibm.com (d06av09.portsmouth.uk.ibm.com [9.149.37.250]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id t1QD59hj9437596 for ; Thu, 26 Feb 2015 13:05:09 GMT Received: from d06av09.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av09.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id t1QD59oT002522 for ; Thu, 26 Feb 2015 06:05:09 -0700 Date: Thu, 26 Feb 2015 14:05:06 +0100 From: Cornelia Huck Message-ID: <20150226140506.5ae9a13d.cornelia.huck@de.ibm.com> In-Reply-To: <1424934286-7099-7-git-send-email-jasowang@redhat.com> References: <1424934286-7099-1-git-send-email-jasowang@redhat.com> <1424934286-7099-7-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 V2 06/11] virtio-s390: switch to bus 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 Thu, 26 Feb 2015 15:04:41 +0800 Jason Wang wrote: > Instead of depending on marco, switch to use a bus specific queue > limit. Left is AdapterRouters->gsi[], this could be done in the future > if we want to increase s390's queue limit really. > > Cc: Alexander Graf > Cc: Richard Henderson > Cc: Christian Borntraeger > Cc: Cornelia Huck > Signed-off-by: Jason Wang > --- > hw/s390x/s390-virtio-bus.c | 6 +++--- > include/hw/s390x/s390_flic.h | 2 +- > include/hw/virtio/virtio.h | 1 + > 3 files changed, 5 insertions(+), 4 deletions(-) > > diff --git a/hw/s390x/s390-virtio-bus.c b/hw/s390x/s390-virtio-bus.c > index d48590a..4e2bbbc 100644 > --- a/hw/s390x/s390-virtio-bus.c > +++ b/hw/s390x/s390-virtio-bus.c > @@ -331,7 +331,7 @@ static ram_addr_t s390_virtio_device_num_vq(VirtIOS390Device *dev) > VirtIODevice *vdev = dev->vdev; > int num_vq; > > - for (num_vq = 0; num_vq < VIRTIO_PCI_QUEUE_MAX; num_vq++) { > + for (num_vq = 0; num_vq < virtio_get_queue_max(vdev); num_vq++) { > if (!virtio_queue_get_num(vdev, num_vq)) { > break; > } > @@ -438,7 +438,7 @@ VirtIOS390Device *s390_virtio_bus_find_vring(VirtIOS390Bus *bus, > QTAILQ_FOREACH(kid, &bus->bus.children, sibling) { > VirtIOS390Device *dev = (VirtIOS390Device *)kid->child; > > - for(i = 0; i < VIRTIO_PCI_QUEUE_MAX; i++) { > + for(i = 0; i < virtio_get_queue_max(dev->vdev); i++) { Again, I do not see any advantage over s/PCI/S390/ here. > if (!virtio_queue_get_addr(dev->vdev, i)) > break; > if (virtio_queue_get_addr(dev->vdev, i) == mem) { (...) > diff --git a/include/hw/s390x/s390_flic.h b/include/hw/s390x/s390_flic.h > index 489d73b..7a3ada2 100644 > --- a/include/hw/s390x/s390_flic.h > +++ b/include/hw/s390x/s390_flic.h > @@ -20,7 +20,7 @@ > typedef struct AdapterRoutes { > AdapterInfo adapter; > int num_routes; > - int gsi[VIRTIO_PCI_QUEUE_MAX]; > + int gsi[VIRTIO_S390_QUEUE_MAX]; Adapter routes are only applicable for the ccw transport, not for the old s390 transport. (I'm also wondering whether this should be the generic limit instead.) > } AdapterRoutes; > > #define TYPE_S390_FLIC_COMMON "s390-flic"