]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/TimerDxe: remove workaround for KVM timer handling
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 15 Mar 2018 10:13:01 +0000 (10:13 +0000)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 19 Apr 2018 08:15:37 +0000 (10:15 +0200)
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 b1a633434ddc.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
ArmPkg/Drivers/TimerDxe/TimerDxe.c
ArmPkg/Library/ArmGenericTimerVirtCounterLib/ArmGenericTimerVirtCounterLib.c

index a3202fa056f3026cd1c6ab3781649923d848d62c..bd616d2efc732b384c697e3bc567648cbc473b74 100644 (file)
@@ -337,7 +337,6 @@ TimerInterruptHandler (
 \r
     // Set next compare value\r
     ArmGenericTimerSetCompareVal (CompareValue);\r
-    ArmGenericTimerEnableTimer ();\r
     ArmInstructionSynchronizationBarrier ();\r
   }\r
 \r
index 69a4ceb62db616dfeaec9e54fe57679811778e11..c941895a3574b0246a8718e3ee3ef02db664deda 100644 (file)
@@ -26,16 +26,6 @@ ArmGenericTimerEnableTimer (
 \r
   TimerCtrlReg = ArmReadCntvCtl ();\r
   TimerCtrlReg |= ARM_ARCH_TIMER_ENABLE;\r
-\r
-  //\r
-  // When running under KVM, we need to unmask the interrupt on the timer side\r
-  // as KVM will mask it when servicing the interrupt at the hypervisor level\r
-  // and delivering the virtual timer interrupt to the guest. Otherwise, the\r
-  // interrupt will fire again, trapping into the hypervisor again, etc. etc.\r
-  // This is scheduled to be fixed on the KVM side, but there is no harm in\r
-  // leaving this in once KVM gets fixed.\r
-  //\r
-  TimerCtrlReg &= ~ARM_ARCH_TIMER_IMASK;\r
   ArmWriteCntvCtl (TimerCtrlReg);\r
 }\r
 \r