From 1da6ff099ef26e189229e493c28383e293fc0d39 Mon Sep 17 00:00:00 2001
From: "cornelia.huck" <cornelia.huck@0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652>
Date: Thu, 13 Feb 2014 09:55:30 +0000
Subject: ccw: padding annotations

Remove __packed__ annotation from all ccw structures that don't need it,
and make the length requirements explicit for those that do.

This is the part of the patch to resolve VIRTIO-56 that had been missed.

Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>

git-svn-id: https://tools.oasis-open.org/version-control/svn/virtio@249 0c8fb4dd-22a2-4bb5-bc14-6c75a5f43652
---
 content.tex | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'content.tex')

diff --git a/content.tex b/content.tex
index 0aed373..7e112c7 100644
--- a/content.tex
+++ b/content.tex
@@ -2107,7 +2107,7 @@ about a queue. It uses the following structure for communicating:
 struct vq_config_block {
         be16 index;
         be16 max_num;
-} __attribute__ ((packed));
+};
 \end{lstlisting}
 
 The requested number of buffers for queue \field{index} is returned in
@@ -2125,7 +2125,7 @@ struct vq_info_block {
         be16 num;
         be64 avail;
         be64 used;
-} __attribute__ ((packed));
+};
 \end{lstlisting}
 
 \field{desc}, \field{avail} and \field{used} contain the guest addresses for the descriptor table,
@@ -2144,7 +2144,7 @@ struct vq_info_block_legacy {
         be32 align;
         be16 index;
         be16 num;
-} __attribute__ ((packed));
+};
 \end{lstlisting}
 
 \field{queue} contains the guest address for queue \field{index}, \field{num} the number of buffers
@@ -2192,12 +2192,13 @@ communication block:
 struct virtio_feature_desc {
         le32 features;
         u8 index;
-} __attribute__ ((packed));
+};
 \end{lstlisting}
 
 \field{features} are the 32 bits of features currently accessed, while
 \field{index} describes which of the feature bit values is to be
-accessed.
+accessed. No padding is added at the end of the structure, it is
+exactly 5 bytes in length.
 
 The guest obtains the device's device feature set via the
 CCW_CMD_READ_FEAT command. The device stores the features at \field{index}
@@ -2293,6 +2294,9 @@ significant bit in the first byte is assigned the bit number 0.
 \field{isc} contains the I/O interruption subclass to be used for the adapter
 I/O interrupt. It MAY be different from the isc used by the proxy
 virtio-ccw device's subchannel.
+No padding is added at the end of the structure, it is exactly 25 bytes
+in length.
+
 
 If the driver has already set up classic queue indicators via the
 CCW_CMD_SET_IND command, the device MUST post a unit check with
-- 
cgit v1.2.3

