From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Subject: Re: [PATCH v2 01/16] powerpc/xive: add OPAL extensions for the XIVE native exploitation support Date: Mon, 25 Feb 2019 14:50:16 +1100 Message-ID: <87y364jzlz.fsf@concordia.ellerman.id.au> References: <20190222112840.25000-1-clg@kaod.org> <20190222112840.25000-2-clg@kaod.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: kvm@vger.kernel.org, Paul Mackerras , =?utf-8?Q?C=C3=A9dric?= Le Goater , linuxppc-dev@lists.ozlabs.org, David Gibson To: =?utf-8?Q?C=C3=A9dric?= Le Goater , kvm-ppc@vger.kernel.org, Stewart Smith Return-path: In-Reply-To: <20190222112840.25000-2-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 C=C3=A9dric Le Goater writes: > 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=C3=A9dric 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/include/a= sm/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 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: -#define OPAL_LAST 167 +#define OPAL_XIVE_GET_VP_STATE 170 +#define OPAL_LAST 170 Also I can't merge this until it's merged into skiboot. cheers From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Date: Mon, 25 Feb 2019 03:50:16 +0000 Subject: Re: [PATCH v2 01/16] powerpc/xive: add OPAL extensions for the XIVE native exploitation support Message-Id: <87y364jzlz.fsf@concordia.ellerman.id.au> List-Id: References: <20190222112840.25000-1-clg@kaod.org> <20190222112840.25000-2-clg@kaod.org> In-Reply-To: <20190222112840.25000-2-clg@kaod.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: =?utf-8?Q?C=C3=A9dric?= Le Goater , kvm-ppc@vger.kernel.org, Stewart Smith Cc: kvm@vger.kernel.org, Paul Mackerras , =?utf-8?Q?C=C3=A9dric?= Le Goater , linuxppc-dev@lists.ozlabs.org, David Gibson Cédric Le Goater writes: > 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édric 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/include/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 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: -#define OPAL_LAST 167 +#define OPAL_XIVE_GET_VP_STATE 170 +#define OPAL_LAST 170 Also I can't merge this until it's merged into skiboot. cheers