Skip to content

Commit

Permalink
KVM: arm/arm64: vgic-v2: Clear all dirty LRs
Browse files Browse the repository at this point in the history
When saving the state of the list registers, it is critical to
reset them zero, as we could otherwise leave unexpected EOI
interrupts pending for virtual level interrupts.

Cc: [email protected] # v4.6+
Signed-off-by: Christoffer Dall <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
  • Loading branch information
chazy committed May 31, 2016
1 parent 1a695a9 commit 4d3afc9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions virt/kvm/arm/hyp/vgic-v2-sr.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,11 @@ static void __hyp_text save_lrs(struct kvm_vcpu *vcpu, void __iomem *base)
if (!(vcpu->arch.vgic_cpu.live_lrs & (1UL << i)))
continue;

if (cpu_if->vgic_elrsr & (1UL << i)) {
if (cpu_if->vgic_elrsr & (1UL << i))
cpu_if->vgic_lr[i] &= ~GICH_LR_STATE;
continue;
}
else
cpu_if->vgic_lr[i] = readl_relaxed(base + GICH_LR0 + (i * 4));

cpu_if->vgic_lr[i] = readl_relaxed(base + GICH_LR0 + (i * 4));
writel_relaxed(0, base + GICH_LR0 + (i * 4));
}
}
Expand Down

0 comments on commit 4d3afc9

Please sign in to comment.