aboutsummaryrefslogtreecommitdiff
path: root/include/hw/s390x
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2018-09-27 10:23:34 +0200
committerCornelia Huck <cohuck@redhat.com>2018-10-04 10:32:38 +0200
commit729315ebca0811c11e937d00231f8e05de5b446d (patch)
tree3982ce59ae7062907955724ef7b3a8754a7e4f7c /include/hw/s390x
parent3b8afb41bc8eef42c3e2d3ed78ca5fe94ebe76e8 (diff)
downloadqemu-729315ebca0811c11e937d00231f8e05de5b446d.zip
qemu-729315ebca0811c11e937d00231f8e05de5b446d.tar.gz
qemu-729315ebca0811c11e937d00231f8e05de5b446d.tar.bz2
hw/s390x/css: Remove QEMU_PACKED from struct SenseId
The uint16_t member cu_type of struct SenseId is not naturally aligned, and since the struct is marked with QEMU_PACKED, this can lead to unaligned memory accesses - which does not work on architectures like Sparc. Thus remove the QEMU_PACKED here and rather copy the struct byte by byte when we do copy_sense_id_to_guest(). Signed-off-by: Thomas Huth <thuth@redhat.com> Message-Id: <1538036615-32542-3-git-send-email-thuth@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'include/hw/s390x')
-rw-r--r--include/hw/s390x/css.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h
index 9da5912..bec82d0 100644
--- a/include/hw/s390x/css.h
+++ b/include/hw/s390x/css.h
@@ -48,7 +48,7 @@ typedef struct SenseId {
uint8_t unused; /* padding byte */
/* extended part */
CIW ciw[MAX_CIWS]; /* variable # of CIWs */
-} QEMU_PACKED SenseId;
+} SenseId; /* Note: No QEMU_PACKED due to unaligned members */
/* Channel measurements, from linux/drivers/s390/cio/cmf.c. */
typedef struct CMB {