qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a65dab: target/arm: Fix Rt/Rt2 in ESR_ELx for


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a65dab: target/arm: Fix Rt/Rt2 in ESR_ELx for copro traps ...
Date: Wed, 05 Aug 2020 09:45:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a65dabf71a9f9b949d556b1b57fd72595df92398
      
https://github.com/qemu/qemu/commit/a65dabf71a9f9b949d556b1b57fd72595df92398
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M target/arm/helper.c

  Log Message:
  -----------
  target/arm: Fix Rt/Rt2 in ESR_ELx for copro traps from AArch32 to 64

When a coprocessor instruction in an  AArch32 guest traps to AArch32
Hyp mode, the syndrome register (HSR) includes Rt and Rt2 fields
which are simply copies of the Rt and Rt2 fields from the trapped
instruction.  However, if the instruction is trapped from AArch32 to
an AArch64 higher exception level, the Rt and Rt2 fields in the
syndrome register (ESR_ELx) must be the AArch64 view of the register.
This makes a difference if the AArch32 guest was in a mode other than
User or System and it was using r13 or r14, or if it was in FIQ mode
and using r8-r14.

We don't know at translate time which AArch32 CPU mode we are in, so
we leave the values we generate in our prototype syndrome register
value at translate time as the raw Rt/Rt2 from the instruction, and
instead correct them to the AArch64 view when we find we need to take
an exception from AArch32 to AArch64 with one of these syndrome
values.

Fixes: https://bugs.launchpad.net/qemu/+bug/1879587
Reported-by: Julien Freche <julien@bedrocksystems.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20200804193903.31240-1-peter.maydell@linaro.org


  Commit: e1d322c40524d2c544d1fcd37b267d106d16d328
      
https://github.com/qemu/qemu/commit/e1d322c40524d2c544d1fcd37b267d106d16d328
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-08-05 (Wed, 05 Aug 2020)

  Changed paths:
    M VERSION

  Log Message:
  -----------
  Update version for v5.1.0-rc3 release

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/348fcc4f7ace...e1d322c40524



reply via email to

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