[v2,1/3] s390x/cpumodel: mepochptff: warn when no mepoch and re-align group init

Message ID 20190212011657.18324-1-walling@linux.ibm.com
State New
Headers show
Series
  • [v2,1/3] s390x/cpumodel: mepochptff: warn when no mepoch and re-align group init
Related show

Commit Message

Collin Walling Feb. 12, 2019, 1:16 a.m.
The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
on the multiple-epoch facility (mepoch). Let's print a warning if these
features are enabled without mepoch.

While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
the s390_feature_groups list so it can be properly indexed with its
generated S390FeatGroup enum.

Signed-off-by: Collin Walling <walling@linux.ibm.com>
---
 target/s390x/cpu_features.c | 2 +-
 target/s390x/cpu_models.c   | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

Comments

Cornelia Huck Feb. 12, 2019, 10:04 a.m. | #1
On Mon, 11 Feb 2019 20:16:55 -0500
Collin Walling <walling@linux.ibm.com> wrote:

> The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
> on the multiple-epoch facility (mepoch). Let's print a warning if these
> features are enabled without mepoch.
> 
> While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
> the s390_feature_groups list so it can be properly indexed with its
> generated S390FeatGroup enum.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  target/s390x/cpu_features.c | 2 +-
>  target/s390x/cpu_models.c   | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)

Not a comment for this patch (looks fine to me), but more general:
Could you please add a cover letter if you send more than one patch?
It's easy to miss that there are three patches and not two :)
Christian Borntraeger Feb. 12, 2019, 10:09 a.m. | #2
On 12.02.2019 02:16, Collin Walling wrote:
> The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
> on the multiple-epoch facility (mepoch). Let's print a warning if these
> features are enabled without mepoch.
> 
> While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
> the s390_feature_groups list so it can be properly indexed with its
> generated S390FeatGroup enum.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>

