From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH v2 06/16] KVM: PPC: Book3S HV: XIVE: add controls for the EQ configuration Date: Wed, 13 Mar 2019 15:03:27 +1100 Message-ID: <20190313040327.GK9881@umbus.fritz.box> References: <20190222112840.25000-1-clg@kaod.org> <20190222112840.25000-7-clg@kaod.org> <20190225023955.GJ7668@umbus.fritz.box> <9e732140-b2c0-dfb7-d753-ba0ec7f3b930@kaod.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vbzKE9fGfpHIBC6T" 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: <9e732140-b2c0-dfb7-d753-ba0ec7f3b930@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 --vbzKE9fGfpHIBC6T Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 12, 2019 at 06:00:38PM +0100, C=E9dric Le Goater wrote: > On 2/25/19 3:39 AM, David Gibson wrote: > > On Fri, Feb 22, 2019 at 12:28:30PM +0100, C=E9dric Le Goater wrote: > >> These controls will be used by the H_INT_SET_QUEUE_CONFIG and > >> H_INT_GET_QUEUE_CONFIG hcalls from QEMU. They will also be used to > >> restore the configuration of the XIVE EQs in the KVM device and to > >> capture the internal runtime state of the EQs. Both 'get' and 'set' > >> rely on an OPAL call to access from the XIVE interrupt controller the > >> EQ toggle bit and EQ index which are updated by the HW when event > >> notifications are enqueued in the EQ. > >> > >> The value of the guest physical address of the event queue is saved in > >> the XIVE internal xive_q structure for later use. That is when > >> migration needs to mark the EQ pages dirty to capture a consistent > >> memory state of the VM. > >> > >> To be noted that H_INT_SET_QUEUE_CONFIG does not require the extra > >> OPAL call setting the EQ toggle bit and EQ index to configure the EQ, > >> but restoring the EQ state will. >=20 > I think we need to add some kind of flags to differentiate the hcall > H_INT_SET_QUEUE_CONFIG from the restore of the EQ. The hcall does > not need OPAL support call and this could help in the code > transition. Hrm. What's the actual difference in the semantics between the two cases. The guest shouldn't have awareness of whether or not OPAL is involved. --=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 --vbzKE9fGfpHIBC6T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlyIgQ0ACgkQbDjKyiDZ s5L/1Q//erRNSYYxNvUsPx9AaPFsPgbBotmJDa0GleY/oU8MMPZ/78dWeL/Ytkl7 yHpzUHz6yJVjwpBaZSm9amNg5d+6rJbqkpzP4PoUzRcRvo7FQzQFkUgMCib0hSxD 8nyVZq9jnbzzY0QmOlufLE4JhAel2lKKmlz9rPD8Q7A/N0CGYLDMxccQCElHPwDD v82FC2fQxTMANpjhAMWKZ4NT1jeo4np81mBrxalObtBU4BbXmcLRfAe1lVbJPugm 6Y83JwwcJ/Jrt8kwq+CNpl8HqyyyUnibScShZr3MzXD6Iusn2pNK7KSAsUhmZbQA UDDkWhNVPvXFscCa8h/JmOUIbknfSE4BfD2aYiVqFqUxxzzPr7saIz3znluAo+Ho jvXE2h7kXe4yzsX9KJlLRgrTLncf73+Db4jJV8vUe/asIRmGvWV6PTNsceKWUPSa XpGvagmAqFUKNhQbdtKfYLPqWyiGg1cgmD5qMbe1iAkGJYwnTfAz+PjHULQbWEbT gA2X2FpM1e75GELhCVApEJDmBlLzRKotrhDbERlOZiLH9uIHmCMnVXWa6pTG6/Q+ H6ikPLSMRW9b+uioJMtNo8/n4ttojgHrJLOwuAGn2aF65WMTkOHtXc8Bcaaer1jf fNsS18QQ14cL47jGew2v7S9Z4Ijsz4wJR2scJVt0tqg+o9g4fPg= =LmHG -----END PGP SIGNATURE----- --vbzKE9fGfpHIBC6T-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Wed, 13 Mar 2019 04:03:27 +0000 Subject: Re: [PATCH v2 06/16] KVM: PPC: Book3S HV: XIVE: add controls for the EQ configuration Message-Id: <20190313040327.GK9881@umbus.fritz.box> MIME-Version: 1 Content-Type: multipart/mixed; boundary="vbzKE9fGfpHIBC6T" List-Id: References: <20190222112840.25000-1-clg@kaod.org> <20190222112840.25000-7-clg@kaod.org> <20190225023955.GJ7668@umbus.fritz.box> <9e732140-b2c0-dfb7-d753-ba0ec7f3b930@kaod.org> In-Reply-To: <9e732140-b2c0-dfb7-d753-ba0ec7f3b930@kaod.org> To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org --vbzKE9fGfpHIBC6T Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 12, 2019 at 06:00:38PM +0100, C=E9dric Le Goater wrote: > On 2/25/19 3:39 AM, David Gibson wrote: > > On Fri, Feb 22, 2019 at 12:28:30PM +0100, C=E9dric Le Goater wrote: > >> These controls will be used by the H_INT_SET_QUEUE_CONFIG and > >> H_INT_GET_QUEUE_CONFIG hcalls from QEMU. They will also be used to > >> restore the configuration of the XIVE EQs in the KVM device and to > >> capture the internal runtime state of the EQs. Both 'get' and 'set' > >> rely on an OPAL call to access from the XIVE interrupt controller the > >> EQ toggle bit and EQ index which are updated by the HW when event > >> notifications are enqueued in the EQ. > >> > >> The value of the guest physical address of the event queue is saved in > >> the XIVE internal xive_q structure for later use. That is when > >> migration needs to mark the EQ pages dirty to capture a consistent > >> memory state of the VM. > >> > >> To be noted that H_INT_SET_QUEUE_CONFIG does not require the extra > >> OPAL call setting the EQ toggle bit and EQ index to configure the EQ, > >> but restoring the EQ state will. >=20 > I think we need to add some kind of flags to differentiate the hcall > H_INT_SET_QUEUE_CONFIG from the restore of the EQ. The hcall does > not need OPAL support call and this could help in the code > transition. Hrm. What's the actual difference in the semantics between the two cases. The guest shouldn't have awareness of whether or not OPAL is involved. --=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 --vbzKE9fGfpHIBC6T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlyIgQ0ACgkQbDjKyiDZ s5L/1Q//erRNSYYxNvUsPx9AaPFsPgbBotmJDa0GleY/oU8MMPZ/78dWeL/Ytkl7 yHpzUHz6yJVjwpBaZSm9amNg5d+6rJbqkpzP4PoUzRcRvo7FQzQFkUgMCib0hSxD 8nyVZq9jnbzzY0QmOlufLE4JhAel2lKKmlz9rPD8Q7A/N0CGYLDMxccQCElHPwDD v82FC2fQxTMANpjhAMWKZ4NT1jeo4np81mBrxalObtBU4BbXmcLRfAe1lVbJPugm 6Y83JwwcJ/Jrt8kwq+CNpl8HqyyyUnibScShZr3MzXD6Iusn2pNK7KSAsUhmZbQA UDDkWhNVPvXFscCa8h/JmOUIbknfSE4BfD2aYiVqFqUxxzzPr7saIz3znluAo+Ho jvXE2h7kXe4yzsX9KJlLRgrTLncf73+Db4jJV8vUe/asIRmGvWV6PTNsceKWUPSa XpGvagmAqFUKNhQbdtKfYLPqWyiGg1cgmD5qMbe1iAkGJYwnTfAz+PjHULQbWEbT gA2X2FpM1e75GELhCVApEJDmBlLzRKotrhDbERlOZiLH9uIHmCMnVXWa6pTG6/Q+ H6ikPLSMRW9b+uioJMtNo8/n4ttojgHrJLOwuAGn2aF65WMTkOHtXc8Bcaaer1jf fNsS18QQ14cL47jGew2v7S9Z4Ijsz4wJR2scJVt0tqg+o9g4fPg= =LmHG -----END PGP SIGNATURE----- --vbzKE9fGfpHIBC6T--