From: Thomas Huth <thuth@redhat.com>
To: Luca Bonissi <qemu@bonslack.org>, Laurent Vivier <laurent@vivier.eu>
Cc: qemu-devel@nongnu.org,
Richard Henderson <richard.henderson@linaro.org>,
Peter Maydell <peter.maydell@linaro.org>,
Stafford Horne <shorne@gmail.com>, Jia Liu <proljc@gmail.com>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
QEMU Trivial <qemu-trivial@nongnu.org>
Subject: Re: [PATCH] Fixed incorrect LLONG alignment for openrisc and cris
Date: Thu, 3 Aug 2023 06:42:33 +0200 [thread overview]
Message-ID: <044ceb14-e5cc-6d78-deaf-254dc3d1e170@redhat.com> (raw)
In-Reply-To: <8cca5c06-4df8-b7d4-4aee-f52f956437f8@bonslack.org>
On 03/08/2023 02.29, Luca Bonissi wrote:
> From: Luca Bonissi <qemu@bonslack.org>
> Date: Thu, 3 Aug 2023 02:15:57 +0200
> Subject: [PATCH] Fixed incorrect LLONG alignment for openrisc and cris
>
> 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>
> ---
> include/exec/user/abitypes.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> 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
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1770
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2023-08-03 4:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 0:29 [PATCH] Fixed incorrect LLONG alignment for openrisc and cris Luca Bonissi
2023-08-03 4:42 ` Thomas Huth [this message]
2023-08-05 6:58 ` Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=044ceb14-e5cc-6d78-deaf-254dc3d1e170@redhat.com \
--to=thuth@redhat.com \
--cc=edgar.iglesias@gmail.com \
--cc=laurent@vivier.eu \
--cc=peter.maydell@linaro.org \
--cc=proljc@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=qemu@bonslack.org \
--cc=richard.henderson@linaro.org \
--cc=shorne@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).