Skip to content

Commit

Permalink
KVM: arm/arm64: vgic-its: Invalidate MSI-LPI translation cache on dis…
Browse files Browse the repository at this point in the history
…abling LPIs

If a vcpu disables LPIs at its redistributor level, we need to make sure
we won't pend more interrupts. For this, we need to invalidate the LPI
translation cache.

Tested-by: Andre Przywara <[email protected]>
Reviewed-by: Eric Auger <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
  • Loading branch information
Marc Zyngier committed Aug 18, 2019
1 parent 0c14484 commit b4931af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion virt/kvm/arm/vgic/vgic-mmio-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ static void vgic_mmio_write_v3r_ctlr(struct kvm_vcpu *vcpu,

vgic_cpu->lpis_enabled = val & GICR_CTLR_ENABLE_LPIS;

if (was_enabled && !vgic_cpu->lpis_enabled)
if (was_enabled && !vgic_cpu->lpis_enabled) {
vgic_flush_pending_lpis(vcpu);
vgic_its_invalidate_cache(vcpu->kvm);
}

if (!was_enabled && vgic_cpu->lpis_enabled)
vgic_enable_lpis(vcpu);
Expand Down

0 comments on commit b4931af

Please sign in to comment.