From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH 00/19] KVM: PPC: Book3S HV: add XIVE native exploitation mode Date: Thu, 7 Feb 2019 13:51:11 +1100 Message-ID: <20190207025111.GB22661@umbus.fritz.box> References: <20190107184331.8429-1-clg@kaod.org> <20190122044654.GA15124@blackberry> <2f9b4420-ef90-20b8-d31b-dc547a6aa6b4@kaod.org> <06b7c4d2-72ba-ca4f-aded-789280798136@kaod.org> <20190204053610.GK1927@umbus.fritz.box> <20190205221315.GB29038@blackberry> <20190206011800.GN22661@umbus.fritz.box> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="DaTEgnRu5pEC8TLg" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org To: =?iso-8859-1?Q?C=E9dric?= Le Goater Return-path: Content-Disposition: inline In-Reply-To: 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 --DaTEgnRu5pEC8TLg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 06, 2019 at 08:35:24AM +0100, C=E9dric Le Goater wrote: > On 2/6/19 2:18 AM, David Gibson wrote: > > On Wed, Feb 06, 2019 at 09:13:15AM +1100, Paul Mackerras wrote: > >> On Tue, Feb 05, 2019 at 12:31:28PM +0100, C=E9dric Le Goater wrote: > >>>>>> As for nesting, I suggest for the foreseeable future we stick to X= ICS > >>>>>> emulation in nested guests. > >>>>> > >>>>> ok. so no kernel_irqchip at all. hmm.=20 > >>> > >>> I was confused with what Paul calls 'XICS emulation'. It's not the QE= MU > >>> XICS emulated device but the XICS-over-XIVE KVM device, the KVM XICS= =20 > >>> device KVM uses when under a P9 processor.=20 > >> > >> Actually there are two separate implementations of XICS emulation in > >> KVM. The first (older) one is almost entirely a software emulation > >> but does have some cases where it accesses an underlying XICS device > >> in order to make some things faster (IPIs and pass-through of a device > >> interrupt to a guest). The other, newer one is the XICS-on-XIVE > >> emulation that Ben wrote, which uses the XIVE hardware pretty heavily. > >> My patch was about making the the older code work when there is no > >> XICS available to the host. > >=20 > > Ah, right. To clarify my earlier statements in light of this: > >=20 > > * We definitely want some sort of kernel-XICS available in a nested > > guest. AIUI, this is now accomplished, so, Yay! > >=20 > > * Implementing the L2 XICS in terms of L1's PAPR-XIVE would be a > > bonus, but it's a much lower priority. >=20 > Yes. In this case, the L1 KVM-HV should not advertise KVM_CAP_PPC_IRQ_XIVE > to QEMU which will restrict CAS to the XICS only interrupt mode. Uh... no... we shouldn't change what's available to the guest based on host configuration only. We should just stop advertising the CAP saying that *KVM implemented* is available so that qemu will fall back to userspace XIVE emulation. --=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 --DaTEgnRu5pEC8TLg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlxbnR8ACgkQbDjKyiDZ s5IuzBAAyBpvYb+cVNWgnlGNW2eEtdNPixG1B2SfMPkxhCbNceP5VUWFecFL8IVV g+40FNr6WExE2ap6uMoQfCFQj5oKqWWpEtxUzqWlJEaadVqeQaes5h9teXzDIEcx icnNf9XlveqvAoTND9n9d8HZFXtiXMQXhGaiskUUHrZ264GD3nriq0YnuSZ7hD6j YaRCPD/WFg9GlD5dP8QXwKAp+wQMFy852lmVALenfJhvSF+qSR1DU4aFWMXsjzsL 7xa8r36ODZ+yX0FOVJAKqCsnpeXMDDjScG9dnqF9dynH7RvscyCsp66Ga3mhtlP7 Ys8YKBHgSoOhqWevTaUjkmGuGOQ4dSLCvuZP70Xwa95yNzlu7CkloTNXyP8TVhsO JlGSWYcwH0+qtICb+LryzInZEoG8w1Man732cl5tHaXxD/vjqzkr5mIuOT6okbpe 237FQNETfdlcpVF8/hpNl5ldcyVTd5OlM739KtmSdMLWa9JuE48jHW2+307b1vFh jKZ7PnyoZOTyboDIAP4ACrvJpTGhBQtMODfqZaJbIcc84yL3Uy1kApskhRR/GBxi NbfScnNbhIjAl2zPgm4AiJWLNM6JcpeoHtPebNu9WQkhdsmMwTB/GNEM3WAoRRLN isg/zVGmQTPdh0FW4xpzWHeE72peUDlfBS/jfF+YH6/Tb6ujA40= =H9op -----END PGP SIGNATURE----- --DaTEgnRu5pEC8TLg-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Thu, 07 Feb 2019 02:51:11 +0000 Subject: Re: [PATCH 00/19] KVM: PPC: Book3S HV: add XIVE native exploitation mode Message-Id: <20190207025111.GB22661@umbus.fritz.box> MIME-Version: 1 Content-Type: multipart/mixed; boundary="DaTEgnRu5pEC8TLg" List-Id: References: <20190107184331.8429-1-clg@kaod.org> <20190122044654.GA15124@blackberry> <2f9b4420-ef90-20b8-d31b-dc547a6aa6b4@kaod.org> <06b7c4d2-72ba-ca4f-aded-789280798136@kaod.org> <20190204053610.GK1927@umbus.fritz.box> <20190205221315.GB29038@blackberry> <20190206011800.GN22661@umbus.fritz.box> In-Reply-To: To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org --DaTEgnRu5pEC8TLg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 06, 2019 at 08:35:24AM +0100, C=E9dric Le Goater wrote: > On 2/6/19 2:18 AM, David Gibson wrote: > > On Wed, Feb 06, 2019 at 09:13:15AM +1100, Paul Mackerras wrote: > >> On Tue, Feb 05, 2019 at 12:31:28PM +0100, C=E9dric Le Goater wrote: > >>>>>> As for nesting, I suggest for the foreseeable future we stick to X= ICS > >>>>>> emulation in nested guests. > >>>>> > >>>>> ok. so no kernel_irqchip at all. hmm.=20 > >>> > >>> I was confused with what Paul calls 'XICS emulation'. It's not the QE= MU > >>> XICS emulated device but the XICS-over-XIVE KVM device, the KVM XICS= =20 > >>> device KVM uses when under a P9 processor.=20 > >> > >> Actually there are two separate implementations of XICS emulation in > >> KVM. The first (older) one is almost entirely a software emulation > >> but does have some cases where it accesses an underlying XICS device > >> in order to make some things faster (IPIs and pass-through of a device > >> interrupt to a guest). The other, newer one is the XICS-on-XIVE > >> emulation that Ben wrote, which uses the XIVE hardware pretty heavily. > >> My patch was about making the the older code work when there is no > >> XICS available to the host. > >=20 > > Ah, right. To clarify my earlier statements in light of this: > >=20 > > * We definitely want some sort of kernel-XICS available in a nested > > guest. AIUI, this is now accomplished, so, Yay! > >=20 > > * Implementing the L2 XICS in terms of L1's PAPR-XIVE would be a > > bonus, but it's a much lower priority. >=20 > Yes. In this case, the L1 KVM-HV should not advertise KVM_CAP_PPC_IRQ_XIVE > to QEMU which will restrict CAS to the XICS only interrupt mode. Uh... no... we shouldn't change what's available to the guest based on host configuration only. We should just stop advertising the CAP saying that *KVM implemented* is available so that qemu will fall back to userspace XIVE emulation. --=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 --DaTEgnRu5pEC8TLg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlxbnR8ACgkQbDjKyiDZ s5IuzBAAyBpvYb+cVNWgnlGNW2eEtdNPixG1B2SfMPkxhCbNceP5VUWFecFL8IVV g+40FNr6WExE2ap6uMoQfCFQj5oKqWWpEtxUzqWlJEaadVqeQaes5h9teXzDIEcx icnNf9XlveqvAoTND9n9d8HZFXtiXMQXhGaiskUUHrZ264GD3nriq0YnuSZ7hD6j YaRCPD/WFg9GlD5dP8QXwKAp+wQMFy852lmVALenfJhvSF+qSR1DU4aFWMXsjzsL 7xa8r36ODZ+yX0FOVJAKqCsnpeXMDDjScG9dnqF9dynH7RvscyCsp66Ga3mhtlP7 Ys8YKBHgSoOhqWevTaUjkmGuGOQ4dSLCvuZP70Xwa95yNzlu7CkloTNXyP8TVhsO JlGSWYcwH0+qtICb+LryzInZEoG8w1Man732cl5tHaXxD/vjqzkr5mIuOT6okbpe 237FQNETfdlcpVF8/hpNl5ldcyVTd5OlM739KtmSdMLWa9JuE48jHW2+307b1vFh jKZ7PnyoZOTyboDIAP4ACrvJpTGhBQtMODfqZaJbIcc84yL3Uy1kApskhRR/GBxi NbfScnNbhIjAl2zPgm4AiJWLNM6JcpeoHtPebNu9WQkhdsmMwTB/GNEM3WAoRRLN isg/zVGmQTPdh0FW4xpzWHeE72peUDlfBS/jfF+YH6/Tb6ujA40= =H9op -----END PGP SIGNATURE----- --DaTEgnRu5pEC8TLg--