]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/TimerDxe: add workaround for KVM timer interrupt handling
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 18 Sep 2014 21:16:47 +0000 (21:16 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 18 Sep 2014 21:16:47 +0000 (21:16 +0000)
KVM on ARM currently masks the timer interrupt on the timer side when
delivering an interrupt to the guest. This itself is a workaround for an
issue where the interrupt is reraised and trapped by the host as soon as
the guest is entered, resulting in the guest being starved.

Work around this by calling ArmGenericTimerEnable () after servicing each
interrupt. The virtual version of ArmGenericTimerCounterLib will then
make sure to unmask the interrupt again.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16144 6f19259b-4bc3-4df7-8a09-765794883524

ArmPkg/Drivers/TimerDxe/TimerDxe.c

index 2efe0fe4933aa37c3c6a85705dbcb7867fa2d6f6..d0a819fc27298f5cda933f372e88f8968240648f 100644 (file)
@@ -337,6 +337,7 @@ TimerInterruptHandler (
 \r
     // Set next compare value\r
     ArmGenericTimerSetCompareVal (CompareValue);\r
+    ArmGenericTimerEnableTimer ();\r
   }\r
 \r
   // Enable timer interrupts\r