From: Marc Zyngier Date: Wed, 22 May 2019 17:16:49 +0000 (+0100) Subject: KVM: arm/arm64: vgic-its: Invalidate MSI-LPI translation cache on disabling LPIs X-Git-Tag: v5.4-rc1~138^2~20^2~12 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b4931afcde1ffccd4a406009aef33c14bc6c6cb8;p=linux.git KVM: arm/arm64: vgic-its: Invalidate MSI-LPI translation cache on disabling 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 Reviewed-by: Eric Auger Signed-off-by: Marc Zyngier --- diff --git a/virt/kvm/arm/vgic/vgic-mmio-v3.c b/virt/kvm/arm/vgic/vgic-mmio-v3.c index c45e2d7e942f..fdcfb7ae4491 100644 --- a/virt/kvm/arm/vgic/vgic-mmio-v3.c +++ b/virt/kvm/arm/vgic/vgic-mmio-v3.c @@ -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);