From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Mon, 23 Apr 2018 16:43:38 +0000 Subject: [RFC PATCH 13/16] powerpc/xive: record guest queue page address Message-Id: <20180423164341.15767-14-clg@kaod.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: kvm-ppc@vger.kernel.org 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. Signed-off-by: C=C3=A9dric Le Goater --- arch/powerpc/include/asm/xive.h | 1 + arch/powerpc/kvm/book3s_xive_native.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/xiv= e.h index aef28248b5b7..4096e4164ada 100644 --- a/arch/powerpc/include/asm/xive.h +++ b/arch/powerpc/include/asm/xive.h @@ -73,6 +73,7 @@ struct xive_q { u32 esc_irq; atomic_t count; atomic_t pending_count; + u64 guest_qpage; }; =20 /* Global enable flags for the XIVE support */ diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/book3= s_xive_native.c index 789c137f6b31..d705de3c5d65 100644 --- a/arch/powerpc/kvm/book3s_xive_native.c +++ b/arch/powerpc/kvm/book3s_xive_native.c @@ -693,6 +693,9 @@ static int kvmppc_h_int_set_queue_config(struct kvm_vcp= u *vcpu, } qaddr =3D page_to_virt(page) + (qpage & ~PAGE_MASK); =20 + /* Backup queue page guest address for migration */ + q->guest_qpage =3D qpage; + rc =3D xive_native_configure_queue(xc->vp_id, q, priority, (__be32 *) qaddr, qsize, true); if (rc) { --=20 2.13.6