From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH 12/19] KVM: PPC: Book3S HV: record guest queue page address Date: Mon, 4 Feb 2019 16:15:48 +1100 Message-ID: <20190204051548.GE1927@umbus.fritz.box> References: <20190107184331.8429-1-clg@kaod.org> <20190107184331.8429-13-clg@kaod.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jTMWTj4UTAEmbWeb" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org To: =?iso-8859-1?Q?C=E9dric?= Le Goater Return-path: Content-Disposition: inline In-Reply-To: <20190107184331.8429-13-clg@kaod.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" List-Id: kvm.vger.kernel.org --jTMWTj4UTAEmbWeb Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 07, 2019 at 07:43:24PM +0100, C=E9dric Le Goater wrote: > The guest physical address of the event queue will be part of the > state to transfer in the migration. Cache its value when the queue is > configured, it will save us an OPAL call. That doesn't sound like a very compelling case - migration is already a hundreds of milliseconds type operation, I wouldn't expect a few extra OPAL calls to be an issue. >=20 > Signed-off-by: C=E9dric Le Goater > --- > arch/powerpc/include/asm/xive.h | 2 ++ > arch/powerpc/kvm/book3s_xive_native.c | 4 ++++ > 2 files changed, 6 insertions(+) >=20 > diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/x= ive.h > index 7a7aa22d8258..e90c3c5d9533 100644 > --- a/arch/powerpc/include/asm/xive.h > +++ b/arch/powerpc/include/asm/xive.h > @@ -74,6 +74,8 @@ struct xive_q { > u32 esc_irq; > atomic_t count; > atomic_t pending_count; > + u64 guest_qpage; > + u32 guest_qsize; > }; > =20 > /* Global enable flags for the XIVE support */ > diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/boo= k3s_xive_native.c > index 35d806740c3a..4ca75aade069 100644 > --- a/arch/powerpc/kvm/book3s_xive_native.c > +++ b/arch/powerpc/kvm/book3s_xive_native.c > @@ -708,6 +708,10 @@ static int kvmppc_h_int_set_queue_config(struct kvm_= vcpu *vcpu, > } > qaddr =3D page_to_virt(page) + (qpage & ~PAGE_MASK); > =20 > + /* Backup queue page address and size for migration */ > + q->guest_qpage =3D qpage; > + q->guest_qsize =3D qsize; > + > rc =3D xive_native_configure_queue(xc->vp_id, q, priority, > (__be32 *) qaddr, qsize, true); > if (rc) { --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --jTMWTj4UTAEmbWeb Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlxXyoEACgkQbDjKyiDZ s5KikA//YK3VIaauh55+vCxTD6veg+pvjhIR70gtNpSox8nKA8uYAe9edGvbqKy2 zrD+YR5zvhDl3LiQGN+CMPy57hmxriWKydb9nKnNjR1lyEdoqwP9QOV1meSORh+T MulbEgLyU39zFdeXEO9tOEDVNxCyF+P6HfBzqQdWDs3jfMtyZqVbMrbk2gMWuH6W gpfNLiECna3t1AEPKf4kntVAAC3FsEDuqrCzfAJhxUjBT0nwvGNGnQrdVQx2Zyfm u+kQWeIAzOs+7tlkvdwgaHCW9zvTBaE/gdW9KefvCg7EpkQTVE14eaVd5hEWbZWS uV62XwhpS3Uqz5a4Trqwv/G+jQTcOWnDePefVOntUMkaW9W/06vYWtiIX41eeEy2 8GUCSI7W91TtGPmgQtYeoKFr/qp8iffSAku9k2WteX32lTJLOWhSRX88RtwS/UAl aUXYi2VsuHp09s5qXxCCXdO5Ark7MAaHmzY9HhR2DOo+KCaA9Y22WlhbXDaXHt4u EWGE5cet3/JvDPk5RlRBaQlaxbeCH7YGONI/YtxULl8bWO5mZuqhnv1Nc4Ytv89a 1sVjkUyaSpem4+lXz6CW67PBvStOvq8q3blPkHRqHNWZkeVJ0yb6b6cUn70t6OTw CsgmKhDd6SPcwPegGrmO7Uq3OGcdsNRBLNr5hxoBvHTM3Nf5PV8= =155r -----END PGP SIGNATURE----- --jTMWTj4UTAEmbWeb--