KVM: arm/arm64: Avoid attempting to load timer vgic state without a vgic
authorChristoffer Dall <christoffer.dall@linaro.org>
Wed, 29 Nov 2017 16:05:16 +0000 (17:05 +0100)
committerChristoffer Dall <christoffer.dall@linaro.org>
Wed, 29 Nov 2017 17:17:47 +0000 (18:17 +0100)
commit22601127c0faa5db70ab88f23af11cb23c8f6cdf
tree672f81531c199e2d5d132f40a47fb4a24fb84ab4
parente3feebf81744acd8b581e5eb58a93e8fdcf042a5
KVM: arm/arm64: Avoid attempting to load timer vgic state without a vgic

The timer optimization patches inadvertendly changed the logic to always
load the timer state as if we have a vgic, even if we don't have a vgic.

Fix this by doing the usual irqchip_in_kernel() check and call the
appropriate load function.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
virt/kvm/arm/arch_timer.c