mirror of https://github.com/acidanthera/audk.git
ArmPkg/TimerDxe: remove workaround for KVM timer handling
When we first ported EDK2 to KVM/arm, we implemented a workaround for
the quirky timer handling on the KVM side. This has been fixed in
Linux commit f120cd6533d2 ("KVM: arm/arm64: timer: Allow the timer to
control the active state") dated 23 June 2014, which was incorporated
into Linux release 4.3.
So almost 4 years later, it should be safe to drop this workaround on
the EDK2 side.
This reverts commit b1a633434d
.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This commit is contained in:
parent
3378782691
commit
411a373ed6
|
@ -337,7 +337,6 @@ TimerInterruptHandler (
|
||||||
|
|
||||||
// Set next compare value
|
// Set next compare value
|
||||||
ArmGenericTimerSetCompareVal (CompareValue);
|
ArmGenericTimerSetCompareVal (CompareValue);
|
||||||
ArmGenericTimerEnableTimer ();
|
|
||||||
ArmInstructionSynchronizationBarrier ();
|
ArmInstructionSynchronizationBarrier ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,16 +26,6 @@ ArmGenericTimerEnableTimer (
|
||||||
|
|
||||||
TimerCtrlReg = ArmReadCntvCtl ();
|
TimerCtrlReg = ArmReadCntvCtl ();
|
||||||
TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE;
|
TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE;
|
||||||
|
|
||||||
//
|
|
||||||
// When running under KVM, we need to unmask the interrupt on the timer side
|
|
||||||
// as KVM will mask it when servicing the interrupt at the hypervisor level
|
|
||||||
// and delivering the virtual timer interrupt to the guest. Otherwise, the
|
|
||||||
// interrupt will fire again, trapping into the hypervisor again, etc. etc.
|
|
||||||
// This is scheduled to be fixed on the KVM side, but there is no harm in
|
|
||||||
// leaving this in once KVM gets fixed.
|
|
||||||
//
|
|
||||||
TimerCtrlReg &= ~ARM_ARCH_TIMER_IMASK;
|
|
||||||
ArmWriteCntvCtl (TimerCtrlReg);
|
ArmWriteCntvCtl (TimerCtrlReg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue