From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39617) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUs6S-0000aD-Fo for qemu-devel@nongnu.org; Mon, 09 Mar 2015 03:27:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YUs6P-000309-5c for qemu-devel@nongnu.org; Mon, 09 Mar 2015 03:27:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36257) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YUs6O-000302-V6 for qemu-devel@nongnu.org; Mon, 09 Mar 2015 03:27:49 -0400 Date: Mon, 09 Mar 2015 15:26:58 +0800 From: Jason Wang Message-Id: <1425886018.29447.1@smtp.corp.redhat.com> In-Reply-To: <20150306132712.1c72ff89.cornelia.huck@de.ibm.com> References: <1425534531-6305-1-git-send-email-jasowang@redhat.com> <1425534531-6305-7-git-send-email-jasowang@redhat.com> <20150306132712.1c72ff89.cornelia.huck@de.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Subject: Re: [Qemu-devel] [PATCH V3 06/14] virtio-serial-bus: switch to bus specific queue limit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: Amit Shah , qemu-devel@nongnu.org On Fri, Mar 6, 2015 at 8:27 PM, Cornelia Huck wrote: > On Thu, 5 Mar 2015 13:48:43 +0800 > Jason Wang wrote: > >> Cc: Amit Shah >> Signed-off-by: Jason Wang >> --- >> hw/char/virtio-serial-bus.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/hw/char/virtio-serial-bus.c >> b/hw/char/virtio-serial-bus.c >> index 37a6f44..f280e95 100644 >> --- a/hw/char/virtio-serial-bus.c >> +++ b/hw/char/virtio-serial-bus.c >> @@ -26,6 +26,8 @@ >> #include "hw/virtio/virtio-serial.h" >> #include "hw/virtio/virtio-access.h" >> >> +#define VIRTIO_SERIAL_BUS_QUEUE_MAX 64 >> + >> struct VirtIOSerialDevices { >> QLIST_HEAD(, VirtIOSerial) devices; >> } vserdevices; >> @@ -942,7 +944,7 @@ static void >> virtio_serial_device_realize(DeviceState *dev, Error **errp) >> } >> >> /* Each port takes 2 queues, and one pair is for the control >> queue */ >> - max_supported_ports = VIRTIO_PCI_QUEUE_MAX / 2 - 1; >> + max_supported_ports = VIRTIO_SERIAL_BUS_QUEUE_MAX / 2 - 1; > > Shouldn't this be determined via the VirtIODevice instead? Or be the > maximum of those two values? Rethink about this. I think it's ok to use the transport limit through VirtIODevice here. Then there's no need for virtio serial to handle migration compatibility.