All of lore.kernel.org
 help / color / mirror / Atom feed
* virtio 4M limit
@ 2021-10-01 11:21 Christian Schoenebeck
  2021-10-03 18:14 ` Christian Schoenebeck
  0 siblings, 1 reply; 8+ messages in thread
From: Christian Schoenebeck @ 2021-10-01 11:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael S. Tsirkin, Greg Kurz

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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-10-04 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-01 11:21 virtio 4M limit Christian Schoenebeck
2021-10-03 18:14 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.