diff mbox series

[kvm-unit-tests,1/9] s390x: topology: Fix report message

Message ID 20231011085635.1996346-2-nsg@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series s390x: topology: Fixes and extension | expand

Commit Message

Nina Schoetterl-Glausch Oct. 11, 2023, 8:56 a.m. UTC
A polarization value of 0 means horizontal polarization.

Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
---
 s390x/topology.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Janosch Frank Oct. 11, 2023, 10:56 a.m. UTC | #1
On 10/11/23 10:56, Nina Schoetterl-Glausch wrote:
> A polarization value of 0 means horizontal polarization.
> 
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>

Don't we need to remove the entitlement part?
Entitlement is defined as the degree of vertical polarization.

> ---
>   s390x/topology.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/s390x/topology.c b/s390x/topology.c
> index 69558236..53838ed1 100644
> --- a/s390x/topology.c
> +++ b/s390x/topology.c
> @@ -275,7 +275,7 @@ static uint8_t *check_tle(void *tc)
>   	if (!cpus->d)
>   		report_skip("Not dedicated");
>   	else
> -		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either vertically polarized or have high entitlement");
> +		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either horizontally polarized or have high entitlement");
>   
>   	return tc + sizeof(*cpus);
>   }
Nina Schoetterl-Glausch Oct. 11, 2023, 11:10 a.m. UTC | #2
On Wed, 2023-10-11 at 12:56 +0200, Janosch Frank wrote:
> On 10/11/23 10:56, Nina Schoetterl-Glausch wrote:
> > A polarization value of 0 means horizontal polarization.
> > 
> > Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> 
> Don't we need to remove the entitlement part?
> Entitlement is defined as the degree of vertical polarization.

I don't follow.
We're checking this from the PoP:
A dedicated CPU is either horizontally or vertically
polarized. When a dedicated CPU is vertically polar-
ized, entitlement is always high. Thus, when D is one,
PP is either 00 binary or 11 binary. 

> > ---
> >   s390x/topology.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/s390x/topology.c b/s390x/topology.c
> > index 69558236..53838ed1 100644
> > --- a/s390x/topology.c
> > +++ b/s390x/topology.c
> > @@ -275,7 +275,7 @@ static uint8_t *check_tle(void *tc)
> >   	if (!cpus->d)
> >   		report_skip("Not dedicated");
> >   	else
> > -		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either vertically polarized or have high entitlement");
> > +		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either horizontally polarized or have high entitlement");
> >   
> >   	return tc + sizeof(*cpus);
> >   }
>
Janosch Frank Oct. 11, 2023, 11:30 a.m. UTC | #3
On 10/11/23 13:10, Nina Schoetterl-Glausch wrote:
> On Wed, 2023-10-11 at 12:56 +0200, Janosch Frank wrote:
>> On 10/11/23 10:56, Nina Schoetterl-Glausch wrote:
>>> A polarization value of 0 means horizontal polarization.
>>>
>>> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
>>
>> Don't we need to remove the entitlement part?
>> Entitlement is defined as the degree of vertical polarization.
> 
> I don't follow.
> We're checking this from the PoP:
> A dedicated CPU is either horizontally or vertically
> polarized. When a dedicated CPU is vertically polar-
> ized, entitlement is always high. Thus, when D is one,
> PP is either 00 binary or 11 binary.

Ahhhh, I see what's the issue for my brain: Magic values

Could you please add a patch that introduces an enum for the pp values 
so the report below doesn't need a look into the POP to understand it?

> 
>>> ---
>>>    s390x/topology.c | 2 +-
>>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/s390x/topology.c b/s390x/topology.c
>>> index 69558236..53838ed1 100644
>>> --- a/s390x/topology.c
>>> +++ b/s390x/topology.c
>>> @@ -275,7 +275,7 @@ static uint8_t *check_tle(void *tc)
>>>    	if (!cpus->d)
>>>    		report_skip("Not dedicated");
>>>    	else
>>> -		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either vertically polarized or have high entitlement");
>>> +		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either horizontally polarized or have high entitlement");
>>>    
>>>    	return tc + sizeof(*cpus);
>>>    }
>>
>
Nina Schoetterl-Glausch Oct. 11, 2023, 11:41 a.m. UTC | #4
On Wed, 2023-10-11 at 13:30 +0200, Janosch Frank wrote:
> On 10/11/23 13:10, Nina Schoetterl-Glausch wrote:
> > On Wed, 2023-10-11 at 12:56 +0200, Janosch Frank wrote:
> > > On 10/11/23 10:56, Nina Schoetterl-Glausch wrote:
> > > > A polarization value of 0 means horizontal polarization.
> > > > 
> > > > Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
> > > 
> > > Don't we need to remove the entitlement part?
> > > Entitlement is defined as the degree of vertical polarization.
> > 
> > I don't follow.
> > We're checking this from the PoP:
> > A dedicated CPU is either horizontally or vertically
> > polarized. When a dedicated CPU is vertically polar-
> > ized, entitlement is always high. Thus, when D is one,
> > PP is either 00 binary or 11 binary.
> 
> Ahhhh, I see what's the issue for my brain: Magic values
> 
> Could you please add a patch that introduces an enum for the pp values 
> so the report below doesn't need a look into the POP to understand it?

Sure can do, probably should also add an enum for type,
even if it will only have the one value (IFL) we check for.

> 
> > 
> > > > ---
> > > >    s390x/topology.c | 2 +-
> > > >    1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/s390x/topology.c b/s390x/topology.c
> > > > index 69558236..53838ed1 100644
> > > > --- a/s390x/topology.c
> > > > +++ b/s390x/topology.c
> > > > @@ -275,7 +275,7 @@ static uint8_t *check_tle(void *tc)
> > > >    	if (!cpus->d)
> > > >    		report_skip("Not dedicated");
> > > >    	else
> > > > -		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either vertically polarized or have high entitlement");
> > > > +		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either horizontally polarized or have high entitlement");
> > > >    
> > > >    	return tc + sizeof(*cpus);
> > > >    }
> > > 
> > 
>
Nico Boehr Oct. 11, 2023, 1:36 p.m. UTC | #5
Quoting Nina Schoetterl-Glausch (2023-10-11 10:56:24)
> A polarization value of 0 means horizontal polarization.
> 
> Signed-off-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>

Reviewed-by: Nico Boehr <nrb@linux.ibm.com>
diff mbox series

Patch

diff --git a/s390x/topology.c b/s390x/topology.c
index 69558236..53838ed1 100644
--- a/s390x/topology.c
+++ b/s390x/topology.c
@@ -275,7 +275,7 @@  static uint8_t *check_tle(void *tc)
 	if (!cpus->d)
 		report_skip("Not dedicated");
 	else
-		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either vertically polarized or have high entitlement");
+		report(cpus->pp == 3 || cpus->pp == 0, "Dedicated CPUs are either horizontally polarized or have high entitlement");
 
 	return tc + sizeof(*cpus);
 }