OASIS Virtual I/O Device (VIRTIO) TC

 View Only
  • 1.  [PATCH v2 0/2] VIRTIO-58: clarify meaning of LEXX tags for transitional devices

    Posted 02-12-2014 10:05
    Here are 2 patches I propose to resolve https://tools.oasis-open.org/issues/browse/VIRTIO-58 Michael S. Tsirkin (2): introduction: document that leXX can mean guest endian-ness drop /* LEGACY version was not little endian */ content.tex 14 -------------- introduction.tex 8 +++++--- 2 files changed, 5 insertions(+), 17 deletions(-) -- MST


  • 2.  [PATCH v2 1/2] introduction: document that leXX can mean guest endian-ness

    Posted 02-12-2014 10:05
    It has a different meaning in the legacy environments, document this. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- introduction.tex 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/introduction.tex b/introduction.tex index ba57419..692e25b 100644 --- a/introduction.tex +++ b/introduction.tex @@ -41,8 +41,8 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S egin{longtable}{l p{5in}} phantomsectionlabel{intro:rfc2119} extbf{[RFC2119]} & S. Bradner, Key words for use in RFCs to Indicate Requirement Levels,
    ewlineurl{ http://www.ietf.org/rfc/rfc2119.txt} , March 1997\ - phantomsectionlabel{intro:S390 PoP} extbf{[S390 PoP]} & z/Architecture Principles of Operation, IBM Publication SA22-7832,
    ewlineurl{ http://publibfi.boulder.ibm.com/epubs/pdf/dz9zr009.pdf} , and any future revisions\ - phantomsectionlabel{intro:S390 Common I/O} extbf{[S390 Common I/O]} & ESA/390 Common I/O-Device and Self-Description, IBM Publication SA22-7204,
    ewlineurl{ http://publibfp.dhe.ibm.com/cgi-bin/bookmgr/BOOKS/dz9ar501/CCONTENTS} , and any future revisions\ + phantomsectionlabel{intro:S390 PoP} extbf{[S390 PoP]} & z/Architecture Principles of Operation,
    ewline IBM Publication SA22-7832\ + phantomsectionlabel{intro:S390 Common I/O} extbf{[S390 Common I/O]} & ESA/390 Common I/O-Device and Self-Description,
    ewline IBM Publication SA22-7204\ phantomsectionlabel{intro:PCI} extbf{[PCI]} & Conventional PCI Specifications,
    ewlineurl{ http://www.pcisig.com/specifications/conventional/} , @@ -68,7 +68,9 @@ conventions are used: item[u8, u16, u32, u64] An unsigned integer of the specified length in bits. item[le16, le32, le64] An unsigned integer of the specified length in bits, -in little-endian byte order. +in little-endian byte order; when used in a legacy environment - +an unsigned integer of the specified length in bits, in legacy +guest-endian byte order. item[be16, be32, be64] An unsigned integer of the specified length in bits, in big-endian byte order. -- MST


  • 3.  [PATCH v2 2/2] drop /* LEGACY version was not little endian */

    Posted 02-12-2014 10:05
    Two issues with the comment: - it mixes legacy documentation in main part of the spec - it says what format *isn't* - instead of what it *is* Now that we have documented that LE can mean legacy endian, there's no need for the comment. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> --- content.tex 14 -------------- 1 file changed, 14 deletions(-) diff --git a/content.tex b/content.tex index fcaacb7..18f2953 100644 --- a/content.tex +++ b/content.tex @@ -349,7 +349,6 @@ Drivers MUST NOT add a descriptor chain over than $2^{32}$ bytes long in total; this implies that loops in the descriptor chain are forbidden! egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct vring_desc { /* Address (guest-physical). */ le64 addr; @@ -410,7 +409,6 @@ the device MUST ignore the write-only flag (field{flags}&VRING_DESC_F_WRITE) i subsection{The Virtqueue Available Ring}label{sec:Basic Facilities of a Virtio Device / Virtqueues / The Virtqueue Available Ring} egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct vring_avail { #define VRING_AVAIL_F_NO_INTERRUPT 1 le16 flags; @@ -447,7 +445,6 @@ entirely. subsection{The Virtqueue Used Ring}label{sec:Basic Facilities of a Virtio Device / Virtqueues / The Virtqueue Used Ring} egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct vring_used { #define VRING_USED_F_NO_NOTIFY 1 le16 flags; @@ -456,7 +453,6 @@ struct vring_used { le16 avail_event; /* Only if VIRTIO_RING_F_EVENT_IDX */ }; -/* Note: LEGACY version was not little endian! */ /* le32 is used here for ids for padding reasons. */ struct vring_used_elem { /* Index of start of used descriptor chain. */ @@ -2583,7 +2579,6 @@ and transmitq0..transmitqN respectively; is negotiated. Legal values for this field are 1 to 0x8000. egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_net_config { u8 mac[6]; le16 status; @@ -2670,7 +2665,6 @@ placed in the receiveq0..receiveqN. In each case, the packet itself is preceeded by a header: egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_net_hdr { #define VIRTIO_NET_HDR_F_NEEDS_CSUM 1 u8 flags; @@ -2998,7 +2992,6 @@ queue incoming packets into one of the multiple receiveq0..receiveqN depending on the packet flow. egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_net_ctrl_mq { le16 virtqueue_pairs; }; @@ -3135,7 +3128,6 @@ present. The availability of the others all depend on various feature bits as indicated above. egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_blk_config { le64 capacity; le32 size_max; @@ -3394,7 +3386,6 @@ only exist if VIRTIO_CONSOLE_F_MULTIPORT is set. acknowledging the feature. egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_console_config { le16 cols; le16 rows; @@ -3471,7 +3462,6 @@ control sendq for driver-to-device messages. The layout of the control messages is: egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_console_control { le32 id; /* Port number */ le16 event; /* The kind of control event */ @@ -3688,7 +3678,6 @@ as follows: compatibility, unsupported statistics should be omitted. egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_balloon_stat { #define VIRTIO_BALLOON_S_SWAP_IN 0 #define VIRTIO_BALLOON_S_SWAP_OUT 1 @@ -3780,7 +3769,6 @@ targets that receive and process the requests. and field{cdb_size} are writable by the driver. egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_scsi_config { le32 num_queues; le32 seg_max; @@ -3865,7 +3853,6 @@ consumed with no order constraints. Requests have the following format: egin{lstlisting} -/* Note: LEGACY version was not little endian! */ struct virtio_scsi_req_cmd { // Device-readable part u8 lun[8]; @@ -4027,7 +4014,6 @@ The following commands are defined: #define VIRTIO_SCSI_T_TMF_QUERY_TASK 6 #define VIRTIO_SCSI_T_TMF_QUERY_TASK_SET 7 -/* Note: LEGACY version was not little endian! */ struct virtio_scsi_ctrl_tmf { // Device-readable part -- MST