Skip to content

Commit 9f958c1

Browse files
committed
KVM: arm/arm64: vgic: Trust the LR state for HW IRQs
We were probing the physial distributor state for the active state of a HW virtual IRQ, because we had seen evidence that the LR state was not cleared when the guest deactivated a virtual interrupted. However, this issue turned out to be a software bug in the GIC, which was solved by: 84aab5e68c2a5e1e18d81ae8308c3ce25d501b29 (KVM: arm/arm64: arch_timer: Preserve physical dist. active state on LR.active, 2015-11-24) Therefore, get rid of the complexities and just look at the LR. Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
1 parent 0e3dfda commit 9f958c1

1 file changed

Lines changed: 2 additions & 14 deletions

File tree

virt/kvm/arm/vgic.c

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,25 +1417,13 @@ static bool vgic_process_maintenance(struct kvm_vcpu *vcpu)
14171417
static bool vgic_sync_hwirq(struct kvm_vcpu *vcpu, int lr, struct vgic_lr vlr)
14181418
{
14191419
struct vgic_dist *dist = &vcpu->kvm->arch.vgic;
1420-
struct irq_phys_map *map;
1421-
bool phys_active;
14221420
bool level_pending;
1423-
int ret;
14241421

14251422
if (!(vlr.state & LR_HW))
14261423
return false;
14271424

1428-
map = vgic_irq_map_search(vcpu, vlr.irq);
1429-
BUG_ON(!map);
1430-
1431-
ret = irq_get_irqchip_state(map->irq,
1432-
IRQCHIP_STATE_ACTIVE,
1433-
&phys_active);
1434-
1435-
WARN_ON(ret);
1436-
1437-
if (phys_active)
1438-
return 0;
1425+
if (vlr.state & LR_STATE_ACTIVE)
1426+
return false;
14391427

14401428
spin_lock(&dist->lock);
14411429
level_pending = process_queued_irq(vcpu, lr, vlr);

0 commit comments

Comments
 (0)