Skip to contentSkip to conversation

powerpc/xive: record guest queue page address

RFC PATCH New Cédric Le Goater 1 participant 1 message Apr 23, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

RFC PATCH 13/16 powerpc/xive: record guest queue page address

The guest physical address of the event queue will be part of the state to transfer in the migration. Let's just record it when the queue is configured.

---
 arch/powerpc/include/asm/xive.h       | 1 +
 arch/powerpc/kvm/book3s_xive_native.c | 3 +++
 2 files changed, 4 insertions(+)
arch/powerpc/include/asm/xive.h +1 -0
index aef28248b5b7..4096e4164ada 100644
@@ -73,6 +73,7 @@ struct xive_q {
 	u32			esc_irq;
 	atomic_t		count;
 	atomic_t		pending_count;
+	u64			guest_qpage;
 };
 
 /* Global enable flags for the XIVE support */
arch/powerpc/kvm/book3s_xive_native.c +3 -0
index 789c137f6b31..d705de3c5d65 100644
@@ -693,6 +693,9 @@ static int kvmppc_h_int_set_queue_config(struct kvm_vcpu *vcpu,
 	}
 	qaddr = page_to_virt(page) + (qpage & ~PAGE_MASK);
 
+	/* Backup queue page guest address for migration */
+	q->guest_qpage = qpage;
+
 	rc = xive_native_configure_queue(xc->vp_id, q, priority,
 					 (__be32 *) qaddr, qsize, true);
 	if (rc) {
Signature · 1 line
2.13.6