From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53517) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdxML-00014u-93 for qemu-devel@nongnu.org; Fri, 03 Apr 2015 04:53:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YdxMH-0007y3-JH for qemu-devel@nongnu.org; Fri, 03 Apr 2015 04:53:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45552) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YdxMH-0007xu-E8 for qemu-devel@nongnu.org; Fri, 03 Apr 2015 04:53:45 -0400 Date: Fri, 03 Apr 2015 16:53:06 +0800 From: Jason Wang Message-Id: <1428051186.27124.1@smtp.corp.redhat.com> In-Reply-To: <20150402154742.21d6c66e.cornelia.huck@de.ibm.com> References: <1427876112-12615-1-git-send-email-jasowang@redhat.com> <1427876112-12615-10-git-send-email-jasowang@redhat.com> <20150402154742.21d6c66e.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed 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: Cornelia Huck Cc: Alexander Graf , Richard Henderson , qemu-devel@nongnu.org, Christian Borntraeger , mst@redhat.com On Thu, Apr 2, 2015 at 9:47 PM, Cornelia Huck wrote: > 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 >) Yes, because of 590fe5722b522e492a9c78adadae4def35b137dd. > >> 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. Thanks for the reminding, will address this in V6.