zephyr/arch/xtensa/core
Daniel Leung d31ee53b60 xtensa: allow flushing auto-refill DTLBs on page table swap
This adds a new kconfig and corresponding code to allow flushing
auto-refill data TLBs when page tables are swapped (e.g. during
context switching). This is mainly used to avoid multi-hit TLB
exception raised by certain memory access pattern. If memory is
only marked for user mode access but not inside a memory domain,
accessing that page in kernel mode would result in a TLB being
filled with kernel ASID. When going back into user mode, access
to the memory would result in another TLB being filled with
the user mode ASID. Now there are two entries on the same memory
page, and the multi-hit TLB exception will be raised if that
memory page is accessed. This type of access is better served
using memory partition and memory domain to share data. However,
this type of access is not prohibited but highly discouraged.
Wrapping the code in kconfig is simply because of the execution
penalty as there will be unnecessary TLB refilling being done.
So only enable this if necessary.

Fixes #88772

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2025-05-28 20:01:58 +02:00
..
offsets xtensa: userspace: swap page tables via assembly code 2025-04-17 00:57:19 +02:00
startup
CMakeLists.txt xtensa: update HAL path for custom compilations 2025-05-09 08:23:09 +02:00
coredump.c
cpu_idle.c
crt1.S
debug_helpers_asm.S
elf.c style: add missing curly braces in if/while/for statements. 2025-05-17 14:10:33 +02:00
fatal.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
gdbstub.c xtensa: gdbstub: fix stack calculation 2025-05-13 18:38:12 +01:00
gen_vectors.py
gen_zsr.py xtensa: no need for flush register if threads are pin only 2025-04-17 00:57:19 +02:00
irq_manage.c
irq_offload.c
mem_manage.c
mmu.c xtensa: userspace: pre-compute MMU registers at domain init 2025-04-17 00:57:19 +02:00
mpu.c
prep_c.c xtensa: no need for flush register if threads are pin only 2025-04-17 00:57:19 +02:00
ptables.c xtensa: allow flushing auto-refill DTLBs on page table swap 2025-05-28 20:01:58 +02:00
README_MMU.txt
README_WINDOWS.rst
smp.c
syscall_helper.c xtensa: userspace: workaround return PC calc with loops 2025-04-17 00:57:19 +02:00
thread.c xtensa: userspace: prevent potential privilege escalation 2025-04-17 00:57:19 +02:00
timing.c
tls.c
userspace.S xtensa: allow flushing auto-refill DTLBs on page table swap 2025-05-28 20:01:58 +02:00
vector_handlers.c Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
window_vectors.S
xcc_stubs.c
xtensa_asm2_util.S xtensa: allow flushing auto-refill DTLBs on page table swap 2025-05-28 20:01:58 +02:00
xtensa_backtrace.c
xtensa_hifi.S
xtensa_intgen.py
xtensa_intgen.tmpl