summaryrefslogtreecommitdiffstats
path: root/virt/kvm/arm/vgic/vgic-init.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2020-04-23 16:27:33 +0100
committerMarc Zyngier <maz@kernel.org>2020-04-23 16:27:33 +0100
commit446c0768f5509793a0e527a439d4866b24707b0e (patch)
treeff8926db1a701b0276fb0deff6026956f632c961 /virt/kvm/arm/vgic/vgic-init.c
parent66f63474da4265f823503ea6b76037873d3f38fd (diff)
parent57bdb436ce869a45881d8aa4bc5dac8e072dd2b6 (diff)
downloadlinux-stable-446c0768f5509793a0e527a439d4866b24707b0e.tar.gz
linux-stable-446c0768f5509793a0e527a439d4866b24707b0e.tar.bz2
linux-stable-446c0768f5509793a0e527a439d4866b24707b0e.zip
Merge branch 'kvm-arm64/vgic-fixes-5.7' into kvmarm-master/master
Diffstat (limited to 'virt/kvm/arm/vgic/vgic-init.c')
-rw-r--r--virt/kvm/arm/vgic/vgic-init.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/virt/kvm/arm/vgic/vgic-init.c b/virt/kvm/arm/vgic/vgic-init.c
index a963b9d766b7..30dbec9fe0b4 100644
--- a/virt/kvm/arm/vgic/vgic-init.c
+++ b/virt/kvm/arm/vgic/vgic-init.c
@@ -348,6 +348,12 @@ void kvm_vgic_vcpu_destroy(struct kvm_vcpu *vcpu)
{
struct vgic_cpu *vgic_cpu = &vcpu->arch.vgic_cpu;
+ /*
+ * Retire all pending LPIs on this vcpu anyway as we're
+ * going to destroy it.
+ */
+ vgic_flush_pending_lpis(vcpu);
+
INIT_LIST_HEAD(&vgic_cpu->ap_list_head);
}
@@ -359,10 +365,10 @@ static void __kvm_vgic_destroy(struct kvm *kvm)
vgic_debug_destroy(kvm);
- kvm_vgic_dist_destroy(kvm);
-
kvm_for_each_vcpu(i, vcpu, kvm)
kvm_vgic_vcpu_destroy(vcpu);
+
+ kvm_vgic_dist_destroy(kvm);
}
void kvm_vgic_destroy(struct kvm *kvm)