Re: local APIC may cause XFree86 hang

Linus Torvalds (torvalds@transmeta.com)
Wed, 13 Nov 2002 23:52:48 +0000 (UTC)


In article <15826.53818.621879.661253@kim.it.uu.se>,
Mikael Pettersson <mikpe@csd.uu.se> wrote:
>
>Does XFree86 (its core or particular drivers) use vm86() to
>invoke, possibly graphics card specific, BIOS code?
>That would explain the hangs I got. The fix would be to
>disable the local APIC around vm86()'s BIOS calls, just like
>we now disable it before APM suspend.

It does.

HOWEVER, vm86() mode is very very different from APM, which uses real
mode. External interrupts in vm86 mode will not be taken inside vm86
mode - and disabling the local timer (by disabling the APIC) around a
vm86 mode is definitely _not_ a good idea, since it would be an instant
denial-of-service attack on SMP machines (the PIT timer only goes to
CPU0, so we depend on the local timer to do process timeouts etc on
other CPUs). The vm86 code might just be looping forever.

In other words, if it is really vm86-related, then
(a) it's a CPU bug
(b) we're screwed

I bet it's something else. Possibly just timing-specific (the APIC
makes interrupts much faster), but also possibly something to do with
the VGA interrupt (some XFree86 drivers actually use the gfx interrupts
these days)

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