Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22601127 authored by Christoffer Dall's avatar Christoffer Dall
Browse files

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: default avatarChristoffer Dall <christoffer.dall@linaro.org>
parent e3feebf8
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -835,6 +835,9 @@ int kvm_timer_enable(struct kvm_vcpu *vcpu)
no_vgic:
	preempt_disable();
	timer->enabled = 1;
	if (!irqchip_in_kernel(vcpu->kvm))
		kvm_timer_vcpu_load_user(vcpu);
	else
		kvm_timer_vcpu_load_vgic(vcpu);
	preempt_enable();