xref: /qemu/target/s390x/cpu_features_def.h (revision 9f0d13f4f1de3cf9b70435cc4e87a301ee12471f)
178241744SMichael Mueller /*
278241744SMichael Mueller  * CPU features/facilities for s390
378241744SMichael Mueller  *
478241744SMichael Mueller  * Copyright 2016 IBM Corp.
578241744SMichael Mueller  *
678241744SMichael Mueller  * Author(s): Michael Mueller <mimu@linux.vnet.ibm.com>
778241744SMichael Mueller  *            David Hildenbrand <dahi@linux.vnet.ibm.com>
878241744SMichael Mueller  *
978241744SMichael Mueller  * This work is licensed under the terms of the GNU GPL, version 2 or (at
1078241744SMichael Mueller  * your option) any later version. See the COPYING file in the top-level
1178241744SMichael Mueller  * directory.
1278241744SMichael Mueller  */
1378241744SMichael Mueller 
1478241744SMichael Mueller #ifndef TARGET_S390X_CPU_FEATURES_DEF_H
1578241744SMichael Mueller #define TARGET_S390X_CPU_FEATURES_DEF_H
1678241744SMichael Mueller 
1778241744SMichael Mueller typedef enum {
18ec3aadb1SJason J. Herne     /* Stfle */
1978241744SMichael Mueller     S390_FEAT_ESAN3 = 0,
2078241744SMichael Mueller     S390_FEAT_ZARCH,
2178241744SMichael Mueller     S390_FEAT_DAT_ENH,
2278241744SMichael Mueller     S390_FEAT_IDTE_SEGMENT,
2378241744SMichael Mueller     S390_FEAT_IDTE_REGION,
2478241744SMichael Mueller     S390_FEAT_ASN_LX_REUSE,
2578241744SMichael Mueller     S390_FEAT_STFLE,
2678241744SMichael Mueller     S390_FEAT_EDAT,
2778241744SMichael Mueller     S390_FEAT_SENSE_RUNNING_STATUS,
2878241744SMichael Mueller     S390_FEAT_CONDITIONAL_SSKE,
2978241744SMichael Mueller     S390_FEAT_CONFIGURATION_TOPOLOGY,
3078241744SMichael Mueller     S390_FEAT_IPTE_RANGE,
3178241744SMichael Mueller     S390_FEAT_NONQ_KEY_SETTING,
3278241744SMichael Mueller     S390_FEAT_EXTENDED_TRANSLATION_2,
3378241744SMichael Mueller     S390_FEAT_MSA,
3478241744SMichael Mueller     S390_FEAT_LONG_DISPLACEMENT,
3578241744SMichael Mueller     S390_FEAT_LONG_DISPLACEMENT_FAST,
3678241744SMichael Mueller     S390_FEAT_HFP_MADDSUB,
3778241744SMichael Mueller     S390_FEAT_EXTENDED_IMMEDIATE,
3878241744SMichael Mueller     S390_FEAT_EXTENDED_TRANSLATION_3,
3978241744SMichael Mueller     S390_FEAT_HFP_UNNORMALIZED_EXT,
4078241744SMichael Mueller     S390_FEAT_ETF2_ENH,
4178241744SMichael Mueller     S390_FEAT_STORE_CLOCK_FAST,
4278241744SMichael Mueller     S390_FEAT_PARSING_ENH,
4378241744SMichael Mueller     S390_FEAT_MOVE_WITH_OPTIONAL_SPEC,
4478241744SMichael Mueller     S390_FEAT_TOD_CLOCK_STEERING,
4578241744SMichael Mueller     S390_FEAT_ETF3_ENH,
4678241744SMichael Mueller     S390_FEAT_EXTRACT_CPU_TIME,
4778241744SMichael Mueller     S390_FEAT_COMPARE_AND_SWAP_AND_STORE,
4878241744SMichael Mueller     S390_FEAT_COMPARE_AND_SWAP_AND_STORE_2,
4978241744SMichael Mueller     S390_FEAT_GENERAL_INSTRUCTIONS_EXT,
5078241744SMichael Mueller     S390_FEAT_EXECUTE_EXT,
5178241744SMichael Mueller     S390_FEAT_ENHANCED_MONITOR,
5278241744SMichael Mueller     S390_FEAT_FLOATING_POINT_EXT,
536da5c593SJason J. Herne     S390_FEAT_ORDER_PRESERVING_COMPRESSION,
5478241744SMichael Mueller     S390_FEAT_SET_PROGRAM_PARAMETERS,
5578241744SMichael Mueller     S390_FEAT_FLOATING_POINT_SUPPPORT_ENH,
5678241744SMichael Mueller     S390_FEAT_DFP,
5778241744SMichael Mueller     S390_FEAT_DFP_FAST,
5878241744SMichael Mueller     S390_FEAT_PFPO,
5978241744SMichael Mueller     S390_FEAT_STFLE_45,
6078241744SMichael Mueller     S390_FEAT_CMPSC_ENH,
6178241744SMichael Mueller     S390_FEAT_DFP_ZONED_CONVERSION,
6278241744SMichael Mueller     S390_FEAT_STFLE_49,
6378241744SMichael Mueller     S390_FEAT_CONSTRAINT_TRANSACTIONAL_EXE,
6478241744SMichael Mueller     S390_FEAT_LOCAL_TLB_CLEARING,
6578241744SMichael Mueller     S390_FEAT_INTERLOCKED_ACCESS_2,
6678241744SMichael Mueller     S390_FEAT_STFLE_53,
676da5c593SJason J. Herne     S390_FEAT_ENTROPY_ENC_COMP,
6878241744SMichael Mueller     S390_FEAT_MSA_EXT_5,
696da5c593SJason J. Herne     S390_FEAT_MISC_INSTRUCTION_EXT,
706da5c593SJason J. Herne     S390_FEAT_SEMAPHORE_ASSIST,
716da5c593SJason J. Herne     S390_FEAT_TIME_SLICE_INSTRUMENTATION,
7278241744SMichael Mueller     S390_FEAT_RUNTIME_INSTRUMENTATION,
733b00f702SYi Min Zhao     S390_FEAT_ZPCI,
743b00f702SYi Min Zhao     S390_FEAT_ADAPTER_EVENT_NOTIFICATION,
753b00f702SYi Min Zhao     S390_FEAT_ADAPTER_INT_SUPPRESSION,
7678241744SMichael Mueller     S390_FEAT_TRANSACTIONAL_EXE,
7778241744SMichael Mueller     S390_FEAT_STORE_HYPERVISOR_INFO,
7878241744SMichael Mueller     S390_FEAT_ACCESS_EXCEPTION_FS_INDICATION,
7978241744SMichael Mueller     S390_FEAT_MSA_EXT_3,
8078241744SMichael Mueller     S390_FEAT_MSA_EXT_4,
8178241744SMichael Mueller     S390_FEAT_EDAT_2,
8278241744SMichael Mueller     S390_FEAT_DFP_PACKED_CONVERSION,
83*9f0d13f4SChristian Borntraeger     S390_FEAT_PPA15,
84b073c875SChristian Borntraeger     S390_FEAT_BPB,
8578241744SMichael Mueller     S390_FEAT_VECTOR,
866da5c593SJason J. Herne     S390_FEAT_INSTRUCTION_EXEC_PROT,
876da5c593SJason J. Herne     S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
886da5c593SJason J. Herne     S390_FEAT_GUARDED_STORAGE,
896da5c593SJason J. Herne     S390_FEAT_VECTOR_PACKED_DECIMAL,
906da5c593SJason J. Herne     S390_FEAT_VECTOR_ENH,
916da5c593SJason J. Herne     S390_FEAT_MULTIPLE_EPOCH,
926da5c593SJason J. Herne     S390_FEAT_TEST_PENDING_EXT_INTERRUPTION,
936da5c593SJason J. Herne     S390_FEAT_INSERT_REFERENCE_BITS_MULT,
946da5c593SJason J. Herne     S390_FEAT_MSA_EXT_8,
956da5c593SJason J. Herne     S390_FEAT_CMM_NT,
96ec3aadb1SJason J. Herne 
97ec3aadb1SJason J. Herne     /* Sclp Conf Char */
9878241744SMichael Mueller     S390_FEAT_SIE_GSLS,
9978241744SMichael Mueller     S390_FEAT_ESOP,
1006da5c593SJason J. Herne     S390_FEAT_HPMA2,
1016da5c593SJason J. Herne     S390_FEAT_SIE_KSS,
102ec3aadb1SJason J. Herne 
103ec3aadb1SJason J. Herne     /* Sclp Conf Char Ext */
10478241744SMichael Mueller     S390_FEAT_SIE_64BSCAO,
10578241744SMichael Mueller     S390_FEAT_SIE_CMMA,
10678241744SMichael Mueller     S390_FEAT_SIE_PFMFI,
10778241744SMichael Mueller     S390_FEAT_SIE_IBS,
108ec3aadb1SJason J. Herne 
109ec3aadb1SJason J. Herne     /* Sclp Cpu */
11078241744SMichael Mueller     S390_FEAT_SIE_F2,
11178241744SMichael Mueller     S390_FEAT_SIE_SKEY,
11278241744SMichael Mueller     S390_FEAT_SIE_GPERE,
11378241744SMichael Mueller     S390_FEAT_SIE_SIIF,
11478241744SMichael Mueller     S390_FEAT_SIE_SIGPIF,
11578241744SMichael Mueller     S390_FEAT_SIE_IB,
11678241744SMichael Mueller     S390_FEAT_SIE_CEI,
117ec3aadb1SJason J. Herne 
118ec3aadb1SJason J. Herne     /* Misc */
11978241744SMichael Mueller     S390_FEAT_DAT_ENH_2,
12078241744SMichael Mueller     S390_FEAT_CMM,
121ec3aadb1SJason J. Herne 
122ec3aadb1SJason J. Herne     /* PLO */
12378241744SMichael Mueller     S390_FEAT_PLO_CL,
12478241744SMichael Mueller     S390_FEAT_PLO_CLG,
12578241744SMichael Mueller     S390_FEAT_PLO_CLGR,
12678241744SMichael Mueller     S390_FEAT_PLO_CLX,
12778241744SMichael Mueller     S390_FEAT_PLO_CS,
12878241744SMichael Mueller     S390_FEAT_PLO_CSG,
12978241744SMichael Mueller     S390_FEAT_PLO_CSGR,
13078241744SMichael Mueller     S390_FEAT_PLO_CSX,
13178241744SMichael Mueller     S390_FEAT_PLO_DCS,
13278241744SMichael Mueller     S390_FEAT_PLO_DCSG,
13378241744SMichael Mueller     S390_FEAT_PLO_DCSGR,
13478241744SMichael Mueller     S390_FEAT_PLO_DCSX,
13578241744SMichael Mueller     S390_FEAT_PLO_CSST,
13678241744SMichael Mueller     S390_FEAT_PLO_CSSTG,
13778241744SMichael Mueller     S390_FEAT_PLO_CSSTGR,
13878241744SMichael Mueller     S390_FEAT_PLO_CSSTX,
13978241744SMichael Mueller     S390_FEAT_PLO_CSDST,
14078241744SMichael Mueller     S390_FEAT_PLO_CSDSTG,
14178241744SMichael Mueller     S390_FEAT_PLO_CSDSTGR,
14278241744SMichael Mueller     S390_FEAT_PLO_CSDSTX,
14378241744SMichael Mueller     S390_FEAT_PLO_CSTST,
14478241744SMichael Mueller     S390_FEAT_PLO_CSTSTG,
14578241744SMichael Mueller     S390_FEAT_PLO_CSTSTGR,
14678241744SMichael Mueller     S390_FEAT_PLO_CSTSTX,
147ec3aadb1SJason J. Herne 
148ec3aadb1SJason J. Herne     /* PTFF */
14978241744SMichael Mueller     S390_FEAT_PTFF_QTO,
15078241744SMichael Mueller     S390_FEAT_PTFF_QSI,
15178241744SMichael Mueller     S390_FEAT_PTFF_QPT,
15278241744SMichael Mueller     S390_FEAT_PTFF_QUI,
15378241744SMichael Mueller     S390_FEAT_PTFF_QTOU,
15478241744SMichael Mueller     S390_FEAT_PTFF_STO,
15578241744SMichael Mueller     S390_FEAT_PTFF_STOU,
156ec3aadb1SJason J. Herne 
157ec3aadb1SJason J. Herne     /* KMAC */
15878241744SMichael Mueller     S390_FEAT_KMAC_DEA,
15978241744SMichael Mueller     S390_FEAT_KMAC_TDEA_128,
16078241744SMichael Mueller     S390_FEAT_KMAC_TDEA_192,
16178241744SMichael Mueller     S390_FEAT_KMAC_EDEA,
16278241744SMichael Mueller     S390_FEAT_KMAC_ETDEA_128,
16378241744SMichael Mueller     S390_FEAT_KMAC_ETDEA_192,
16478241744SMichael Mueller     S390_FEAT_KMAC_AES_128,
16578241744SMichael Mueller     S390_FEAT_KMAC_AES_192,
16678241744SMichael Mueller     S390_FEAT_KMAC_AES_256,
16778241744SMichael Mueller     S390_FEAT_KMAC_EAES_128,
16878241744SMichael Mueller     S390_FEAT_KMAC_EAES_192,
16978241744SMichael Mueller     S390_FEAT_KMAC_EAES_256,
170ec3aadb1SJason J. Herne 
171ec3aadb1SJason J. Herne     /* KMC */
17278241744SMichael Mueller     S390_FEAT_KMC_DEA,
17378241744SMichael Mueller     S390_FEAT_KMC_TDEA_128,
17478241744SMichael Mueller     S390_FEAT_KMC_TDEA_192,
17578241744SMichael Mueller     S390_FEAT_KMC_EDEA,
17678241744SMichael Mueller     S390_FEAT_KMC_ETDEA_128,
17778241744SMichael Mueller     S390_FEAT_KMC_ETDEA_192,
17878241744SMichael Mueller     S390_FEAT_KMC_AES_128,
17978241744SMichael Mueller     S390_FEAT_KMC_AES_192,
18078241744SMichael Mueller     S390_FEAT_KMC_AES_256,
18178241744SMichael Mueller     S390_FEAT_KMC_EAES_128,
18278241744SMichael Mueller     S390_FEAT_KMC_EAES_192,
18378241744SMichael Mueller     S390_FEAT_KMC_EAES_256,
18478241744SMichael Mueller     S390_FEAT_KMC_PRNG,
185ec3aadb1SJason J. Herne 
186ec3aadb1SJason J. Herne     /* KM */
18778241744SMichael Mueller     S390_FEAT_KM_DEA,
18878241744SMichael Mueller     S390_FEAT_KM_TDEA_128,
18978241744SMichael Mueller     S390_FEAT_KM_TDEA_192,
19078241744SMichael Mueller     S390_FEAT_KM_EDEA,
19178241744SMichael Mueller     S390_FEAT_KM_ETDEA_128,
19278241744SMichael Mueller     S390_FEAT_KM_ETDEA_192,
19378241744SMichael Mueller     S390_FEAT_KM_AES_128,
19478241744SMichael Mueller     S390_FEAT_KM_AES_192,
19578241744SMichael Mueller     S390_FEAT_KM_AES_256,
19678241744SMichael Mueller     S390_FEAT_KM_EAES_128,
19778241744SMichael Mueller     S390_FEAT_KM_EAES_192,
19878241744SMichael Mueller     S390_FEAT_KM_EAES_256,
19978241744SMichael Mueller     S390_FEAT_KM_XTS_AES_128,
20078241744SMichael Mueller     S390_FEAT_KM_XTS_AES_256,
20178241744SMichael Mueller     S390_FEAT_KM_XTS_EAES_128,
20278241744SMichael Mueller     S390_FEAT_KM_XTS_EAES_256,
203ec3aadb1SJason J. Herne 
204ec3aadb1SJason J. Herne     /* KIMD */
20578241744SMichael Mueller     S390_FEAT_KIMD_SHA_1,
20678241744SMichael Mueller     S390_FEAT_KIMD_SHA_256,
20778241744SMichael Mueller     S390_FEAT_KIMD_SHA_512,
2086da5c593SJason J. Herne     S390_FEAT_KIMD_SHA3_224,
2096da5c593SJason J. Herne     S390_FEAT_KIMD_SHA3_256,
2106da5c593SJason J. Herne     S390_FEAT_KIMD_SHA3_384,
2116da5c593SJason J. Herne     S390_FEAT_KIMD_SHA3_512,
2126da5c593SJason J. Herne     S390_FEAT_KIMD_SHAKE_128,
2136da5c593SJason J. Herne     S390_FEAT_KIMD_SHAKE_256,
21478241744SMichael Mueller     S390_FEAT_KIMD_GHASH,
215ec3aadb1SJason J. Herne 
216ec3aadb1SJason J. Herne     /* KLMD */
21778241744SMichael Mueller     S390_FEAT_KLMD_SHA_1,
21878241744SMichael Mueller     S390_FEAT_KLMD_SHA_256,
21978241744SMichael Mueller     S390_FEAT_KLMD_SHA_512,
2206da5c593SJason J. Herne     S390_FEAT_KLMD_SHA3_224,
2216da5c593SJason J. Herne     S390_FEAT_KLMD_SHA3_256,
2226da5c593SJason J. Herne     S390_FEAT_KLMD_SHA3_384,
2236da5c593SJason J. Herne     S390_FEAT_KLMD_SHA3_512,
2246da5c593SJason J. Herne     S390_FEAT_KLMD_SHAKE_128,
2256da5c593SJason J. Herne     S390_FEAT_KLMD_SHAKE_256,
226ec3aadb1SJason J. Herne 
227ec3aadb1SJason J. Herne     /* PCKMO */
22878241744SMichael Mueller     S390_FEAT_PCKMO_EDEA,
22978241744SMichael Mueller     S390_FEAT_PCKMO_ETDEA_128,
23078241744SMichael Mueller     S390_FEAT_PCKMO_ETDEA_256,
23178241744SMichael Mueller     S390_FEAT_PCKMO_AES_128,
23278241744SMichael Mueller     S390_FEAT_PCKMO_AES_192,
23378241744SMichael Mueller     S390_FEAT_PCKMO_AES_256,
234ec3aadb1SJason J. Herne 
235ec3aadb1SJason J. Herne     /* KMCTR */
23678241744SMichael Mueller     S390_FEAT_KMCTR_DEA,
23778241744SMichael Mueller     S390_FEAT_KMCTR_TDEA_128,
23878241744SMichael Mueller     S390_FEAT_KMCTR_TDEA_192,
23978241744SMichael Mueller     S390_FEAT_KMCTR_EDEA,
24078241744SMichael Mueller     S390_FEAT_KMCTR_ETDEA_128,
24178241744SMichael Mueller     S390_FEAT_KMCTR_ETDEA_192,
24278241744SMichael Mueller     S390_FEAT_KMCTR_AES_128,
24378241744SMichael Mueller     S390_FEAT_KMCTR_AES_192,
24478241744SMichael Mueller     S390_FEAT_KMCTR_AES_256,
24578241744SMichael Mueller     S390_FEAT_KMCTR_EAES_128,
24678241744SMichael Mueller     S390_FEAT_KMCTR_EAES_192,
24778241744SMichael Mueller     S390_FEAT_KMCTR_EAES_256,
248ec3aadb1SJason J. Herne 
249ec3aadb1SJason J. Herne     /* KMF */
25078241744SMichael Mueller     S390_FEAT_KMF_DEA,
25178241744SMichael Mueller     S390_FEAT_KMF_TDEA_128,
25278241744SMichael Mueller     S390_FEAT_KMF_TDEA_192,
25378241744SMichael Mueller     S390_FEAT_KMF_EDEA,
25478241744SMichael Mueller     S390_FEAT_KMF_ETDEA_128,
25578241744SMichael Mueller     S390_FEAT_KMF_ETDEA_192,
25678241744SMichael Mueller     S390_FEAT_KMF_AES_128,
25778241744SMichael Mueller     S390_FEAT_KMF_AES_192,
25878241744SMichael Mueller     S390_FEAT_KMF_AES_256,
25978241744SMichael Mueller     S390_FEAT_KMF_EAES_128,
26078241744SMichael Mueller     S390_FEAT_KMF_EAES_192,
26178241744SMichael Mueller     S390_FEAT_KMF_EAES_256,
262ec3aadb1SJason J. Herne 
263ec3aadb1SJason J. Herne     /* KMO */
26478241744SMichael Mueller     S390_FEAT_KMO_DEA,
26578241744SMichael Mueller     S390_FEAT_KMO_TDEA_128,
26678241744SMichael Mueller     S390_FEAT_KMO_TDEA_192,
26778241744SMichael Mueller     S390_FEAT_KMO_EDEA,
26878241744SMichael Mueller     S390_FEAT_KMO_ETDEA_128,
26978241744SMichael Mueller     S390_FEAT_KMO_ETDEA_192,
27078241744SMichael Mueller     S390_FEAT_KMO_AES_128,
27178241744SMichael Mueller     S390_FEAT_KMO_AES_192,
27278241744SMichael Mueller     S390_FEAT_KMO_AES_256,
27378241744SMichael Mueller     S390_FEAT_KMO_EAES_128,
27478241744SMichael Mueller     S390_FEAT_KMO_EAES_192,
27578241744SMichael Mueller     S390_FEAT_KMO_EAES_256,
276ec3aadb1SJason J. Herne 
277ec3aadb1SJason J. Herne     /* PCC */
27878241744SMichael Mueller     S390_FEAT_PCC_CMAC_DEA,
27978241744SMichael Mueller     S390_FEAT_PCC_CMAC_TDEA_128,
28078241744SMichael Mueller     S390_FEAT_PCC_CMAC_TDEA_192,
28178241744SMichael Mueller     S390_FEAT_PCC_CMAC_ETDEA_128,
28278241744SMichael Mueller     S390_FEAT_PCC_CMAC_ETDEA_192,
28378241744SMichael Mueller     S390_FEAT_PCC_CMAC_TDEA,
28478241744SMichael Mueller     S390_FEAT_PCC_CMAC_AES_128,
28578241744SMichael Mueller     S390_FEAT_PCC_CMAC_AES_192,
28678241744SMichael Mueller     S390_FEAT_PCC_CMAC_AES_256,
28778241744SMichael Mueller     S390_FEAT_PCC_CMAC_EAES_128,
28878241744SMichael Mueller     S390_FEAT_PCC_CMAC_EAES_192,
28978241744SMichael Mueller     S390_FEAT_PCC_CMAC_EAES_256,
29078241744SMichael Mueller     S390_FEAT_PCC_XTS_AES_128,
29178241744SMichael Mueller     S390_FEAT_PCC_XTS_AES_256,
29278241744SMichael Mueller     S390_FEAT_PCC_XTS_EAES_128,
29378241744SMichael Mueller     S390_FEAT_PCC_XTS_EAES_256,
294ec3aadb1SJason J. Herne 
2956da5c593SJason J. Herne     /* PPNO/PRNO */
29678241744SMichael Mueller     S390_FEAT_PPNO_SHA_512_DRNG,
2976da5c593SJason J. Herne     S390_FEAT_PRNO_TRNG_QRTCR,
2986da5c593SJason J. Herne     S390_FEAT_PRNO_TRNG,
2996da5c593SJason J. Herne 
3006da5c593SJason J. Herne     /* KMA */
3016da5c593SJason J. Herne     S390_FEAT_KMA_GCM_AES_128,
3026da5c593SJason J. Herne     S390_FEAT_KMA_GCM_AES_192,
3036da5c593SJason J. Herne     S390_FEAT_KMA_GCM_AES_256 ,
3046da5c593SJason J. Herne     S390_FEAT_KMA_GCM_EAES_128,
3056da5c593SJason J. Herne     S390_FEAT_KMA_GCM_EAES_192,
3066da5c593SJason J. Herne     S390_FEAT_KMA_GCM_EAES_256,
30778241744SMichael Mueller     S390_FEAT_MAX,
30878241744SMichael Mueller } S390Feat;
30978241744SMichael Mueller 
31078241744SMichael Mueller #endif /* TARGET_S390X_CPU_FEATURES_DEF_H */
311