qemu-patch-raspberry4/hw/s390x
Thomas Huth 3b8afb41bc hw/s390x/ipl: Fix alignment problems of S390IPLState members
The IplParameterBlock and QemuIplParameters structures are declared with
QEMU_PACKED, so the compiler assumes that the structures do not need to
be aligned in memory. Since the are listed after a "bool" within the
S390IPLState, the IplParameterBlock and QemuIplParameters are also indeed
mis-aligned in memory. This causes problems on Sparc during migration, since
we use VMSTATE_UINT16 in vmstate_iplb to access the devno member for example,
and the corresponding migration functions (like qemu_get_be16s) then try to
access a 16-bit value from a misaligned memory address.
The easiest solution to fix this problem is to move the packed structures
to the beginning of the S390IPLState, right after the DeviceState of course
which has to stay first for QOM reasons. But since DeviceState is a non-packed
struct, we can be sure that it will be padded to the correct alignment at the
end. If not, the QEMU_BUILD_BUG_MSG in this patch will tell us.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1538036615-32542-2-git-send-email-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2018-10-04 10:32:38 +02:00
..
3270-ccw.c s390x: remove 's390-squash-mcss' option 2018-08-20 14:18:49 +02:00
ccw-device.c s390x/ccw: make sure all ccw devices are properly reset 2018-05-14 17:10:02 +02:00
ccw-device.h s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
css-bridge.c s390x: remove 's390-squash-mcss' option 2018-08-20 14:18:49 +02:00
css.c s390x: remove 's390-squash-mcss' option 2018-08-20 14:18:49 +02:00
event-facility.c hw/s390x: Allow to configure the consoles with the "-serial" parameter 2018-04-30 10:48:29 +02:00
ipl.c loader: Check access size when calling rom_ptr() to avoid crashes 2018-07-02 10:37:38 +02:00
ipl.h hw/s390x/ipl: Fix alignment problems of S390IPLState members 2018-10-04 10:32:38 +02:00
Makefile.objs hw/s390x: Move virtio-ccw-blk code to a separate file 2018-08-28 17:37:01 +02:00
s390-ccw.c s390x: remove 's390-squash-mcss' option 2018-08-20 14:18:49 +02:00
s390-pci-bus.c iommu: Add IOMMU index argument to translate method 2018-06-15 15:23:34 +01:00
s390-pci-bus.h s390x/pci: fixup global refresh 2018-02-09 09:37:13 +01:00
s390-pci-inst.c iommu: Add IOMMU index argument to notifier APIs 2018-06-15 15:23:34 +01:00
s390-pci-inst.h s390x/pci: rework PCI STORE BLOCK 2017-12-14 17:56:54 +01:00
s390-pci-stub.c s390x/pci: remove idx from msix msg data 2017-09-19 18:21:32 +02:00
s390-skeys-kvm.c s390x/s390-skeys: Mark the storage key devices with user_creatable = false 2017-08-30 18:23:25 +02:00
s390-skeys.c hw/s390x: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
s390-stattrib-kvm.c s390x/storage attributes: fix CMMA_BLOCK_SIZE usage 2018-07-11 14:36:54 +02:00
s390-stattrib.c s390x/storage attributes: fix CMMA_BLOCK_SIZE usage 2018-07-11 14:36:54 +02:00
s390-virtio-ccw.c s390x: remove 's390-squash-mcss' option 2018-08-20 14:18:49 +02:00
s390-virtio-hcall.c s390x: rename s390-virtio.h to s390-virtio-hcall.h 2017-09-19 18:31:31 +02:00
s390-virtio-hcall.h s390/kvm_virtio/linux-headers: remove traces of old virtio transport 2017-11-24 10:52:05 +01:00
sclp.c s390x/sclp: fix maxram calculation 2018-07-30 17:41:52 +02:00
sclpcpu.c s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
sclpquiesce.c s390x/sclp: clean up sclp masks 2018-03-08 15:49:23 +01:00
tod-kvm.c s390x/tod: factor out TOD into separate device 2018-07-02 10:37:38 +02:00
tod-qemu.c s390x/tcg: properly implement the TOD 2018-07-02 10:37:38 +02:00
tod.c s390x/tcg: properly implement the TOD 2018-07-02 10:37:38 +02:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
vhost-vsock-ccw.c hw/s390x: Move vhost-vsock-ccw code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-9p.c hw/s390x: Move virtio-ccw-9p code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-balloon.c hw/s390x: Move virtio-ccw-balloon code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-blk.c hw/s390x: Move virtio-ccw-blk code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-crypto.c hw/s390x: Move virtio-ccw-crypto code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-gpu.c hw/s390x: Move virtio-ccw-gpu code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-input.c hw/s390x: Move virtio-ccw-input code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-net.c hw/s390x: Move virtio-ccw-net code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-rng.c hw/s390x: Move virtio-ccw-rng code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-scsi.c hw/s390x: Move virtio-ccw-scsi code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw-serial.c hw/s390x: Move virtio-ccw-serial code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw.c hw/s390x: Move virtio-ccw-blk code to a separate file 2018-08-28 17:37:01 +02:00
virtio-ccw.h s390x/ccw: make sure all ccw devices are properly reset 2018-05-14 17:10:02 +02:00