FreeBSD/sys/x86/iommu/intel_fault.c
/*
 * Fault interrupt handling for DMARs.  If advanced fault logging is
 * not implemented by hardware, the code emulates it.  Fast interrupt
 * handler flushes the fault registers into circular buffer at
 * unit->fault_log, and schedules a task.
 *
 * The fast handler is used since faults usually come in bursts, and
 * number of fault log registers is limited, e.g. down to one for 5400
 * MCH.  We are trying to reduce the latency for clearing the fault
 * register file.  The task is usually long-running, since printf() is
 * slow, but this is not problematic because bursts are rare.
 *
 * For the same reason, each translation unit task is executed in its
 * own thread.
 *
 * XXXKIB It seems there is no hardware available which implements
 * advanced fault logging, so the code to handle AFL is not written.
 */
Fault interrupt handling for DMARs.  If advanced fault logging is
not implemented by hardware, the code emulates it.  Fast interrupt
handler flushes the fault registers into circular buffer at
unit->fault_log, and schedules a task.

The fast handler is used since faults usually come in bursts, and
number of fault log registers is limited, e.g. down to one for 5400
MCH.  We are trying to reduce the latency for clearing the fault
register file.  The task is usually long-running, since printf() is
slow, but this is not problematic because bursts are rare.

For the same reason, each translation unit task is executed in its
own thread.

XXXKIB It seems there is no hardware available which implements
advanced fault logging, so the code to handle AFL is not written.
Fault interrupt handling for DMARs . If advanced fault logging is not implemented by hardware the code emulates it . Fast interrupt handler flushes the fault registers into circular buffer at unit - > fault_log and schedules a task . The fast handler is used since faults usually come in bursts and number of fault log registers is limited e . g . down to one for 5400 MCH . We are trying to reduce the latency for clearing the fault register file . The task is usually long - running since printf () is slow but this is not problematic because bursts are rare . For the same reason each translation unit task is executed in its own thread . XXXKIB It seems there is no hardware available which implements advanced fault logging so the code to handle AFL is not written .
static int
dmar_fault_next(struct dmar_unit *unit, int faultp)
{
	faultp += 2;
	if (faultp == unit->fault_log_size)
		faultp = 0;
	return (faultp);
}
static int dmar_fault_next ( struct dmar_unit * unit , int faultp ) { faultp += 2 ; if ( faultp == unit -> fault_log_size ) faultp = 0 ; return ( faultp ) ; }
Fault interrupt handling for DMARs.
Fault interrupt handling for DMARs .