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 6/6] CCW: Make it very clear that CCW channel commands are big-endian.


Noone is likely to get confused, but let's be explicit since the rest of
the spec is little-endian.

Signed-off-by: Rusty Russell <rusty@au1.ibm.com>
---
 virtio-v1.0-wd01-part1-specification.txt | 20 ++++++++++++--------
 1 file changed, 12 insertions(+), 8 deletions(-)

diff --git a/virtio-v1.0-wd01-part1-specification.txt b/virtio-v1.0-wd01-part1-specification.txt
index 096993e..6024f85 100644
--- a/virtio-v1.0-wd01-part1-specification.txt
+++ b/virtio-v1.0-wd01-part1-specification.txt
@@ -1516,6 +1516,10 @@ discoverable via standard operating system algorithms, and adding
 virtio support is mainly a question of supporting a new control
 unit type.
 
+As the S/390 is a big endian machine, these channel commands are
+big-endian: this is made clear by use of the types be16, be32 and
+be64.
+
 2.3.3.1. Basic Concepts
 -----------------------
 
@@ -1555,8 +1559,8 @@ CCW_CMD_READ_VQ_CONF is issued by the guest to obtain information
 about a queue. It uses the following structure for communicating:
 
 struct vq_config_block {
-	__u16 index;
-	__u16 max_num;
+	be16 index;
+	be16 max_num;
 } __attribute__ ((packed));
 
 The requested number of buffers for queue index is returned in
@@ -1567,10 +1571,10 @@ host about the location used for its queue. The transmitted
 structure is
 
 struct vq_info_block {
-	__u64 queue;
-	__u32 align;
-	__u16 index;
-	__u16 num;
+	be64 queue;
+	be32 align;
+	be16 index;
+	be16 num;
 } __attribute__ ((packed));
 
 queue contains the guest address for queue index. The actual
@@ -1615,8 +1619,8 @@ The CCW commands dealing with features use the following
 communication block:
 
 struct virtio_feature_desc {
-	__u32 features;
-	__u8 index;
+	be32 features;
+	u8 index;
 } __attribute__ ((packed));
 
 features are the 32 bits of features currently accessed, while
-- 
1.8.1.2



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