Re: [Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-12-10 Thread Peter Maydell
On Mon, 10 Dec 2018 at 13:32, Dr. David Alan Gilbert wrote: > Is the problem here that the field could actually be misaligned (on > any conceivable build) or is it just a matter of convincing clang it's > safe? This is mostly a "clang doesn't know that the struct field will actually always be 4 a

Re: [Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-12-10 Thread Dr. David Alan Gilbert
* Cornelia Huck (coh...@redhat.com) wrote: > On Mon, 10 Dec 2018 12:27:56 + > Peter Maydell wrote: > > > On Thu, 27 Sep 2018 at 09:25, Thomas Huth wrote: > > > > > > struct SubchDev embeds several other structures which are marked with > > > QEMU_PACKED. This causes the compiler to not care

Re: [Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-12-10 Thread Cornelia Huck
On Mon, 10 Dec 2018 12:27:56 + Peter Maydell wrote: > On Thu, 27 Sep 2018 at 09:25, Thomas Huth wrote: > > > > struct SubchDev embeds several other structures which are marked with > > QEMU_PACKED. This causes the compiler to not care for proper alignment > > of these structures. When we lat

Re: [Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-12-10 Thread Peter Maydell
On Thu, 27 Sep 2018 at 09:25, Thomas Huth wrote: > > struct SubchDev embeds several other structures which are marked with > QEMU_PACKED. This causes the compiler to not care for proper alignment > of these structures. When we later pass around pointers to the unaligned > struct members during mig

Re: [Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-09-27 Thread David Hildenbrand
On 27/09/2018 10:23, Thomas Huth wrote: > struct SubchDev embeds several other structures which are marked with > QEMU_PACKED. This causes the compiler to not care for proper alignment > of these structures. When we later pass around pointers to the unaligned > struct members during migration, this

[Qemu-devel] [PATCH v3 3/3] hw/s390x/ioinst: Fix alignment problem in struct SubchDev

2018-09-27 Thread Thomas Huth
struct SubchDev embeds several other structures which are marked with QEMU_PACKED. This causes the compiler to not care for proper alignment of these structures. When we later pass around pointers to the unaligned struct members during migration, this causes problems on host architectures like Spar