diff options
| author | Christoffer Dall <christoffer.dall@linaro.org> | 2018-01-26 10:20:22 -0500 |
|---|---|---|
| committer | Christoffer Dall <christoffer.dall@linaro.org> | 2018-01-31 04:10:49 -0500 |
| commit | cd15d2050c044ca9525ba165e9073ac8e036b8d0 (patch) | |
| tree | 1d5c9e38c4a3c7cd05ee21ee9544103a1371c919 /virt | |
| parent | f1d7231cede93a42d75b6d3c5ca599e94a273e89 (diff) | |
KVM: arm/arm64: Fixup userspace irqchip static key optimization
When I introduced a static key to avoid work in the critical path for
userspace irqchips which is very rarely used, I accidentally messed up
my logic and used && where I should have used ||, because the point was
to short-circuit the evaluation in case userspace irqchips weren't even
in use.
This fixes an issue when running in-kernel irqchip VMs alongside
userspace irqchip VMs.
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Fixes: c44c232ee2d3 ("KVM: arm/arm64: Avoid work when userspace iqchips are not used")
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Diffstat (limited to 'virt')
| -rw-r--r-- | virt/kvm/arm/arch_timer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c index 63cf828f3c4f..fb6bd9b9845e 100644 --- a/virt/kvm/arm/arch_timer.c +++ b/virt/kvm/arm/arch_timer.c | |||
| @@ -286,7 +286,7 @@ static void kvm_timer_update_irq(struct kvm_vcpu *vcpu, bool new_level, | |||
| 286 | trace_kvm_timer_update_irq(vcpu->vcpu_id, timer_ctx->irq.irq, | 286 | trace_kvm_timer_update_irq(vcpu->vcpu_id, timer_ctx->irq.irq, |
| 287 | timer_ctx->irq.level); | 287 | timer_ctx->irq.level); |
| 288 | 288 | ||
| 289 | if (!static_branch_unlikely(&userspace_irqchip_in_use) && | 289 | if (!static_branch_unlikely(&userspace_irqchip_in_use) || |
| 290 | likely(irqchip_in_kernel(vcpu->kvm))) { | 290 | likely(irqchip_in_kernel(vcpu->kvm))) { |
| 291 | ret = kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id, | 291 | ret = kvm_vgic_inject_irq(vcpu->kvm, vcpu->vcpu_id, |
| 292 | timer_ctx->irq.irq, | 292 | timer_ctx->irq.irq, |
