Received: from eggs.gnu.org ([2001:4830:134:3::10]:37418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YREXy-0003pc-Om for qemu-devel@nongnu.org; Fri, 27 Feb 2015 01:37:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YREXv-0000GT-IJ for qemu-devel@nongnu.org; Fri, 27 Feb 2015 01:37:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YREXv-0000GN-AI for qemu-devel@nongnu.org; Fri, 27 Feb 2015 01:37:11 -0500 Date: Fri, 27 Feb 2015 06:42:57 +0008 From: Jason Wang Message-Id: <1425018897.3834.6@smtp.corp.redhat.com> In-Reply-To: <20150226140506.5ae9a13d.cornelia.huck@de.ibm.com> References: <1424934286-7099-1-git-send-email-jasowang@redhat.com> <1424934286-7099-7-git-send-email-jasowang@redhat.com> <20150226140506.5ae9a13d.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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: Cornelia Huck Cc: qemu-devel@nongnu.org, Christian Borntraeger , mst@redhat.com, Alexander Graf , Richard Henderson On Thu, Feb 26, 2015 at 9:05 PM, Cornelia Huck wrote: > 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. Sure, will fix this. > > > (I'm also wondering whether this should be the generic limit instead.) As you pointed out in V1, there will be more issues if we just increase the generic limit. So I switch to use per transport limit. Since the limit was not changed for both s390 and ccw, it should be ok. >> } AdapterRoutes; >> >> #define TYPE_S390_FLIC_COMMON "s390-flic" > >