Lines Matching refs:and
1 Entry/exit handling for exceptions, interrupts, syscalls and KVM
14 The update order depends on the transition type and is explained below in
15 the transition type sections: `Syscalls`_, `KVM`_, `Interrupts and regular
16 exceptions`_, `NMI and NMI-like exceptions`_.
22 for entry code before RCU starts watching and exit code after RCU stops
23 watching. In addition, many architectures must save and restore register state,
28 special section inaccessible to instrumentation and debug facilities. Some
30 noinstr and using instrumentation_begin() and instrumentation_end() to flag the
52 restrictions and is useful to protect e.g. state switching which would
55 All non-instrumentable entry/exit code sections before and after the RCU
61 Syscall-entry code starts in assembly code and calls out into low-level C code
62 after establishing low-level architecture-specific state and stack frames. This
88 and then invokes the various entry work functions like ptrace, seccomp, audit,
102 syscall_enter_from_user_mode() and syscall_exit_to_user_mode() are also
105 ensure that enter_from_user_mode() is called first on entry and
108 Do not nest syscalls. Nested systcalls will cause RCU and/or context tracking
116 guest and returns to the kernel on exit.
119 and kvm_guest_exit_irqoff() is the KVM variant of enter_from_user_mode().
128 Interrupts and regular exceptions
131 Interrupts entry and exit handling is slightly more complex than syscalls
132 and KVM transitions.
135 and exit handling is exactly the same as for syscalls.
137 If the interrupt is raised while the CPU executes in kernel space the entry and
140 already be watching. Lockdep and tracing have to be updated unconditionally.
142 irqentry_enter() and irqentry_exit() provide the implementation for this.
165 irq_enter_rcu() and irq_exit_rcu() pair.
168 return true, handles NOHZ tick state and interrupt time accounting. This
173 count update and eventually handles soft interrupts and NOHZ tick state.
177 code to be traced, while also maintaining symmetry with irq_exit_rcu() and
194 runs with local interrupts disabled. But NMIs can happen anytime, and a lot of
197 NMI and NMI-like exceptions
200 NMIs and NMI-like exceptions (machine checks, double faults, debug
201 interrupts, etc.) can hit any context and must be extra careful with
204 State changes for debug exceptions and machine-check exceptions depend on
209 NMIs and other NMI-like exceptions handle state transitions without
210 distinguishing between user-mode and kernel-mode origin.
224 operation on enter and the last operation on exit. The reason is that both
225 lockdep and RCU rely on in_nmi() returning true in this case. The
245 and for e.g. a debug exception it can look like this:
278 while handling an NMI. So NMI entry code has to be reentrant and state updates