Looks sane. 

Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  target/s390x/cpu_features.c | 2 +-
>  target/s390x/cpu_models.c   | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
> index 60cfeba48f..1843c84aaa 100644
> --- a/target/s390x/cpu_features.c
> +++ b/target/s390x/cpu_features.c
> @@ -456,7 +456,6 @@ static S390FeatGroupDef s390_feature_groups[] = {
>      FEAT_GROUP_INIT("plo", PLO, "Perform-locked-operation facility"),
>      FEAT_GROUP_INIT("tods", TOD_CLOCK_STEERING, "Tod-clock-steering facility"),
>      FEAT_GROUP_INIT("gen13ptff", GEN13_PTFF, "PTFF enhancements introduced with z13"),
> -    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
>      FEAT_GROUP_INIT("msa", MSA, "Message-security-assist facility"),
>      FEAT_GROUP_INIT("msa1", MSA_EXT_1, "Message-security-assist-extension 1 facility"),
>      FEAT_GROUP_INIT("msa2", MSA_EXT_2, "Message-security-assist-extension 2 facility"),
> @@ -466,6 +465,7 @@ static S390FeatGroupDef s390_feature_groups[] = {
>      FEAT_GROUP_INIT("msa6", MSA_EXT_6, "Message-security-assist-extension 6 facility"),
>      FEAT_GROUP_INIT("msa7", MSA_EXT_7, "Message-security-assist-extension 7 facility"),
>      FEAT_GROUP_INIT("msa8", MSA_EXT_8, "Message-security-assist-extension 8 facility"),
> +    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
>  };
>  
>  const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group)
> diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
> index 7c253ff308..b42b5fd327 100644
> --- a/target/s390x/cpu_models.c
> +++ b/target/s390x/cpu_models.c
> @@ -788,6 +788,10 @@ static void check_consistency(const S390CPUModel *model)
>          { S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
>          { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
>          { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
> +        { S390_FEAT_PTFF_QSIE, S390_FEAT_MULTIPLE_EPOCH },
> +        { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
> +        { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
> +        { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
>      };
>      int i;
>  
>
Collin Walling Feb. 12, 2019, 5:02 p.m. | #3
On 2/12/19 5:04 AM, Cornelia Huck wrote:
> On Mon, 11 Feb 2019 20:16:55 -0500
> Collin Walling <walling@linux.ibm.com> wrote:
> 
>> The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
>> on the multiple-epoch facility (mepoch). Let's print a warning if these
>> features are enabled without mepoch.
>>
>> While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
>> the s390_feature_groups list so it can be properly indexed with its
>> generated S390FeatGroup enum.
>>
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
>> ---
>>  target/s390x/cpu_features.c | 2 +-
>>  target/s390x/cpu_models.c   | 4 ++++
>>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> Not a comment for this patch (looks fine to me), but more general:
> Could you please add a cover letter if you send more than one patch?
> It's easy to miss that there are three patches and not two :)
> 

Noted. Thanks for the advice!
Collin Walling Feb. 12, 2019, 5:03 p.m. | #4
On 2/12/19 5:09 AM, Christian Borntraeger wrote:
> 
> 
> On 12.02.2019 02:16, Collin Walling wrote:
>> The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
>> on the multiple-epoch facility (mepoch). Let's print a warning if these
>> features are enabled without mepoch.
>>
>> While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
>> the s390_feature_groups list so it can be properly indexed with its
>> generated S390FeatGroup enum.
>>
>> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> 
> Looks sane. 
> 
> Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>

Thanks!
David Hildenbrand Feb. 12, 2019, 7:35 p.m. | #5
On 12.02.19 02:16, Collin Walling wrote:
> The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
> on the multiple-epoch facility (mepoch). Let's print a warning if these
> features are enabled without mepoch.
> 
> While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
> the s390_feature_groups list so it can be properly indexed with its
> generated S390FeatGroup enum.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  target/s390x/cpu_features.c | 2 +-
>  target/s390x/cpu_models.c   | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
> index 60cfeba48f..1843c84aaa 100644
> --- a/target/s390x/cpu_features.c
> +++ b/target/s390x/cpu_features.c
> @@ -456,7 +456,6 @@ static S390FeatGroupDef s390_feature_groups[] = {
>      FEAT_GROUP_INIT("plo", PLO, "Perform-locked-operation facility"),
>      FEAT_GROUP_INIT("tods", TOD_CLOCK_STEERING, "Tod-clock-steering facility"),
>      FEAT_GROUP_INIT("gen13ptff", GEN13_PTFF, "PTFF enhancements introduced with z13"),
> -    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
>      FEAT_GROUP_INIT("msa", MSA, "Message-security-assist facility"),
>      FEAT_GROUP_INIT("msa1", MSA_EXT_1, "Message-security-assist-extension 1 facility"),
>      FEAT_GROUP_INIT("msa2", MSA_EXT_2, "Message-security-assist-extension 2 facility"),
> @@ -466,6 +465,7 @@ static S390FeatGroupDef s390_feature_groups[] = {
>      FEAT_GROUP_INIT("msa6", MSA_EXT_6, "Message-security-assist-extension 6 facility"),
>      FEAT_GROUP_INIT("msa7", MSA_EXT_7, "Message-security-assist-extension 7 facility"),
>      FEAT_GROUP_INIT("msa8", MSA_EXT_8, "Message-security-assist-extension 8 facility"),
> +    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
>  };
>  
>  const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group)
> diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
> index 7c253ff308..b42b5fd327 100644
> --- a/target/s390x/cpu_models.c
> +++ b/target/s390x/cpu_models.c
> @@ -788,6 +788,10 @@ static void check_consistency(const S390CPUModel *model)
>          { S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
>          { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
>          { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
> +        { S390_FEAT_PTFF_QSIE, S390_FEAT_MULTIPLE_EPOCH },
> +        { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
> +        { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
> +        { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
>      };
>      int i;
>  
> 

Reviewed-by: David Hildenbrand <david@redhat.com>
Cornelia Huck Feb. 13, 2019, 9:45 a.m. | #6
On Mon, 11 Feb 2019 20:16:55 -0500
Collin Walling <walling@linux.ibm.com> wrote:

> The extended PTFF features (qsie, qtoue, stoe, stoue) are dependent
> on the multiple-epoch facility (mepoch). Let's print a warning if these
> features are enabled without mepoch.
> 
> While we're at it, let's move the FEAT_GROUP_INIT for mepochptff down
> the s390_feature_groups list so it can be properly indexed with its
> generated S390FeatGroup enum.
> 
> Signed-off-by: Collin Walling <walling@linux.ibm.com>
> ---
>  target/s390x/cpu_features.c | 2 +-
>  target/s390x/cpu_models.c   | 4 ++++
>  2 files changed, 5 insertions(+), 1 deletion(-)

Thanks, applied.

Patch

diff --git a/target/s390x/cpu_features.c b/target/s390x/cpu_features.c
index 60cfeba48f..1843c84aaa 100644
--- a/target/s390x/cpu_features.c
+++ b/target/s390x/cpu_features.c
@@ -456,7 +456,6 @@  static S390FeatGroupDef s390_feature_groups[] = {
     FEAT_GROUP_INIT("plo", PLO, "Perform-locked-operation facility"),
     FEAT_GROUP_INIT("tods", TOD_CLOCK_STEERING, "Tod-clock-steering facility"),
     FEAT_GROUP_INIT("gen13ptff", GEN13_PTFF, "PTFF enhancements introduced with z13"),
-    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
     FEAT_GROUP_INIT("msa", MSA, "Message-security-assist facility"),
     FEAT_GROUP_INIT("msa1", MSA_EXT_1, "Message-security-assist-extension 1 facility"),
     FEAT_GROUP_INIT("msa2", MSA_EXT_2, "Message-security-assist-extension 2 facility"),
@@ -466,6 +465,7 @@  static S390FeatGroupDef s390_feature_groups[] = {
     FEAT_GROUP_INIT("msa6", MSA_EXT_6, "Message-security-assist-extension 6 facility"),
     FEAT_GROUP_INIT("msa7", MSA_EXT_7, "Message-security-assist-extension 7 facility"),
     FEAT_GROUP_INIT("msa8", MSA_EXT_8, "Message-security-assist-extension 8 facility"),
+    FEAT_GROUP_INIT("mepochptff", MULTIPLE_EPOCH_PTFF, "PTFF enhancements introduced with Multiple-epoch facility"),
 };
 
 const S390FeatGroupDef *s390_feat_group_def(S390FeatGroup group)
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 7c253ff308..b42b5fd327 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -788,6 +788,10 @@  static void check_consistency(const S390CPUModel *model)
         { S390_FEAT_SIE_KSS, S390_FEAT_SIE_F2 },
         { S390_FEAT_AP_QUERY_CONFIG_INFO, S390_FEAT_AP },
         { S390_FEAT_AP_FACILITIES_TEST, S390_FEAT_AP },
+        { S390_FEAT_PTFF_QSIE, S390_FEAT_MULTIPLE_EPOCH },
+        { S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
+        { S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
+        { S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
     };
     int i;