We observed systems going dark on kexec, due to corruption of the new
kernel's text (and sometimes the initrd). This was eventually determined
to be caused by the vLPI pending tables used by the GIC in the previous
kernel, which were not being quiesced properly.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
cpu_hyp_uninit(NULL);
}
+void kvm_arch_shutdown(void)
+{
+ kvm_vgic_v3_shutdown();
+}
+
#ifdef CONFIG_CPU_PM
static int hyp_init_cpu_pm_notifier(struct notifier_block *self,
unsigned long cmd,
dist->its_vm.vpes[i]->irq));
}
+void kvm_vgic_v3_shutdown(void)
+{
+ struct kvm *kvm;
+
+ if (!kvm_vgic_global_state.has_gicv4_1)
+ return;
+
+ mutex_lock(&kvm_lock);
+ list_for_each_entry(kvm, &vm_list, vm_list) {
+ unmap_all_vpes(kvm);
+ }
+ mutex_unlock(&kvm_lock);
+}
+
/*
* vgic_v3_save_pending_tables - Save the pending tables into guest RAM
* kvm lock and all vcpu lock must be held
bool vgic_state_is_nested(struct kvm_vcpu *vcpu);
+void kvm_vgic_v3_shutdown(void);
+
/* CPU HP callbacks */
void kvm_vgic_cpu_up(void);
void kvm_vgic_cpu_down(void);