[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 06/34] target/ppc: Fix tlbie
From: |
Daniel Henrique Barboza |
Subject: |
[PULL 06/34] target/ppc: Fix tlbie |
Date: |
Thu, 26 May 2022 18:37:47 -0300 |
From: Leandro Lupori <leandro.lupori@eldorado.org.br>
Commit 74c4912f097bab98 changed check_tlb_flush() to use
tlb_flush_all_cpus_synced() instead of calling tlb_flush() on each
CPU. However, as side effect of this, a CPU executing a ptesync
after a tlbie will have its TLB flushed only after exiting its
current Translation Block (TB).
This causes memory accesses to invalid pages to succeed, if they
happen to be on the same TB as the ptesync.
To fix this, use tlb_flush_all_cpus() instead, that immediately
flushes the TLB of the CPU executing the ptesync instruction.
Fixes: 74c4912f097bab98 ("target/ppc: Fix synchronization of mttcg with
broadcast TLB flushes")
Signed-off-by: Leandro Lupori <leandro.lupori@eldorado.org.br>
Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Message-Id: <20220503163904.22575-1-leandro.lupori@eldorado.org.br>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
target/ppc/helper_regs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/helper_regs.c b/target/ppc/helper_regs.c
index 6159a15b7b..12235ea2e9 100644
--- a/target/ppc/helper_regs.c
+++ b/target/ppc/helper_regs.c
@@ -292,7 +292,7 @@ void check_tlb_flush(CPUPPCState *env, bool global)
if (global && (env->tlb_need_flush & TLB_NEED_GLOBAL_FLUSH)) {
env->tlb_need_flush &= ~TLB_NEED_GLOBAL_FLUSH;
env->tlb_need_flush &= ~TLB_NEED_LOCAL_FLUSH;
- tlb_flush_all_cpus_synced(cs);
+ tlb_flush_all_cpus(cs);
return;
}
--
2.36.1
- [PULL 00/34] ppc queue, Daniel Henrique Barboza, 2022/05/26
- [PULL 01/34] pseries: allow setting stdout-path even on machines with a VGA, Daniel Henrique Barboza, 2022/05/26
- [PULL 02/34] hw/ppc/e500: Remove unused BINARY_DEVICE_TREE_FILE, Daniel Henrique Barboza, 2022/05/26
- [PULL 03/34] spapr: Use address from elf parser for kernel address, Daniel Henrique Barboza, 2022/05/26
- [PULL 04/34] spapr/docs: Add a few words about x-vof, Daniel Henrique Barboza, 2022/05/26
- [PULL 05/34] mos6522: fix linking error when CONFIG_MOS6522 is not set, Daniel Henrique Barboza, 2022/05/26
- [PULL 06/34] target/ppc: Fix tlbie,
Daniel Henrique Barboza <=
- [PULL 07/34] target/ppc: Fix FPSCR.FI bit being cleared when it shouldn't, Daniel Henrique Barboza, 2022/05/26
- [PULL 09/34] target/ppc: Rename sfprf to sfifprf where it's also used as set fi flag, Daniel Henrique Barboza, 2022/05/26
- [PULL 10/34] pnv/xive2: Don't overwrite PC registers when writing TCTXT registers, Daniel Henrique Barboza, 2022/05/26
- [PULL 08/34] target/ppc: Fix FPSCR.FI changing in float_overflow_excp(), Daniel Henrique Barboza, 2022/05/26
- [PULL 11/34] target/ppc: declare darn32/darn64 helpers with TCG_CALL_NO_RWG, Daniel Henrique Barboza, 2022/05/26
- [PULL 13/34] target/ppc: use TCG_CALL_NO_RWG in BCD helpers, Daniel Henrique Barboza, 2022/05/26
- [PULL 15/34] target/ppc: Use TCG_CALL_NO_RWG_SE in fsel helper, Daniel Henrique Barboza, 2022/05/26
- [PULL 19/34] target/ppc: introduce do_va_helper, Daniel Henrique Barboza, 2022/05/26
- [PULL 20/34] target/ppc: declare vmsum[um]bm helpers with call flags, Daniel Henrique Barboza, 2022/05/26
- [PULL 12/34] target/ppc: use TCG_CALL_NO_RWG in vector helpers without env, Daniel Henrique Barboza, 2022/05/26