Re: [patch, 2.6.10-rc3] safe_hlt() & NMIs

From: Ingo Molnar
Date: Thu Dec 16 2004 - 10:16:25 EST



* Maciej W. Rozycki <macro@xxxxxxxxxxxxxx> wrote:

> On Thu, 16 Dec 2004, Ingo Molnar wrote:
>
> > c0125ee9: 1529 fa cli
> > ^---------------------------------- # of profiler hits
> > c0125eea: 507 fb sti
> > c0125eeb: 0 fa cli
> > c0125eec: 3719 fb sti
> > c0125eed: 0 fa cli
> > c0125eee: 1579 fb sti
> > c0125eef: 0 fa cli
> > c0125ef0: 3317 fb sti
> > c0125ef1: 0 fa cli
> > c0125ef2: 3030 fb sti
> > c0125ef3: 0 fa cli
> > c0125ef4: 2497 fa cli
> > c0125ef5: 1055 fb sti
> > c0125ef6: 0 fa cli
> [...]
> > the 'cli' is always a 'black hole' to the NMI, while the second of two
> > consecutive cli's are not.
>
> It looks like the 'sti' is actually the black hole -- remember
> interrupts are traps, that is they are probed for and taken after
> instruction execution.

The 'sti' "shadows" the cli, i.e. we'll never get an interrupt that gets
inbetween 'sti;cli'. I.e. sti is the black-hole generator, and 'cli' is
in the black hole. In that sense the 'cli' is in a black hole to the
NMI: the NMI will never see cli as the 'next to be executed'
instruction.

Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/