On Mon, Dec 09, 2024 at 04:04:19PM +0100, Janosch Frank wrote: > On 12/6/24 1:27 PM, Hendrik Brueckner wrote: > > MSA11 introduces new HMAC subfunctions. > > > > Signed-off-by: Hendrik Brueckner <brueck...@linux.ibm.com> > > Reviewed-by: Christian Borntraeger <borntrae...@linux.ibm.com> > > --- > > target/s390x/cpu_features.c | 2 ++ > > target/s390x/cpu_features_def.h.inc | 10 ++++++++++ > > target/s390x/cpu_models.c | 8 ++++++++ > > target/s390x/gen-features.c | 24 ++++++++++++++++++++++++ > > 4 files changed, 44 insertions(+) > [...] > > /* Features exposed via the KMC instruction. */ > > DEF_FEAT(KMC_DEA, "kmc-dea", KMC, 1, "KMC DEA") > > @@ -275,6 +283,8 @@ DEF_FEAT(PCKMO_ECC_P384, "pckmo-ecc-p384", PCKMO, 33, > > "PCKMO Encrypt-ECC-P384-Ke > > DEF_FEAT(PCKMO_ECC_P521, "pckmo-ecc-p521", PCKMO, 34, "PCKMO > > Encrypt-ECC-P521-Key") > > DEF_FEAT(PCKMO_ECC_ED25519, "pckmo-ecc-ed25519", PCKMO, 40 , "PCKMO > > Encrypt-ECC-Ed25519-Key") > > DEF_FEAT(PCKMO_ECC_ED448, "pckmo-ecc-ed448", PCKMO, 41 , "PCKMO > > Encrypt-ECC-Ed448-Key") > > +DEF_FEAT(PCKMO_HMAC_512, "pckmo-hmac-512", PCKMO, 118, "PCKMO > > Encrypt-HMAC-512-Key") > > +DEF_FEAT(PCKMO_HMAC_1024, "pckmo-hmac-1024", PCKMO, 122, "PCKMO > > Encrypt-HMAC-1024-Key") > > It seems like we never did MSAx prereq checks for PCKMO like we do for the > other instructions. Don't we need to check for MSA3 for these features too? > > I see no code that puts EXT_11 and EXT_11_PCKMO in a group where we could > piggyback on the EXT_11 check for MSA3. What am I missing?
Similar to my other comment. EXT_11 does not have an STFLE bit and, hence, no feature definition. That's why each introduced subfunc requires MSA3 (for which there is STFLE bit). The check_consistencies functions works on feature definitions, not on the feature group definitions. Hope this helps.