qemu-patch-raspberry4/target
Peter Maydell 2c023d3675 target/arm: Use correct entrypoint for SVC taken from Hyp to Hyp
The exception caused by an SVC instruction may be taken to AArch32
Hyp mode for two reasons:
 * HCR.TGE indicates that exceptions from EL0 should trap to EL2
 * we were already in Hyp mode

The entrypoint in the vector table to be used differs in these two
cases: for an exception routed to Hyp mode from EL0, we enter at the
common 0x14 "hyp trap" entrypoint.  For SVC from Hyp mode to Hyp
mode, we enter at the 0x08 (svc/hvc trap) entrypoint.
In the v8A Arm ARM pseudocode this is done in AArch32.TakeSVCException.

QEMU incorrectly routed both of these exceptions to the 0x14
entrypoint.  Correct the entrypoint for SVC from Hyp to Hyp by making
use of the existing logic which handles "normal entrypoint for
Hyp-to-Hyp, otherwise 0x14" for traps like UNDEF and data/prefetch
aborts (reproduced here since it's outside the visible context
in the diff for this commit):

    if (arm_current_el(env) != 2 && addr < 0x14) {
        addr = 0x14;
    }

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20220117131953.3936137-1-peter.maydell@linaro.org
2022-01-28 14:30:36 +00:00
..
alpha exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
arm target/arm: Use correct entrypoint for SVC taken from Hyp to Hyp 2022-01-28 14:30:36 +00:00
avr target/avr: Drop checks for singlestep_enabled 2021-10-15 16:39:14 -07:00
cris exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
hexagon target/hexagon/cpu.h: don't include qemu-common.h 2021-12-15 10:35:26 +00:00
hppa exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
i386 KVM: x86: ignore interrupt_bitmap field of KVM_GET/SET_SREGS 2022-01-12 14:09:06 +01:00
m68k target/m68k: don't word align SP in stack frame if M68K_FEATURE_UNALIGNED_DATA feature enabled 2022-01-09 12:05:02 +01:00
microblaze target/microblaze: Do not set MO_ALIGN for user-only 2021-11-02 07:00:52 -04:00
mips target/mips: Extract trap code into env->error_code 2022-01-11 18:40:44 +01:00
nios2 linux-user/nios2: Map a real kuser page 2022-01-06 11:40:52 +01:00
openrisc target/openrisc: Make openrisc_cpu_tlb_fill sysemu only 2021-11-02 07:00:52 -04:00
ppc target/ppc: Fix 7448 support 2022-01-18 12:56:30 +01:00
riscv target/riscv: Relax UXL field for debugging 2022-01-21 15:52:57 +10:00
rx target/rx/cpu.h: Don't include qemu-common.h 2021-12-15 10:35:26 +00:00
s390x s390x: sigp: Reorder the SIGP STOP code 2022-01-18 15:00:57 +01:00
sh4 exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
sparc exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
tricore exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
xtensa exec/memop: Adding signedness to quad definitions 2022-01-08 15:46:10 +10:00
Kconfig meson: Introduce target-specific Kconfig 2021-07-09 18:21:34 +02:00
meson.build Drop the deprecated unicore32 target 2021-05-12 18:20:52 +02:00