OASIS Virtual I/O Device (VIRTIO) TC

 View Only
Expand all | Collapse all

[OASIS Issue Tracker] (VIRTIO-87) Limit descriptor chain length to Queue Num even with INDIRECT

  • 1.  [OASIS Issue Tracker] (VIRTIO-87) Limit descriptor chain length to Queue Num even with INDIRECT

    Posted 03-18-2014 23:57
    Rusty Russell created VIRTIO-87: ----------------------------------- Summary: Limit descriptor chain length to Queue Num even with INDIRECT Key: VIRTIO-87 URL: https://tools.oasis-open.org/issues/browse/VIRTIO-87 Project: OASIS Virtual I/O Device (VIRTIO) TC Issue Type: Bug Reporter: Rusty Russell Assignee: Rusty Russell The Linux driver limits this similarly, for example. Let's put this in the spec, since it provides a mechanism for the device to limit max desc size. We can always add a feature to extend this in future. -- This message was sent by Atlassian JIRA (v6.1.1#6155)


  • 2.  [PATCH] VIRTIO-87: limit descriptor chain length even with INDIRECT.

    Posted 03-19-2014 06:43
    Signed-off-by: Rusty Russell <rusty@au1.ibm.com> diff --git a/content.tex b/content.tex index 58c3ebc..1a518c8 100644 --- a/content.tex +++ b/content.tex @@ -404,7 +404,7 @@ struct virtq_desc { end{lstlisting} The number of descriptors in the table is defined by the queue size -for this virtqueue. +for this virtqueue: this is the maximum possible descriptor chain length. egin{note} The legacy hyperref[intro:Virtio PCI Draft]{[Virtio PCI Draft]} @@ -456,6 +456,9 @@ VIRTIO_F_INDIRECT_DESC feature was negotiated. The driver MUST NOT set the VIRTQ_DESC_F_INDIRECT flag within an indirect descriptor (ie. only one table per descriptor). +A driver MUST NOT create a descriptor chain longer than the Queue Size of +the device. + devicenormative{paragraph}{Indirect Descriptors}{Basic Facilities of a Virtio Device / Virtqueues / The Virtqueue Descriptor Table / Indirect Descriptors} The device MUST ignore the write-only flag (field{flags}&VIRTQ_DESC_F_WRITE) in the descriptor that refers to an indirect table.