[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.6 10/37] Fixed incorrect LLONG alignment for openrisc and cr
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.6 10/37] Fixed incorrect LLONG alignment for openrisc and cris |
Date: |
Sat, 9 Sep 2023 16:04:40 +0300 |
From: Luca Bonissi <qemu@bonslack.org>
OpenRISC (or1k) has long long alignment to 4 bytes, but currently not
defined in abitypes.h. This lead to incorrect packing of /epoll_event/
structure and eventually infinite loop while waiting for file
descriptor[s] event[s].
Fixed also CRIS alignments (1 byte for all types).
Signed-off-by: Luca Bonissi <qemu@bonslack.org>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1770
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(cherry picked from commit 6ee960823da8fd780ae9912c4327b7e85e80d846)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/include/exec/user/abitypes.h b/include/exec/user/abitypes.h
index 6191ce9f74..6178453d94 100644
--- a/include/exec/user/abitypes.h
+++ b/include/exec/user/abitypes.h
@@ -15,8 +15,16 @@
#define ABI_LLONG_ALIGNMENT 2
#endif
+#ifdef TARGET_CRIS
+#define ABI_SHORT_ALIGNMENT 1
+#define ABI_INT_ALIGNMENT 1
+#define ABI_LONG_ALIGNMENT 1
+#define ABI_LLONG_ALIGNMENT 1
+#endif
+
#if (defined(TARGET_I386) && !defined(TARGET_X86_64)) \
|| defined(TARGET_SH4) \
+ || defined(TARGET_OPENRISC) \
|| defined(TARGET_MICROBLAZE) \
|| defined(TARGET_NIOS2)
#define ABI_LLONG_ALIGNMENT 4
--
2.39.2
- [Stable-7.2.6 00/37] Patch Round-up for stable 7.2.6, freeze on 2023-09-19, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 01/37] machine: Add helpers to get cores/threads per socket, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 02/37] hw/smbios: Fix smbios_smp_sockets caculation, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 03/37] hw/smbios: Fix thread count in type4, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 04/37] hw/smbios: Fix core count in type4, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 05/37] dump: kdump-zlib data pages not dumped with pvtime/aarch64, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 06/37] hw/nvme: fix CRC64 for guard tag, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 07/37] linux-user/elfload: Set V in ELF_HWCAP for RISC-V, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 08/37] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for microblaze, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 09/37] include/exec/user: Set ABI_LLONG_ALIGNMENT to 4 for nios2, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 10/37] Fixed incorrect LLONG alignment for openrisc and cris,
Michael Tokarev <=
- [Stable-7.2.6 11/37] target/s390x: Fix the "ignored match" case in VSTRS, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 12/37] target/s390x: Use a 16-bit immediate in VREP, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 13/37] target/s390x: Fix VSTL with a large length, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 14/37] target/s390x: Check reserved bits of VFMIN/VFMAX's M5, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 15/37] include/hw/virtio/virtio-gpu: Fix virtio-gpu with blob on big endian hosts, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 16/37] kvm: Introduce kvm_arch_get_default_type hook, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 17/37] accel/kvm: Specify default IPA size for arm64, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 18/37] target/arm: Fix SME ST1Q, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 19/37] target/arm: Fix 64-bit SSRA, Michael Tokarev, 2023/09/09
- [Stable-7.2.6 20/37] docs/about/license: Update LICENSE URL, Michael Tokarev, 2023/09/09