diff options
author | Christoffer Dall <christoffer.dall@linaro.org> | 2015-09-04 16:24:39 +0200 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2015-09-04 16:26:56 +0100 |
commit | 4ad9e16af36bbe8657aabe494ff912acbc213ce4 (patch) | |
tree | 86378d7e90070176a254c4fbb3682eb38cacd759 /virt/kvm | |
parent | 04bdfa8ab5bab929cc57f73952c503a88372601d (diff) | |
download | op-kernel-dev-4ad9e16af36bbe8657aabe494ff912acbc213ce4.zip op-kernel-dev-4ad9e16af36bbe8657aabe494ff912acbc213ce4.tar.gz |
arm/arm64: KVM: arch timer: Reset CNTV_CTL to 0
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 <lersek@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Drew Jones <drjones@redhat.com>
Cc: Wei Huang <wei@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/arm/arch_timer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 76e38d2..48c6e1a 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c @@ -200,6 +200,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. */ |