qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/2] target/arm: Load correct half of 64-bit fields


From: Peter Maydell
Subject: Re: [PATCH 0/2] target/arm: Load correct half of 64-bit fields
Date: Tue, 2 May 2023 11:33:06 +0100

On Mon, 24 Apr 2023 at 16:39, Peter Maydell <peter.maydell@linaro.org> wrote:
>
> This patchset fixes a bug where on a big-endian 64-bit host the
> guest would crash immediately when it did an ERET. This happens
> because when we load the new PC value from CPUARMState::esr_el[2]
> we do a 32-bit load even though the struct field is 64 bits.
> So on 64-bit BE we use the wrong half of the register.
>
> Patch 1 defines a new macro to load the low 32 bits from a
> 64-bit field, and uses it in the two places where we got this
> wrong. Patch 2 adds some compile-time assertions to the
> existing load_cpu_field() and store_cpu_field() macros that
> catch inadvertent uses on struct fields of the wrong size.
>
> This fix is necessary to be able to run the avocado tests for
> the orangepi on a 64-bit BE system.

Applied to target-arm.next, adjusted to use sizeof_field().

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]