projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
04bdfa8
)
arm/arm64: KVM: arch timer: Reset CNTV_CTL to 0
author
Christoffer Dall
<
[email protected]
>
Fri, 4 Sep 2015 14:24:39 +0000
(16:24 +0200)
committer
Marc Zyngier
<
[email protected]
>
Fri, 4 Sep 2015 15:26:56 +0000
(16:26 +0100)
Provide a better quality of implementation and be architecture compliant
on ARMv7 for the architected timer by resetting the CNTV_CTL to 0 on
reset of the timer.
This change alone fixes the UEFI reset issue reported by Laszlo back in
February.
Cc: Laszlo Ersek <
[email protected]
>
Cc: Ard Biesheuvel <
[email protected]
>
Cc: Drew Jones <
[email protected]
>
Cc: Wei Huang <
[email protected]
>
Cc: Peter Maydell <
[email protected]
>
Reviewed-by: Marc Zyngier <
[email protected]
>
Signed-off-by: Christoffer Dall <
[email protected]
>
Signed-off-by: Marc Zyngier <
[email protected]
>
virt/kvm/arm/arch_timer.c
patch
|
blob
|
history
diff --git
a/virt/kvm/arm/arch_timer.c
b/virt/kvm/arm/arch_timer.c
index 76e38d231e9959d085673b4eda7e4065f4a7fbb7..48c6e1ac6827f14be7eaede56bfd1ae3d185d217 100644
(file)
--- a/
virt/kvm/arm/arch_timer.c
+++ b/
virt/kvm/arm/arch_timer.c
@@
-199,6
+199,14
@@
int kvm_timer_vcpu_reset(struct kvm_vcpu *vcpu,
*/
timer->irq = irq;
+ /*
+ * The bits in CNTV_CTL are architecturally reset to UNKNOWN for ARMv8
+ * and to 0 for ARMv7. We provide an implementation that always
+ * resets the timer to be disabled and unmasked and is compliant with
+ * the ARMv7 architecture.
+ */
+ timer->cntv_ctl = 0;
+
/*
* Tell the VGIC that the virtual interrupt is tied to a
* physical interrupt. We do that once per VCPU.