• Home
  • Raw
  • Download

Lines Matching full:nmi

984  * only on return from non-NMI IST interrupts that came
1150 * the iretq it performs will take us out of NMI context.
1152 * NMI is using the top of the stack of the previous NMI. We
1153 * can't let it execute because the nested NMI will corrupt the
1154 * stack of the previous NMI. NMI handlers are not re-entrant
1161 * is an NMI stack.
1162 * If the variable is not set and the stack is not the NMI
1168 * o Continue processing the NMI
1169 * If the variable is set or the previous stack is the NMI stack:
1171 * o return back to the first NMI
1173 * Now on exit of the first NMI, we first clear the stack variable
1174 * The NMI stack will tell any nested NMIs at that point that it is
1176 * a nested NMI that updated the copy interrupt stack frame, a
1178 * NMI.
1196 * NMI from user mode. We need to run on the thread stack, but we
1203 * stacks lest we corrupt the "NMI executing" variable.
1228 * done with the NMI stack.
1253 * | "NMI executing" variable |
1257 * | iret RFLAGS } by a nested NMI to force another |
1263 * | outermost RFLAGS } NMI processing is done. |
1275 * That will either return for real or it will loop back into NMI
1284 * Determine whether we're a nested NMI.
1287 * end_repeat_nmi, then we are a nested NMI. We must not
1289 * the outer NMI. That's okay; the outer NMI handler is
1291 * resume the outer NMI.
1303 * Now check "NMI executing". If it's set, then we're nested.
1304 * This will not detect if we interrupted an outer NMI just
1311 * Now test if the previous stack was an NMI stack. This covers
1312 * the case where we interrupt an outer NMI after it clears
1313 * "NMI executing" but before IRET. We need to be careful, though:
1314 * there is one case in which RSP could point to the NMI stack
1315 * despite there being no NMI active: naughty userspace controls
1320 * "NMI executing".
1323 /* Compare the NMI stack (rdx) with the stack we came from (4*8(%rsp)) */
1325 /* If the stack pointer is above the NMI stack, this is a normal NMI */
1330 /* If it is below the NMI stack, it is a normal NMI */
1333 /* Ah, it is within the NMI stack. */
1338 /* This is a nested NMI. */
1343 * iteration of NMI handling.
1366 /* Make room for "NMI executing". */
1399 * If there was a nested NMI, the first NMI's iret will return
1401 * nested NMI. The nested NMI checks the interrupted RIP to see
1403 * it will just return, as we are about to repeat an NMI anyway.
1405 * NMI will update.
1408 * we're repeating an NMI, gsbase has the same value that it had on
1410 * gsbase if needed before we call exc_nmi(). "NMI executing"
1413 movq $1, 10*8(%rsp) /* Set "NMI executing". */
1429 * Everything below this point can be preempted by a nested NMI.
1430 * If this happens, then the inner NMI will change the "iret"
1437 * as we should not be calling schedule in NMI context.
1438 * Even with normal interrupts enabled. An NMI should not be
1486 * Clear "NMI executing". Set DF first so that we can easily
1495 movq $0, 5*8(%rsp) /* clear "NMI executing" */
1499 * NMI in kernel after user state is restored. For an unprivileged user
1504 * iretq reads the "iret" frame and exits the NMI stack in a