* [PATCH] powerpc: Support lower minimum entitlement for virtual processors
@ 2012-03-23 21:22 Robert Jennings
2012-04-30 5:30 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 3+ messages in thread
From: Robert Jennings @ 2012-03-23 21:22 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Robert Jennings, linuxppc-dev
This patch changes the architecture vector to advertise support for a
lower minimum virtual processor entitled capacity. The default
minimum without this patch is 10%, this patch specifies 5%. This will
allow 20 LPARs per CPU rather than only 10.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
---
arch/powerpc/kernel/prom_init.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index eca626e..3d882ea 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -689,6 +689,9 @@ static void __init early_cmdline_parse(void)
#define OV3_VMX 0x40 /* VMX/Altivec */
#define OV3_DFP 0x20 /* decimal FP */
+/* Option vector 4: IBM PAPR implementation */
+#define OV4_MIN_ENT_CAP 0x05 /* minimum VP entitled capacity */
+
/* Option vector 5: PAPR/OF options supported */
#define OV5_LPAR 0x80 /* logical partitioning supported */
#define OV5_SPLPAR 0x40 /* shared-processor LPAR supported */
@@ -753,8 +756,9 @@ static unsigned char ibm_architecture_vec[] = {
OV3_FP | OV3_VMX | OV3_DFP,
/* option vector 4: IBM PAPR implementation */
- 2 - 2, /* length */
+ 3 - 2, /* length */
0, /* don't halt */
+ OV4_MIN_ENT_CAP, /* minimum VP entitled capacity */
/* option vector 5: PAPR/OF options */
13 - 2, /* length */
@@ -771,7 +775,7 @@ static unsigned char ibm_architecture_vec[] = {
* must match by the macro below. Update the definition if
* the structure layout changes.
*/
-#define IBM_ARCH_VEC_NRCORES_OFFSET 100
+#define IBM_ARCH_VEC_NRCORES_OFFSET 101
W(NR_CPUS), /* number of cores supported */
/* option vector 6: IBM PAPR hints */
--
1.7.0.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc: Support lower minimum entitlement for virtual processors
2012-03-23 21:22 [PATCH] powerpc: Support lower minimum entitlement for virtual processors Robert Jennings
@ 2012-04-30 5:30 ` Benjamin Herrenschmidt
2012-05-09 15:56 ` Robert Jennings
0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Herrenschmidt @ 2012-04-30 5:30 UTC (permalink / raw)
To: Robert Jennings; +Cc: linuxppc-dev
On Fri, 2012-03-23 at 16:22 -0500, Robert Jennings wrote:
> This patch changes the architecture vector to advertise support for a
> lower minimum virtual processor entitled capacity. The default
> minimum without this patch is 10%, this patch specifies 5%. This will
> allow 20 LPARs per CPU rather than only 10.
Any reason why we don't just put 1% in there and thus don't have to
change again when pHyp decides to lower their minimum ? :-)
(Can you test that it works, ie, that pHyp doesn't barf if we put 1% and
properly uses 5% in that case ?)
Cheers,
Ben.
> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/prom_init.c | 8 ++++++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> index eca626e..3d882ea 100644
> --- a/arch/powerpc/kernel/prom_init.c
> +++ b/arch/powerpc/kernel/prom_init.c
> @@ -689,6 +689,9 @@ static void __init early_cmdline_parse(void)
> #define OV3_VMX 0x40 /* VMX/Altivec */
> #define OV3_DFP 0x20 /* decimal FP */
>
> +/* Option vector 4: IBM PAPR implementation */
> +#define OV4_MIN_ENT_CAP 0x05 /* minimum VP entitled capacity */
> +
> /* Option vector 5: PAPR/OF options supported */
> #define OV5_LPAR 0x80 /* logical partitioning supported */
> #define OV5_SPLPAR 0x40 /* shared-processor LPAR supported */
> @@ -753,8 +756,9 @@ static unsigned char ibm_architecture_vec[] = {
> OV3_FP | OV3_VMX | OV3_DFP,
>
> /* option vector 4: IBM PAPR implementation */
> - 2 - 2, /* length */
> + 3 - 2, /* length */
> 0, /* don't halt */
> + OV4_MIN_ENT_CAP, /* minimum VP entitled capacity */
>
> /* option vector 5: PAPR/OF options */
> 13 - 2, /* length */
> @@ -771,7 +775,7 @@ static unsigned char ibm_architecture_vec[] = {
> * must match by the macro below. Update the definition if
> * the structure layout changes.
> */
> -#define IBM_ARCH_VEC_NRCORES_OFFSET 100
> +#define IBM_ARCH_VEC_NRCORES_OFFSET 101
> W(NR_CPUS), /* number of cores supported */
>
> /* option vector 6: IBM PAPR hints */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] powerpc: Support lower minimum entitlement for virtual processors
2012-04-30 5:30 ` Benjamin Herrenschmidt
@ 2012-05-09 15:56 ` Robert Jennings
0 siblings, 0 replies; 3+ messages in thread
From: Robert Jennings @ 2012-05-09 15:56 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: linuxppc-dev
* Benjamin Herrenschmidt (benh@kernel.crashing.org) wrote:
> On Fri, 2012-03-23 at 16:22 -0500, Robert Jennings wrote:
> > This patch changes the architecture vector to advertise support for a
> > lower minimum virtual processor entitled capacity. The default
> > minimum without this patch is 10%, this patch specifies 5%. This will
> > allow 20 LPARs per CPU rather than only 10.
>
> Any reason why we don't just put 1% in there and thus don't have to
> change again when pHyp decides to lower their minimum ? :-)
>
> (Can you test that it works, ie, that pHyp doesn't barf if we put 1% and
> properly uses 5% in that case ?)
Thanks Ben, makes good sense.
I'm in the process of validating this and I'll post reply or a new
version of the patch when I get it completed.
--Rob Jennings
> > Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
> > ---
> > arch/powerpc/kernel/prom_init.c | 8 ++++++--
> > 1 files changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
> > index eca626e..3d882ea 100644
> > --- a/arch/powerpc/kernel/prom_init.c
> > +++ b/arch/powerpc/kernel/prom_init.c
> > @@ -689,6 +689,9 @@ static void __init early_cmdline_parse(void)
> > #define OV3_VMX 0x40 /* VMX/Altivec */
> > #define OV3_DFP 0x20 /* decimal FP */
> >
> > +/* Option vector 4: IBM PAPR implementation */
> > +#define OV4_MIN_ENT_CAP 0x05 /* minimum VP entitled capacity */
> > +
> > /* Option vector 5: PAPR/OF options supported */
> > #define OV5_LPAR 0x80 /* logical partitioning supported */
> > #define OV5_SPLPAR 0x40 /* shared-processor LPAR supported */
> > @@ -753,8 +756,9 @@ static unsigned char ibm_architecture_vec[] = {
> > OV3_FP | OV3_VMX | OV3_DFP,
> >
> > /* option vector 4: IBM PAPR implementation */
> > - 2 - 2, /* length */
> > + 3 - 2, /* length */
> > 0, /* don't halt */
> > + OV4_MIN_ENT_CAP, /* minimum VP entitled capacity */
> >
> > /* option vector 5: PAPR/OF options */
> > 13 - 2, /* length */
> > @@ -771,7 +775,7 @@ static unsigned char ibm_architecture_vec[] = {
> > * must match by the macro below. Update the definition if
> > * the structure layout changes.
> > */
> > -#define IBM_ARCH_VEC_NRCORES_OFFSET 100
> > +#define IBM_ARCH_VEC_NRCORES_OFFSET 101
> > W(NR_CPUS), /* number of cores supported */
> >
> > /* option vector 6: IBM PAPR hints */
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-10 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-23 21:22 [PATCH] powerpc: Support lower minimum entitlement for virtual processors Robert Jennings
2012-04-30 5:30 ` Benjamin Herrenschmidt
2012-05-09 15:56 ` Robert Jennings
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).