From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Subject: Re: [PATCH 01/19] powerpc/xive: export flags for the XIVE native exploitation mode hcalls Date: Thu, 10 Jan 2019 00:08:28 +1100 Message-ID: <87pnt6rnar.fsf@concordia.ellerman.id.au> References: <20190107184331.8429-1-clg@kaod.org> <20190107184331.8429-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 Return-path: In-Reply-To: <20190107184331.8429-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: > These flags are shared between Linux/KVM implementing the hypervisor > calls for the XIVE native exploitation mode and the driver for the > sPAPR guests. > > Signed-off-by: C=C3=A9dric Le Goater > --- > arch/powerpc/include/asm/xive.h | 23 +++++++++++++++++++++++ > arch/powerpc/sysdev/xive/spapr.c | 28 ++++++++-------------------- > 2 files changed, 31 insertions(+), 20 deletions(-) > > diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/x= ive.h > index 3c704f5dd3ae..32f033bfbf42 100644 > --- a/arch/powerpc/include/asm/xive.h > +++ b/arch/powerpc/include/asm/xive.h > @@ -93,6 +93,29 @@ extern void xive_flush_interrupt(void); > /* xmon hook */ > extern void xmon_xive_do_dump(int cpu); >=20=20 > +/* > + * Hcall flags shared by the sPAPR backend and KVM > + */ > + > +/* H_INT_GET_SOURCE_INFO */ > +#define XIVE_SPAPR_SRC_H_INT_ESB PPC_BIT(60) > +#define XIVE_SPAPR_SRC_LSI PPC_BIT(61) > +#define XIVE_SPAPR_SRC_TRIGGER PPC_BIT(62) > +#define XIVE_SPAPR_SRC_STORE_EOI PPC_BIT(63) I have an (irrational) hatred of PPC_BIT, because it obfuscates what's going on and makes PPC seem weirder than it needs to be. It could at least be called IBM_BIT(). I know it helps people compare the code vs the documentation, but basically no one has the documentation, and everyone has the code. Anyway it's not a show stopper, just a pet-peeve of mine :) cheers From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Ellerman Date: Wed, 09 Jan 2019 13:08:28 +0000 Subject: Re: [PATCH 01/19] powerpc/xive: export flags for the XIVE native exploitation mode hcalls Message-Id: <87pnt6rnar.fsf@concordia.ellerman.id.au> List-Id: References: <20190107184331.8429-1-clg@kaod.org> <20190107184331.8429-2-clg@kaod.org> In-Reply-To: <20190107184331.8429-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 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: > These flags are shared between Linux/KVM implementing the hypervisor > calls for the XIVE native exploitation mode and the driver for the > sPAPR guests. > > Signed-off-by: Cédric Le Goater > --- > arch/powerpc/include/asm/xive.h | 23 +++++++++++++++++++++++ > arch/powerpc/sysdev/xive/spapr.c | 28 ++++++++-------------------- > 2 files changed, 31 insertions(+), 20 deletions(-) > > diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/xive.h > index 3c704f5dd3ae..32f033bfbf42 100644 > --- a/arch/powerpc/include/asm/xive.h > +++ b/arch/powerpc/include/asm/xive.h > @@ -93,6 +93,29 @@ extern void xive_flush_interrupt(void); > /* xmon hook */ > extern void xmon_xive_do_dump(int cpu); > > +/* > + * Hcall flags shared by the sPAPR backend and KVM > + */ > + > +/* H_INT_GET_SOURCE_INFO */ > +#define XIVE_SPAPR_SRC_H_INT_ESB PPC_BIT(60) > +#define XIVE_SPAPR_SRC_LSI PPC_BIT(61) > +#define XIVE_SPAPR_SRC_TRIGGER PPC_BIT(62) > +#define XIVE_SPAPR_SRC_STORE_EOI PPC_BIT(63) I have an (irrational) hatred of PPC_BIT, because it obfuscates what's going on and makes PPC seem weirder than it needs to be. It could at least be called IBM_BIT(). I know it helps people compare the code vs the documentation, but basically no one has the documentation, and everyone has the code. Anyway it's not a show stopper, just a pet-peeve of mine :) cheers