[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-8.1.3 18/55] target/sparc: Clear may_lookup for npc == DYNAMIC_P
From: |
Michael Tokarev |
Subject: |
[Stable-8.1.3 18/55] target/sparc: Clear may_lookup for npc == DYNAMIC_PC |
Date: |
Thu, 9 Nov 2023 16:42:22 +0300 |
From: Richard Henderson <richard.henderson@linaro.org>
With pairs of jmp+rett, pc == DYNAMIC_PC_LOOKUP and
npc == DYNAMIC_PC. Make sure that we exit for interrupts.
Cc: qemu-stable@nongnu.org
Fixes: 633c42834c7 ("target/sparc: Introduce DYNAMIC_PC_LOOKUP")
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 930f1865cc654b637ffe1207fa5b44bf0a156279)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index bd877a5e4a..9074a90818 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -5664,10 +5664,10 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cs)
break;
}
+ may_lookup = true;
if (dc->pc & 3) {
switch (dc->pc) {
case DYNAMIC_PC_LOOKUP:
- may_lookup = true;
break;
case DYNAMIC_PC:
may_lookup = false;
@@ -5677,10 +5677,24 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cs)
}
} else {
tcg_gen_movi_tl(cpu_pc, dc->pc);
- may_lookup = true;
}
- save_npc(dc);
+ if (dc->npc & 3) {
+ switch (dc->npc) {
+ case JUMP_PC:
+ gen_generic_branch(dc);
+ break;
+ case DYNAMIC_PC:
+ may_lookup = false;
+ break;
+ case DYNAMIC_PC_LOOKUP:
+ break;
+ default:
+ g_assert_not_reached();
+ }
+ } else {
+ tcg_gen_movi_tl(cpu_npc, dc->npc);
+ }
if (may_lookup) {
tcg_gen_lookup_and_goto_ptr();
} else {
--
2.39.2
- [Stable-8.1.3 07/55] target/hexagon: avoid invalid escape in Python string, (continued)
- [Stable-8.1.3 07/55] target/hexagon: avoid invalid escape in Python string, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 12/55] linux-user/mips: fix abort on integer overflow, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 11/55] linux-user: Fixes for zero_bss, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 14/55] lasips2: LASI PS/2 devices are not user-createable, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 15/55] target/arm: Fix CNTPCT_EL0 trapping from EL0 when HCR_EL2.E2H is 0, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 16/55] hw/sd/sdhci: Block Size Register bits [14:12] is lost, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 21/55] block: Fix locking in media change monitor commands, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 20/55] misc/led: LED state is set opposite of what is expected, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 17/55] hw/rdma/vmw/pvrdma_cmd: Use correct struct in query_port(), Michael Tokarev, 2023/11/09
- [Stable-8.1.3 19/55] target/arm: Fix syndrome for FGT traps on ERET, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 18/55] target/sparc: Clear may_lookup for npc == DYNAMIC_PC,
Michael Tokarev <=
- [Stable-8.1.3 25/55] target/arm: Fix SVE STR increment, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 22/55] tests/tcg: Add -fno-stack-protector, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 23/55] qemu-img: rebase: stop when reaching EOF of old backing file, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 24/55] qemu-iotests: 024: add rebasing test case for overlay_size > backing_size, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 26/55] target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 28/55] vfio/pci: Fix buffer overrun when writing the VF token, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 27/55] util/uuid: Add UUID_STR_LEN definition, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 29/55] util/uuid: Remove UUID_FMT_LEN, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 30/55] i386/xen: Don't advertise XENFEAT_supervisor_mode_kernel, Michael Tokarev, 2023/11/09
- [Stable-8.1.3 35/55] hw/xen: take iothread mutex in xen_evtchn_reset_op(), Michael Tokarev, 2023/11/09