Received: from eggs.gnu.org ([2001:4830:134:3::10]:48963) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJMzB-00086Z-6i for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:00:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJMz6-0006KA-7o for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:00:49 -0500 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:42003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJMz6-0006Iw-0d for qemu-devel@nongnu.org; Thu, 05 Feb 2015 09:00:44 -0500 Received: by mail-wg0-f43.google.com with SMTP id y19so7770379wgg.2 for ; Thu, 05 Feb 2015 06:00:43 -0800 (PST) Date: Thu, 5 Feb 2015 14:00:29 +0000 From: Stefan Hajnoczi Message-ID: <20150205140029.GF19277@stefanha-thinkpad.redhat.com> References: <54CBF2B2.20703@kamp.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="twz1s1Hj1O0rHoT0" Content-Disposition: inline In-Reply-To: <54CBF2B2.20703@kamp.de> Subject: Re: [Qemu-devel] value of VIRTQUEUE_MAX_SIZE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: Kevin Wolf , "Michael S. Tsirkin" , ming.lei@canonical.com, "qemu-devel@nongnu.org" , Max Reitz , Stefan Hajnoczi --twz1s1Hj1O0rHoT0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 30, 2015 at 10:08:02PM +0100, Peter Lieven wrote: > Just wondering if VIRTQUEUE_MAX_SIZE in include/hw/virtio/virtio.h should not be equal to IOV_MAX instead of the hardcoded 1024? The vring queue size is guest-visible to some extent (e.g. vring memory layout). Tying it to a constant that is defined by the host operating system could lead to problems (e.g. live migration between different hosts). Anyway, all of the virtio devices have a queue size that is less than or equal to VIRTQUEUE_MAX_SIZE (and there is an assertion to check this in virtio_add_queue()). Guests are supposed to honor the vring queue size, although indirect descriptors seem to be able to use up to VIRTQUEUE_MAX_SIZE according to my understanding of QEMU's virtio.c code. Why would you like to use IOV_MAX? Stefan --twz1s1Hj1O0rHoT0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU03d9AAoJEJykq7OBq3PIp5EIAMhaxiXmQfSWHTp6laeK0obV ZfS+zXTFAOyiBZWnGBrGaHQHETDP88jpgSinAxXIOYhoQggbDXba4jnkXvwa1rpD RkcuEZwhDT5zeIIWa1ilUrBvTUj31EzRxZQzZKf9h4Ay/O4xNd4x8Lw68L/KpHWH SgE0TGji/lPNXfvboEYiwpDT3xdQiuxZ1srE7NMya9m/NXyB2GfgYGdf6EugnPzt pXAA5449h5rCC4TTrjpS3MFuKu1BNc1v3pQQQGtw6ABSBI8rW7kl8tZ2p2Mlma8I CtYei9qDzU5WrAwmoK9uN0KM813OQne1vwY8gv6Lj2ZijpGjg12sYp4+se9ArZ4= =w0T8 -----END PGP SIGNATURE----- --twz1s1Hj1O0rHoT0--