]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm/arm64: Provide a get_input_level for the arch timer
authorChristoffer Dall <christoffer.dall@linaro.org>
Fri, 27 Oct 2017 17:34:30 +0000 (19:34 +0200)
committerChristoffer Dall <christoffer.dall@linaro.org>
Tue, 2 Jan 2018 09:05:46 +0000 (10:05 +0100)
commit3e2ab0226feb4ed6e14e162edc76351d55cd81cd
tree251fb5e5b0cf45a93e56fd8bf92687340752e4ff
parent926d6e1acde61bc52a7e81f493ad13d871e5f203
KVM: arm/arm64: Provide a get_input_level for the arch timer

The VGIC can now support the life-cycle of mapped level-triggered
interrupts, and we no longer have to read back the timer state on every
exit from the VM if we had an asserted timer interrupt signal, because
the VGIC already knows if we hit the unlikely case where the guest
disables the timer without ACKing the virtual timer interrupt.

This means we rework a bit of the code to factor out the functionality
to snapshot the timer state from vtimer_save_state(), and we can reuse
this functionality in the sync path when we have an irqchip in
userspace, and also to support our implementation of the
get_input_level() function for the timer.

This change also means that we can no longer rely on the timer's view of
the interrupt line to set the active state, because we no longer
maintain this state for mapped interrupts when exiting from the guest.
Instead, we only set the active state if the virtual interrupt is
active, and otherwise we simply let the timer fire again and raise the
virtual interrupt from the ISR.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
include/kvm/arm_arch_timer.h
virt/kvm/arm/arch_timer.c