Re: [RISC-V] [tech-fast-int] [RISC-V] [tech-privileged] Resumable NMI proposal


Jonathan Behrens <behrensj@...>
 



On Thu, Jan 28, 2021 at 7:05 PM Richard Trauben via lists.riscv.org <rtrauben=gmail.com@...> wrote:
1) Is anyone using non maskable
interrupt for anything other
than fatal conditions?

a) if so,why not just increase the range of interrupt
priority levels, relocate the maskable interrupt priority handlers to the lower portion,
convert non fatal NMI sources into
maskable interrupts in the upper portion of the range?

One case where NMIs are used on x86 for non-fatal conditions is for performance monitoring. If an operating system wants to accurately measure its own performance, then ideally it should be able to sample the current instruction pointer even during critical sections where interrupts are disabled.

A second case where this comes up is for watchdog timers. If an operating system wants to detect if it ever becomes deadlocked with interrupts disabled, it can schedule an NMI every few seconds and verify if there has been any forward progress since the last one. In this case, the NMI itself isn't fatal even though failing one of these liveness checks will likely trigger a reboot (but hopefully after saving some diagnostic information to find out what went wrong).

Join tech-privileged@lists.riscv.org to automatically receive all group messages.