Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/mit/xen-include-public/dist/xen/include/public/...



details:   https://anonhg.NetBSD.org/src/rev/3a4ebac1a7ae
branches:  trunk
changeset: 930889:3a4ebac1a7ae
user:      jdolecek <jdolecek%NetBSD.org@localhost>
date:      Thu Apr 16 15:58:13 2020 +0000

description:
update padding within 'struct blkif_request_indirect' to be binary
compatible with Linux/i386 - they changed padding so that there is no
structure layout difference between i386 and amd64; there is no change
for amd64 due to implicit padding

since Linux seems to be the only xen blkback implementation supporting
indirect segments, follow that rather than public xen includes; note
their blkif_x86_32_request_indirect handling expect this layout,
particularly padding for i386 before indirect_grefs[]

diffstat:

 sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h |  12 +++++++--
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r badb98ed6abc -r 3a4ebac1a7ae sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h
--- a/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h    Thu Apr 16 15:47:19 2020 +0000
+++ b/sys/external/mit/xen-include-public/dist/xen/include/public/io/blkif.h    Thu Apr 16 15:58:13 2020 +0000
@@ -653,14 +653,20 @@
     uint8_t        operation;    /* BLKIF_OP_INDIRECT                    */
     uint8_t        indirect_op;  /* BLKIF_OP_{READ/WRITE}                */
     uint16_t       nr_segments;  /* number of segments                   */
+#ifndef __i386__
+    uint32_t      _pad1;
+#endif
     uint64_t       id;           /* private guest value, echoed in resp  */
     blkif_sector_t sector_number;/* start sector idx on disk (r/w only)  */
     blkif_vdev_t   handle;       /* same as for read/write requests      */
+    uint16_t       _pad2;
     grant_ref_t    indirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST];
-#ifdef __i386__
-    uint64_t       pad;          /* Make it 64 byte aligned on i386      */
+#ifndef __i386__
+    uint32_t       _pad3;        /* Make it 64 byte aligned */
+#else
+    uint64_t       _pad3;        /* Make it 64 byte aligned */
 #endif
-};
+} __packed;
 typedef struct blkif_request_indirect blkif_request_indirect_t;
 
 struct blkif_response {



Home | Main Index | Thread Index | Old Index