mirror of https://github.com/acidanthera/audk.git
OvmfPkg: Send EOI before RestoreTPL() in timer interrupt handlers
Deferring the EOI until after the call to RestoreTPL() means that any
callbacks invoked by RestoreTPL() will run with timer interrupt
delivery disabled. If any such callbacks themselves rely on timers to
implement timeout loops, then the callbacks will get stuck in an
infinite loop from which the system will never recover.
This reverts commit 239b50a86
("OvmfPkg: End timer interrupt later to
avoid stack overflow under load").
Cc: Paolo Bonzini <pbonzini@redhat.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4162
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
This commit is contained in:
parent
bf65d7ee88
commit
9bf473da4c
|
@ -80,6 +80,8 @@ TimerInterruptHandler (
|
|||
|
||||
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||
|
||||
mLegacy8259->EndOfInterrupt (mLegacy8259, Efi8259Irq0);
|
||||
|
||||
if (mTimerNotifyFunction != NULL) {
|
||||
//
|
||||
// @bug : This does not handle missed timer interrupts
|
||||
|
@ -88,9 +90,6 @@ TimerInterruptHandler (
|
|||
}
|
||||
|
||||
gBS->RestoreTPL (OriginalTPL);
|
||||
|
||||
DisableInterrupts ();
|
||||
mLegacy8259->EndOfInterrupt (mLegacy8259, Efi8259Irq0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -62,6 +62,8 @@ TimerInterruptHandler (
|
|||
|
||||
OriginalTPL = gBS->RaiseTPL (TPL_HIGH_LEVEL);
|
||||
|
||||
SendApicEoi ();
|
||||
|
||||
if (mTimerNotifyFunction != NULL) {
|
||||
//
|
||||
// @bug : This does not handle missed timer interrupts
|
||||
|
@ -70,9 +72,6 @@ TimerInterruptHandler (
|
|||
}
|
||||
|
||||
gBS->RestoreTPL (OriginalTPL);
|
||||
|
||||
DisableInterrupts ();
|
||||
SendApicEoi ();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue