|
|
@@ -1037,20 +1037,22 @@ void kvmppc_xive_cleanup_vcpu(struct kvm_vcpu *vcpu)
|
|
|
/* Mask the VP IPI */
|
|
|
xive_vm_esb_load(&xc->vp_ipi_data, XIVE_ESB_SET_PQ_01);
|
|
|
|
|
|
- /* Disable the VP */
|
|
|
- xive_native_disable_vp(xc->vp_id);
|
|
|
-
|
|
|
- /* Free the queues & associated interrupts */
|
|
|
+ /* Free escalations */
|
|
|
for (i = 0; i < KVMPPC_XIVE_Q_COUNT; i++) {
|
|
|
- struct xive_q *q = &xc->queues[i];
|
|
|
-
|
|
|
- /* Free the escalation irq */
|
|
|
if (xc->esc_virq[i]) {
|
|
|
free_irq(xc->esc_virq[i], vcpu);
|
|
|
irq_dispose_mapping(xc->esc_virq[i]);
|
|
|
kfree(xc->esc_virq_names[i]);
|
|
|
}
|
|
|
- /* Free the queue */
|
|
|
+ }
|
|
|
+
|
|
|
+ /* Disable the VP */
|
|
|
+ xive_native_disable_vp(xc->vp_id);
|
|
|
+
|
|
|
+ /* Free the queues */
|
|
|
+ for (i = 0; i < KVMPPC_XIVE_Q_COUNT; i++) {
|
|
|
+ struct xive_q *q = &xc->queues[i];
|
|
|
+
|
|
|
xive_native_disable_queue(xc->vp_id, q, i);
|
|
|
if (q->qpage) {
|
|
|
free_pages((unsigned long)q->qpage,
|