From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>, Greg Kurz <groug@kaod.org>
Subject: virtio 4M limit
Date: Fri, 01 Oct 2021 13:21:23 +0200 [thread overview]
Message-ID: <2311207.AWRhmksWK6@silver> (raw)
Hi Michael,
while testing the following kernel patches I realized there is currently a
size limitation of 4 MB with virtio on QEMU side:
https://lore.kernel.org/netdev/cover.1632327421.git.linux_oss@crudebyte.com/
So with those kernel patches applied I can mount 9pfs on Linux guest with the
9p 'msize' (maximum message size) option with a value of up to 4186112
successfully. If I try to go higher with 'msize' then the system would hang
with the following QEMU error:
qemu-system-x86_64: virtio: too many write descriptors in indirect table
Which apparently is due to the amount of scatter gather lists on QEMU virtio
side currently being hard coded to 1024 (i.e. multiplied by 4k page size => 4
MB):
./include/hw/virtio/virtio.h:
#define VIRTQUEUE_MAX_SIZE 1024
Is that hard coded limit carved into stone for some reason or would it be OK
if I change that into a runtime variable?
If that would be Ok, maybe something similar that I did with those kernel
patches, i.e. retaining 1024 as an initial default value and if indicated from
guest side that more is needed, increasing the SG list amount subsequently
according to whatever is needed by guest?
And as I am not too familiar with the virtio protocol, is that current limit
already visible to guest side? Because obviously it would make sense if I
change my kernel patches so that they automatically limit to whatever QEMU
supports instead of causing a hang.
Best regards,
Christian Schoenebeck
next reply other threads:[~2021-10-01 11:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 11:21 Christian Schoenebeck [this message]
2021-10-03 18:14 ` virtio 4M limit Christian Schoenebeck
2021-10-03 18:15 ` [PATCH] virtio: increase VIRTQUEUE_MAX_SIZE to 32k Christian Schoenebeck
2021-10-03 20:31 ` Michael S. Tsirkin
2021-10-03 20:27 ` virtio 4M limit Michael S. Tsirkin
2021-10-04 10:44 ` Christian Schoenebeck
2021-10-04 19:59 ` Michael S. Tsirkin
2021-10-04 20:10 ` Christian Schoenebeck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2311207.AWRhmksWK6@silver \
--to=qemu_oss@crudebyte.com \
--cc=groug@kaod.org \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).