From: Christian Schoenebeck <qemu_oss@crudebyte.com>
To: Halil Pasic <pasic@linux.ibm.com>
Cc: Cornelia Huck <cohuck@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>,
virtio-comment@lists.oasis-open.org, Greg Kurz <groug@kaod.org>,
Dominique Martinet <asmadeus@codewreck.org>
Subject: [virtio-comment] Re: [PATCH v2 4/4] Add CCW configuration field "indirect_num" to vq_info_block
Date: Fri, 11 Mar 2022 13:09:27 +0100 [thread overview]
Message-ID: <9413181.TekCvJBtHg@silver> (raw)
In-Reply-To: <20220311121540.6255545d.pasic@linux.ibm.com>
On Freitag, 11. März 2022 12:15:40 CET Halil Pasic wrote:
> But let me take a step back, and ask some more general questions?
> 1) What is the objective behind the mechanism which can be used by the
> driver to tell the device its maximum. I believe the indirect descriptor
> table is always allocated by the guest, so the guest has no reason to
> fear larger than its max. The only thing I can think of is some pools
> of buffers allocated and maintained by the device, where each buffer
> is the size of max payload. Is this what we have in mind here?
As described at the end on the associated virtio-spec github issue [1]:
"
Linux drivers
Since torvalds/linux@44ed808 the Linux kernel ignores if individual drivers
exceed the Queue Size (and violating the specs). Likewise there are some
devices which use device specific config to negotiate a max. bulk data size
being lower than the Queue Size. The proposed spec changes would address
both use cases in a clean way.
QEMU
QEMU tolerates as well if guests drivers exceed the Queue Size. However
currently it has a hard coded limit of max. 1024 memory segments:
#define VIRTQUEUE_MAX_SIZE 1024
Which limits the max. buik data size per virtio message to slightly below
4MB
"
So ATM when you run a Linux driver that exceeds QEMU's current limit of 1024
segments, you would get the following fatal QEMU error [2]:
qemu-system-x86_64: virtio: too many write descriptors in indirect table
QEMU currently allocates the required space for the descriptors on the stack
and uses that hard coded value for the allocation size. Now even if you would
change that (which is a delicate bunch of code), you would still break
compatibility with Linux guests running on older QEMU hosts.
[1] https://github.com/oasis-tcs/virtio-spec/issues/122
[2] https://lore.kernel.org/netdev/cover.1640870037.git.linux_oss@crudebyte.com/
> 2) Not so long ago we had a discussion about introducing a common (device
> agnostic) configuration space (a.k.a. misc config). The indirect table
> size might be a good candidate for that as well. We essentially want
> the very same functionality for all the transports, it is just that
> we have no vehicle at the moment to do this in an uniform way. Opinions?
>
> Regards,
> Halil
I need to leave that to other people to comment on, as I am completely unaware
about these plans. Sounds like a long-term plan to me though.
Best regards,
Christian Schoenebeck
This publicly archived list offers a means to provide input to the
OASIS Virtual I/O Device (VIRTIO) TC.
In order to verify user consent to the Feedback License terms and
to minimize spam in the list archive, subscription is required
before posting.
Subscribe: virtio-comment-subscribe@lists.oasis-open.org
Unsubscribe: virtio-comment-unsubscribe@lists.oasis-open.org
List help: virtio-comment-help@lists.oasis-open.org
List archive: https://lists.oasis-open.org/archives/virtio-comment/
Feedback License: https://www.oasis-open.org/who/ipr/feedback_license.pdf
List Guidelines: https://www.oasis-open.org/policies-guidelines/mailing-lists
Committee: https://www.oasis-open.org/committees/virtio/
Join OASIS: https://www.oasis-open.org/join/
next prev parent reply other threads:[~2022-03-11 12:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 16:22 [virtio-comment] [PATCH v2 0/4] Add VIRTIO_RING_F_INDIRECT_SIZE and queue_indirect_size Christian Schoenebeck
2022-02-21 16:25 ` [virtio-comment] [PATCH v2 1/4] Add VIRTIO_RING_F_INDIRECT_SIZE Christian Schoenebeck
2022-03-10 14:57 ` Stefan Hajnoczi
2022-03-10 16:20 ` Christian Schoenebeck
2022-02-21 16:27 ` [PATCH v2 2/4] Add PCI configuration field "queue_indirect_size" Christian Schoenebeck
2022-03-10 15:04 ` [virtio-comment] " Stefan Hajnoczi
2022-02-21 16:58 ` [PATCH v2 3/4] Add MMIO configuration register "QueueIndirectNum" Christian Schoenebeck
2022-03-10 15:23 ` Stefan Hajnoczi
2022-02-21 17:01 ` [PATCH v2 4/4] Add CCW configuration field "indirect_num" to vq_info_block Christian Schoenebeck
2022-03-10 15:26 ` Stefan Hajnoczi
2022-03-10 16:09 ` [virtio-comment] " Cornelia Huck
2022-03-11 8:53 ` Christian Schoenebeck
2022-03-11 9:21 ` [virtio-comment] " Cornelia Huck
2022-03-11 11:15 ` Halil Pasic
2022-03-11 12:09 ` Christian Schoenebeck [this message]
2022-03-10 16:09 ` Christian Schoenebeck
2022-03-09 14:58 ` [virtio-comment] [PATCH v2 0/4] Add VIRTIO_RING_F_INDIRECT_SIZE and queue_indirect_size Christian Schoenebeck
2022-03-10 15:35 ` Stefan Hajnoczi
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=9413181.TekCvJBtHg@silver \
--to=qemu_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=cohuck@redhat.com \
--cc=groug@kaod.org \
--cc=pasic@linux.ibm.com \
--cc=stefanha@redhat.com \
--cc=virtio-comment@lists.oasis-open.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 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.