Based on kernel version 6.11
. Page generated on 2024-09-24 08:21 EST
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | # # Feature name: membarrier-sync-core # Kconfig: ARCH_HAS_MEMBARRIER_SYNC_CORE # description: arch supports core serializing membarrier # # Architecture requirements # # * arm/arm64/powerpc/s390 # # Rely on implicit context synchronization as a result of exception return # when returning from IPI handler, and when returning to user-space. # # * riscv # # riscv uses xRET as return from interrupt and to return to user-space. # # Given that xRET is not core serializing, we rely on FENCE.I for providing # core serialization: # # - by calling sync_core_before_usermode() on return from interrupt (cf. # ipi_sync_core()), # # - via switch_mm() and sync_core_before_usermode() (respectively, for # uthread->uthread and kthread->uthread transitions) before returning # to user-space. # # The serialization in switch_mm() is activated by prepare_sync_core_cmd(). # # * x86 # # x86-32 uses IRET as return from interrupt, which takes care of the IPI. # However, it uses both IRET and SYSEXIT to go back to user-space. The IRET # instruction is core serializing, but not SYSEXIT. # # x86-64 uses IRET as return from interrupt, which takes care of the IPI. # However, it can return to user-space through either SYSRETL (compat code), # SYSRETQ, or IRET. # # Given that neither SYSRET{L,Q}, nor SYSEXIT, are core serializing, we rely # instead on write_cr3() performed by switch_mm() to provide core serialization # after changing the current mm, and deal with the special case of kthread -> # uthread (temporarily keeping current mm into active_mm) by issuing a # sync_core_before_usermode() in that specific case. # ----------------------- | arch |status| ----------------------- | alpha: | TODO | | arc: | TODO | | arm: | ok | | arm64: | ok | | csky: | TODO | | hexagon: | TODO | | loongarch: | TODO | | m68k: | TODO | | microblaze: | TODO | | mips: | TODO | | nios2: | TODO | | openrisc: | TODO | | parisc: | TODO | | powerpc: | ok | | riscv: | ok | | s390: | ok | | sh: | TODO | | sparc: | TODO | | um: | TODO | | x86: | ok | | xtensa: | TODO | ----------------------- |