OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: [PATCH] message framing: make ANY_LAYOUT implicit


This resolves issue VIRTIO-10

This also creates a new section for legacy feature
bits which will be handy for VIRTIO-13 if that is
accepted.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 virtio-v1.0-wd01-part1-specification.txt | 38 ++++++++++++++++++++++----------
 1 file changed, 26 insertions(+), 12 deletions(-)

diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt
index 2679b5b..bb75e35 100644
--- a/virtio-v1.0-wd01-part1-specification.txt
+++ b/virtio-v1.0-wd01-part1-specification.txt
@@ -312,8 +312,8 @@ It is assumed that the host is already aware of the guest endian.
 
 2.1.4.2. Message Framing
 -----------------------
-The original intent of the specification was that message framing (the
-particular layout of descriptors) be independent of the contents of
+Generally, the intent of the specification is for message framing (the
+particular layout of descriptors) to be independent of the contents of
 the buffers. For example, a network transmit buffer consists of a 12
 byte header followed by the network packet. This could be most simply
 placed in the descriptor table as a 12 byte output descriptor followed
@@ -322,16 +322,21 @@ single 1526 byte output descriptor in the case where the header and
 packet are adjacent, or even three or more descriptors (possibly with
 loss of efficiency in that case).
 
-Regrettably, initial driver implementations used simple layouts, and
-devices came to rely on it, despite this specification wording[10]. It
-is thus recommended that drivers be conservative in their assumptions,
-unless the VIRTIO_F_ANY_LAYOUT feature is accepted. In addition, some
+In addition, some
 implementations may have large-but-reasonable restrictions on total
 descriptor size (such as based on IOV_MAX in the host OS). This has
 not been a problem in practice: little sympathy will be given to
 drivers which create unreasonably-sized descriptors such as by
 dividing a network packet into 1500 single-byte descriptors!
 
+2.1.4.2.1. Legacy Interfaces: A Note on Message Framing
+-----------------------
+Regrettably, initial driver implementations used simple layouts, and
+devices came to rely on it, despite this specification wording[10]. It
+is thus recommended that when using legacy interfaces,
+drivers should be conservative in their assumptions,
+unless the VIRTIO_F_ANY_LAYOUT feature is accepted.
+
 2.1.4.3. The Virtqueue Descriptor Table
 --------------------------------------
 
@@ -2980,9 +2985,6 @@ Currently there are five device-independent feature bits defined:
   using a timer if the device interrupts it when all the packets
   are transmitted.
 
-  VIRTIO_F_ANY_LAYOUT (27) This feature indicates that the device accepts arbitrary
-  descriptor layouts, as described in Section "2.1.4.2. Message Framing".
-
   VIRTIO_F_RING_INDIRECT_DESC (28) Negotiating this feature indicates
   that the driver can use descriptors with the VRING_DESC_F_INDIRECT
   flag set, as described in "2.1.4.3.1. Indirect Descriptors".
@@ -3002,9 +3004,21 @@ Currently there are five device-independent feature bits defined:
   compliant with this specification, and acknowledged by all device
   drivers.
 
-In addition, bit 30 is used by qemu's implementation to check for experimental
-early versions of virtio which did not perform correct feature negotiation,
-and should not be used.
+2.5.1 Legacy Interface: A Note on Reserved Feature Bits
+-------------------------
+
+When used through the legacy interface, transitional
+devices should advertise and recognize the following
+feature bits:
+
+VIRTIO_F_ANY_LAYOUT (27) This feature indicates that the device accepts arbitrary
+descriptor layouts, as described in Section
+"2.1.4.2.1. Legacy Interfaces: A Note on Message Framing".
+
+VIRTIO_F_BAD_FEATURE (30) This bit is used by devices
+to check for experimental early versions of virtio
+drivers which did not perform correct feature negotiation,
+and should not be supported or activated by drivers.
 
 2.6. virtio_ring.h
 =================
-- 
MST


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]