From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Subject: Re: [PATCH v2 01/16] powerpc/xive: add OPAL extensions for the XIVE native exploitation support Date: Tue, 26 Feb 2019 15:21:45 +1100 Message-ID: <20190226042145.GP6872@umbus.fritz.box> References: <20190222112840.25000-1-clg@kaod.org> <20190222112840.25000-2-clg@kaod.org> <87y364jzlz.fsf@concordia.ellerman.id.au> <543ff6a2-b892-6710-d218-6aed1414840f@kaod.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="7PAM/4G1BR2SfWzg" Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras , Stewart Smith , linuxppc-dev@lists.ozlabs.org To: =?iso-8859-1?Q?C=E9dric?= Le Goater Return-path: Content-Disposition: inline In-Reply-To: <543ff6a2-b892-6710-d218-6aed1414840f@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 --7PAM/4G1BR2SfWzg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 25, 2019 at 11:11:58AM +0100, C=E9dric Le Goater wrote: > On 2/25/19 4:50 AM, Michael Ellerman wrote: > > C=E9dric Le Goater writes: > >=20 > >> The support for XIVE native exploitation mode in Linux/KVM needs a > >> couple more OPAL calls to configure the sPAPR guest and to get/set the > >> state of the XIVE internal structures. > >> > >> Signed-off-by: C=E9dric Le Goater > >> --- > >> arch/powerpc/include/asm/opal-api.h | 11 ++- > >> arch/powerpc/include/asm/opal.h | 7 ++ > >> arch/powerpc/include/asm/xive.h | 14 +++ > >> arch/powerpc/sysdev/xive/native.c | 99 +++++++++++++++++++ > >> .../powerpc/platforms/powernv/opal-wrappers.S | 3 + > >> 5 files changed, 130 insertions(+), 4 deletions(-) > >> > >> diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/includ= e/asm/opal-api.h > >> index 870fb7b239ea..cdfc54f78101 100644 > >> --- a/arch/powerpc/include/asm/opal-api.h > >> +++ b/arch/powerpc/include/asm/opal-api.h > >> @@ -186,8 +186,8 @@ > >> #define OPAL_XIVE_FREE_IRQ 140 > >> #define OPAL_XIVE_SYNC 141 > >> #define OPAL_XIVE_DUMP 142 > >> -#define OPAL_XIVE_RESERVED3 143 > >> -#define OPAL_XIVE_RESERVED4 144 > >> +#define OPAL_XIVE_GET_QUEUE_STATE 143 > >> +#define OPAL_XIVE_SET_QUEUE_STATE 144 > >> #define OPAL_SIGNAL_SYSTEM_RESET 145 > >> #define OPAL_NPU_INIT_CONTEXT 146 > >> #define OPAL_NPU_DESTROY_CONTEXT 147 > >> @@ -209,8 +209,11 @@ > >> #define OPAL_SENSOR_GROUP_ENABLE 163 > >> #define OPAL_PCI_GET_PBCQ_TUNNEL_BAR 164 > >> #define OPAL_PCI_SET_PBCQ_TUNNEL_BAR 165 > >> -#define OPAL_NX_COPROC_INIT 167 > >> -#define OPAL_LAST 167 > >> +#define OPAL_HANDLE_HMI2 166 > >> +#define OPAL_NX_COPROC_INIT 167 > >> +#define OPAL_NPU_SET_RELAXED_ORDER 168 > >> +#define OPAL_NPU_GET_RELAXED_ORDER 169 > >> +#define OPAL_XIVE_GET_VP_STATE 170 > >=20 > > You should only be defining the calls you need, leaving gaps for other > > things, and you need to retain OPAL_LAST. So it should look more like: > >=20 > > -#define OPAL_LAST 167 > > +#define OPAL_XIVE_GET_VP_STATE 170 > > +#define OPAL_LAST 170 > >=20 > >=20 > > Also I can't merge this until it's merged into skiboot. >=20 > OK. Let's start with skiboot. Yeah.. where are we at with skiboot in general. We can't test this downstream until we have a released skiboot with the necessary support. --=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 --7PAM/4G1BR2SfWzg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlx0vtkACgkQbDjKyiDZ s5LunhAAqdW4Vz1C1Rc/2lQE84WlVsoYlWX0JuiluSHCMF3M56Xq7YbFx4+8zNrq oVGVAhCLYvLKEvbpPFBhatrP0z81wNMFfi58dtJY8lmvcUiBiLkRe9exNMYACEGX WouMwpP1EcvfSFFWItnTZufSF2k52UnyktDrB9ndy7TylOT/BPN0ROTrvplEBS5x nA/J5j0Mzi3pEWJjryHfcCH2ira3PGULJ2q2k/xuvFafo4VqlqSv3nd6osAkHMXQ PWt/tEwgysPGWs0VAITImhW+N7L5W36bIl25CluG9kIghsq/bYaMo3TR2x8gqeB4 X4L0gvAsMusuBbycEtXXf5zA7er2ArdObuBgrksPVW7XgKsAhrSCGTKY8sgTZ/y2 hAGSKYVB93kF7M+a006iaUB6/MqsHqsEnSqlb2ZoJNpSQ60x5478wXSIaYqIzYcM 0LlHjkXu7CmVWdmilLJEN7CZp0xph7brGKIZL4PTO1UST/SpnY0l88iaEBVghRL6 cZqk/Tyq9qeeT5bby9/wJr9xvcSqEVp1F2cHIKtmKnjkuprjTqINIiAkAHMoCA5n LVaVNxS5MZbGR3rneetCquRYVuF366vpbV+8ynANy5daQnG3i5DvkHAleknvrOjJ TjWj871EiPaWrLwJRUbHNMBnTi3suWcUFn1Ac0Ct+/iJfFfq9C8= =rbBq -----END PGP SIGNATURE----- --7PAM/4G1BR2SfWzg-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Gibson Date: Tue, 26 Feb 2019 04:21:45 +0000 Subject: Re: [PATCH v2 01/16] powerpc/xive: add OPAL extensions for the XIVE native exploitation support Message-Id: <20190226042145.GP6872@umbus.fritz.box> MIME-Version: 1 Content-Type: multipart/mixed; boundary="7PAM/4G1BR2SfWzg" List-Id: References: <20190222112840.25000-1-clg@kaod.org> <20190222112840.25000-2-clg@kaod.org> <87y364jzlz.fsf@concordia.ellerman.id.au> <543ff6a2-b892-6710-d218-6aed1414840f@kaod.org> In-Reply-To: <543ff6a2-b892-6710-d218-6aed1414840f@kaod.org> To: =?iso-8859-1?Q?C=E9dric?= Le Goater Cc: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, Paul Mackerras , Stewart Smith , linuxppc-dev@lists.ozlabs.org --7PAM/4G1BR2SfWzg Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 25, 2019 at 11:11:58AM +0100, C=E9dric Le Goater wrote: > On 2/25/19 4:50 AM, Michael Ellerman wrote: > > C=E9dric Le Goater writes: > >=20 > >> The support for XIVE native exploitation mode in Linux/KVM needs a > >> couple more OPAL calls to configure the sPAPR guest and to get/set the > >> state of the XIVE internal structures. > >> > >> Signed-off-by: C=E9dric Le Goater > >> --- > >> arch/powerpc/include/asm/opal-api.h | 11 ++- > >> arch/powerpc/include/asm/opal.h | 7 ++ > >> arch/powerpc/include/asm/xive.h | 14 +++ > >> arch/powerpc/sysdev/xive/native.c | 99 +++++++++++++++++++ > >> .../powerpc/platforms/powernv/opal-wrappers.S | 3 + > >> 5 files changed, 130 insertions(+), 4 deletions(-) > >> > >> diff --git a/arch/powerpc/include/asm/opal-api.h b/arch/powerpc/includ= e/asm/opal-api.h > >> index 870fb7b239ea..cdfc54f78101 100644 > >> --- a/arch/powerpc/include/asm/opal-api.h > >> +++ b/arch/powerpc/include/asm/opal-api.h > >> @@ -186,8 +186,8 @@ > >> #define OPAL_XIVE_FREE_IRQ 140 > >> #define OPAL_XIVE_SYNC 141 > >> #define OPAL_XIVE_DUMP 142 > >> -#define OPAL_XIVE_RESERVED3 143 > >> -#define OPAL_XIVE_RESERVED4 144 > >> +#define OPAL_XIVE_GET_QUEUE_STATE 143 > >> +#define OPAL_XIVE_SET_QUEUE_STATE 144 > >> #define OPAL_SIGNAL_SYSTEM_RESET 145 > >> #define OPAL_NPU_INIT_CONTEXT 146 > >> #define OPAL_NPU_DESTROY_CONTEXT 147 > >> @@ -209,8 +209,11 @@ > >> #define OPAL_SENSOR_GROUP_ENABLE 163 > >> #define OPAL_PCI_GET_PBCQ_TUNNEL_BAR 164 > >> #define OPAL_PCI_SET_PBCQ_TUNNEL_BAR 165 > >> -#define OPAL_NX_COPROC_INIT 167 > >> -#define OPAL_LAST 167 > >> +#define OPAL_HANDLE_HMI2 166 > >> +#define OPAL_NX_COPROC_INIT 167 > >> +#define OPAL_NPU_SET_RELAXED_ORDER 168 > >> +#define OPAL_NPU_GET_RELAXED_ORDER 169 > >> +#define OPAL_XIVE_GET_VP_STATE 170 > >=20 > > You should only be defining the calls you need, leaving gaps for other > > things, and you need to retain OPAL_LAST. So it should look more like: > >=20 > > -#define OPAL_LAST 167 > > +#define OPAL_XIVE_GET_VP_STATE 170 > > +#define OPAL_LAST 170 > >=20 > >=20 > > Also I can't merge this until it's merged into skiboot. >=20 > OK. Let's start with skiboot. Yeah.. where are we at with skiboot in general. We can't test this downstream until we have a released skiboot with the necessary support. --=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 --7PAM/4G1BR2SfWzg Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlx0vtkACgkQbDjKyiDZ s5LunhAAqdW4Vz1C1Rc/2lQE84WlVsoYlWX0JuiluSHCMF3M56Xq7YbFx4+8zNrq oVGVAhCLYvLKEvbpPFBhatrP0z81wNMFfi58dtJY8lmvcUiBiLkRe9exNMYACEGX WouMwpP1EcvfSFFWItnTZufSF2k52UnyktDrB9ndy7TylOT/BPN0ROTrvplEBS5x nA/J5j0Mzi3pEWJjryHfcCH2ira3PGULJ2q2k/xuvFafo4VqlqSv3nd6osAkHMXQ PWt/tEwgysPGWs0VAITImhW+N7L5W36bIl25CluG9kIghsq/bYaMo3TR2x8gqeB4 X4L0gvAsMusuBbycEtXXf5zA7er2ArdObuBgrksPVW7XgKsAhrSCGTKY8sgTZ/y2 hAGSKYVB93kF7M+a006iaUB6/MqsHqsEnSqlb2ZoJNpSQ60x5478wXSIaYqIzYcM 0LlHjkXu7CmVWdmilLJEN7CZp0xph7brGKIZL4PTO1UST/SpnY0l88iaEBVghRL6 cZqk/Tyq9qeeT5bby9/wJr9xvcSqEVp1F2cHIKtmKnjkuprjTqINIiAkAHMoCA5n LVaVNxS5MZbGR3rneetCquRYVuF366vpbV+8ynANy5daQnG3i5DvkHAleknvrOjJ TjWj871EiPaWrLwJRUbHNMBnTi3suWcUFn1Ac0Ct+/iJfFfq9C8= =rbBq -----END PGP SIGNATURE----- --7PAM/4G1BR2SfWzg--