1 /*
2  * CPU features/facilities for s390
3  *
4  * Copyright 2016 IBM Corp.
5  *
6  * Author(s): Michael Mueller <mimu@linux.vnet.ibm.com>
7  *            David Hildenbrand <dahi@linux.vnet.ibm.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2 or (at
10  * your option) any later version. See the COPYING file in the top-level
11  * directory.
12  */
13 
14 #ifndef TARGET_S390X_CPU_FEATURES_DEF_H
15 #define TARGET_S390X_CPU_FEATURES_DEF_H
16 
17 typedef enum {
18     /* Stfle */
19     S390_FEAT_ESAN3 = 0,
20     S390_FEAT_ZARCH,
21     S390_FEAT_DAT_ENH,
22     S390_FEAT_IDTE_SEGMENT,
23     S390_FEAT_IDTE_REGION,
24     S390_FEAT_ASN_LX_REUSE,
25     S390_FEAT_STFLE,
26     S390_FEAT_EDAT,
27     S390_FEAT_SENSE_RUNNING_STATUS,
28     S390_FEAT_CONDITIONAL_SSKE,
29     S390_FEAT_CONFIGURATION_TOPOLOGY,
30     S390_FEAT_IPTE_RANGE,
31     S390_FEAT_NONQ_KEY_SETTING,
32     S390_FEAT_EXTENDED_TRANSLATION_2,
33     S390_FEAT_MSA,
34     S390_FEAT_LONG_DISPLACEMENT,
35     S390_FEAT_LONG_DISPLACEMENT_FAST,
36     S390_FEAT_HFP_MADDSUB,
37     S390_FEAT_EXTENDED_IMMEDIATE,
38     S390_FEAT_EXTENDED_TRANSLATION_3,
39     S390_FEAT_HFP_UNNORMALIZED_EXT,
40     S390_FEAT_ETF2_ENH,
41     S390_FEAT_STORE_CLOCK_FAST,
42     S390_FEAT_PARSING_ENH,
43     S390_FEAT_MOVE_WITH_OPTIONAL_SPEC,
44     S390_FEAT_TOD_CLOCK_STEERING,
45     S390_FEAT_ETF3_ENH,
46     S390_FEAT_EXTRACT_CPU_TIME,
47     S390_FEAT_COMPARE_AND_SWAP_AND_STORE,
48     S390_FEAT_COMPARE_AND_SWAP_AND_STORE_2,
49     S390_FEAT_GENERAL_INSTRUCTIONS_EXT,
50     S390_FEAT_EXECUTE_EXT,
51     S390_FEAT_ENHANCED_MONITOR,
52     S390_FEAT_FLOATING_POINT_EXT,
53     S390_FEAT_ORDER_PRESERVING_COMPRESSION,
54     S390_FEAT_SET_PROGRAM_PARAMETERS,
55     S390_FEAT_FLOATING_POINT_SUPPPORT_ENH,
56     S390_FEAT_DFP,
57     S390_FEAT_DFP_FAST,
58     S390_FEAT_PFPO,
59     S390_FEAT_STFLE_45,
60     S390_FEAT_CMPSC_ENH,
61     S390_FEAT_DFP_ZONED_CONVERSION,
62     S390_FEAT_STFLE_49,
63     S390_FEAT_CONSTRAINT_TRANSACTIONAL_EXE,
64     S390_FEAT_LOCAL_TLB_CLEARING,
65     S390_FEAT_INTERLOCKED_ACCESS_2,
66     S390_FEAT_STFLE_53,
67     S390_FEAT_ENTROPY_ENC_COMP,
68     S390_FEAT_MSA_EXT_5,
69     S390_FEAT_MISC_INSTRUCTION_EXT,
70     S390_FEAT_SEMAPHORE_ASSIST,
71     S390_FEAT_TIME_SLICE_INSTRUMENTATION,
72     S390_FEAT_RUNTIME_INSTRUMENTATION,
73     S390_FEAT_ZPCI,
74     S390_FEAT_ADAPTER_EVENT_NOTIFICATION,
75     S390_FEAT_ADAPTER_INT_SUPPRESSION,
76     S390_FEAT_TRANSACTIONAL_EXE,
77     S390_FEAT_STORE_HYPERVISOR_INFO,
78     S390_FEAT_ACCESS_EXCEPTION_FS_INDICATION,
79     S390_FEAT_MSA_EXT_3,
80     S390_FEAT_MSA_EXT_4,
81     S390_FEAT_EDAT_2,
82     S390_FEAT_DFP_PACKED_CONVERSION,
83     S390_FEAT_PPA15,
84     S390_FEAT_BPB,
85     S390_FEAT_VECTOR,
86     S390_FEAT_INSTRUCTION_EXEC_PROT,
87     S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
88     S390_FEAT_GUARDED_STORAGE,
89     S390_FEAT_VECTOR_PACKED_DECIMAL,
90     S390_FEAT_VECTOR_ENH,
91     S390_FEAT_MULTIPLE_EPOCH,
92     S390_FEAT_TEST_PENDING_EXT_INTERRUPTION,
93     S390_FEAT_INSERT_REFERENCE_BITS_MULT,
94     S390_FEAT_MSA_EXT_8,
95     S390_FEAT_CMM_NT,
96 
97     /* Sclp Conf Char */
98     S390_FEAT_SIE_GSLS,
99     S390_FEAT_ESOP,
100     S390_FEAT_HPMA2,
101     S390_FEAT_SIE_KSS,
102 
103     /* Sclp Conf Char Ext */
104     S390_FEAT_SIE_64BSCAO,
105     S390_FEAT_SIE_CMMA,
106     S390_FEAT_SIE_PFMFI,
107     S390_FEAT_SIE_IBS,
108 
109     /* Sclp Cpu */
110     S390_FEAT_SIE_F2,
111     S390_FEAT_SIE_SKEY,
112     S390_FEAT_SIE_GPERE,
113     S390_FEAT_SIE_SIIF,
114     S390_FEAT_SIE_SIGPIF,
115     S390_FEAT_SIE_IB,
116     S390_FEAT_SIE_CEI,
117 
118     /* Misc */
119     S390_FEAT_DAT_ENH_2,
120     S390_FEAT_CMM,
121 
122     /* PLO */
123     S390_FEAT_PLO_CL,
124     S390_FEAT_PLO_CLG,
125     S390_FEAT_PLO_CLGR,
126     S390_FEAT_PLO_CLX,
127     S390_FEAT_PLO_CS,
128     S390_FEAT_PLO_CSG,
129     S390_FEAT_PLO_CSGR,
130     S390_FEAT_PLO_CSX,
131     S390_FEAT_PLO_DCS,
132     S390_FEAT_PLO_DCSG,
133     S390_FEAT_PLO_DCSGR,
134     S390_FEAT_PLO_DCSX,
135     S390_FEAT_PLO_CSST,
136     S390_FEAT_PLO_CSSTG,
137     S390_FEAT_PLO_CSSTGR,
138     S390_FEAT_PLO_CSSTX,
139     S390_FEAT_PLO_CSDST,
140     S390_FEAT_PLO_CSDSTG,
141     S390_FEAT_PLO_CSDSTGR,
142     S390_FEAT_PLO_CSDSTX,
143     S390_FEAT_PLO_CSTST,
144     S390_FEAT_PLO_CSTSTG,
145     S390_FEAT_PLO_CSTSTGR,
146     S390_FEAT_PLO_CSTSTX,
147 
148     /* PTFF */
149     S390_FEAT_PTFF_QTO,
150     S390_FEAT_PTFF_QSI,
151     S390_FEAT_PTFF_QPT,
152     S390_FEAT_PTFF_QUI,
153     S390_FEAT_PTFF_QTOU,
154     S390_FEAT_PTFF_QSIE,
155     S390_FEAT_PTFF_QTOUE,
156     S390_FEAT_PTFF_STO,
157     S390_FEAT_PTFF_STOU,
158     S390_FEAT_PTFF_STOE,
159     S390_FEAT_PTFF_STOUE,
160 
161     /* KMAC */
162     S390_FEAT_KMAC_DEA,
163     S390_FEAT_KMAC_TDEA_128,
164     S390_FEAT_KMAC_TDEA_192,
165     S390_FEAT_KMAC_EDEA,
166     S390_FEAT_KMAC_ETDEA_128,
167     S390_FEAT_KMAC_ETDEA_192,
168     S390_FEAT_KMAC_AES_128,
169     S390_FEAT_KMAC_AES_192,
170     S390_FEAT_KMAC_AES_256,
171     S390_FEAT_KMAC_EAES_128,
172     S390_FEAT_KMAC_EAES_192,
173     S390_FEAT_KMAC_EAES_256,
174 
175     /* KMC */
176     S390_FEAT_KMC_DEA,
177     S390_FEAT_KMC_TDEA_128,
178     S390_FEAT_KMC_TDEA_192,
179     S390_FEAT_KMC_EDEA,
180     S390_FEAT_KMC_ETDEA_128,
181     S390_FEAT_KMC_ETDEA_192,
182     S390_FEAT_KMC_AES_128,
183     S390_FEAT_KMC_AES_192,
184     S390_FEAT_KMC_AES_256,
185     S390_FEAT_KMC_EAES_128,
186     S390_FEAT_KMC_EAES_192,
187     S390_FEAT_KMC_EAES_256,
188     S390_FEAT_KMC_PRNG,
189 
190     /* KM */
191     S390_FEAT_KM_DEA,
192     S390_FEAT_KM_TDEA_128,
193     S390_FEAT_KM_TDEA_192,
194     S390_FEAT_KM_EDEA,
195     S390_FEAT_KM_ETDEA_128,
196     S390_FEAT_KM_ETDEA_192,
197     S390_FEAT_KM_AES_128,
198     S390_FEAT_KM_AES_192,
199     S390_FEAT_KM_AES_256,
200     S390_FEAT_KM_EAES_128,
201     S390_FEAT_KM_EAES_192,
202     S390_FEAT_KM_EAES_256,
203     S390_FEAT_KM_XTS_AES_128,
204     S390_FEAT_KM_XTS_AES_256,
205     S390_FEAT_KM_XTS_EAES_128,
206     S390_FEAT_KM_XTS_EAES_256,
207 
208     /* KIMD */
209     S390_FEAT_KIMD_SHA_1,
210     S390_FEAT_KIMD_SHA_256,
211     S390_FEAT_KIMD_SHA_512,
212     S390_FEAT_KIMD_SHA3_224,
213     S390_FEAT_KIMD_SHA3_256,
214     S390_FEAT_KIMD_SHA3_384,
215     S390_FEAT_KIMD_SHA3_512,
216     S390_FEAT_KIMD_SHAKE_128,
217     S390_FEAT_KIMD_SHAKE_256,
218     S390_FEAT_KIMD_GHASH,
219 
220     /* KLMD */
221     S390_FEAT_KLMD_SHA_1,
222     S390_FEAT_KLMD_SHA_256,
223     S390_FEAT_KLMD_SHA_512,
224     S390_FEAT_KLMD_SHA3_224,
225     S390_FEAT_KLMD_SHA3_256,
226     S390_FEAT_KLMD_SHA3_384,
227     S390_FEAT_KLMD_SHA3_512,
228     S390_FEAT_KLMD_SHAKE_128,
229     S390_FEAT_KLMD_SHAKE_256,
230 
231     /* PCKMO */
232     S390_FEAT_PCKMO_EDEA,
233     S390_FEAT_PCKMO_ETDEA_128,
234     S390_FEAT_PCKMO_ETDEA_256,
235     S390_FEAT_PCKMO_AES_128,
236     S390_FEAT_PCKMO_AES_192,
237     S390_FEAT_PCKMO_AES_256,
238 
239     /* KMCTR */
240     S390_FEAT_KMCTR_DEA,
241     S390_FEAT_KMCTR_TDEA_128,
242     S390_FEAT_KMCTR_TDEA_192,
243     S390_FEAT_KMCTR_EDEA,
244     S390_FEAT_KMCTR_ETDEA_128,
245     S390_FEAT_KMCTR_ETDEA_192,
246     S390_FEAT_KMCTR_AES_128,
247     S390_FEAT_KMCTR_AES_192,
248     S390_FEAT_KMCTR_AES_256,
249     S390_FEAT_KMCTR_EAES_128,
250     S390_FEAT_KMCTR_EAES_192,
251     S390_FEAT_KMCTR_EAES_256,
252 
253     /* KMF */
254     S390_FEAT_KMF_DEA,
255     S390_FEAT_KMF_TDEA_128,
256     S390_FEAT_KMF_TDEA_192,
257     S390_FEAT_KMF_EDEA,
258     S390_FEAT_KMF_ETDEA_128,
259     S390_FEAT_KMF_ETDEA_192,
260     S390_FEAT_KMF_AES_128,
261     S390_FEAT_KMF_AES_192,
262     S390_FEAT_KMF_AES_256,
263     S390_FEAT_KMF_EAES_128,
264     S390_FEAT_KMF_EAES_192,
265     S390_FEAT_KMF_EAES_256,
266 
267     /* KMO */
268     S390_FEAT_KMO_DEA,
269     S390_FEAT_KMO_TDEA_128,
270     S390_FEAT_KMO_TDEA_192,
271     S390_FEAT_KMO_EDEA,
272     S390_FEAT_KMO_ETDEA_128,
273     S390_FEAT_KMO_ETDEA_192,
274     S390_FEAT_KMO_AES_128,
275     S390_FEAT_KMO_AES_192,
276     S390_FEAT_KMO_AES_256,
277     S390_FEAT_KMO_EAES_128,
278     S390_FEAT_KMO_EAES_192,
279     S390_FEAT_KMO_EAES_256,
280 
281     /* PCC */
282     S390_FEAT_PCC_CMAC_DEA,
283     S390_FEAT_PCC_CMAC_TDEA_128,
284     S390_FEAT_PCC_CMAC_TDEA_192,
285     S390_FEAT_PCC_CMAC_ETDEA_128,
286     S390_FEAT_PCC_CMAC_ETDEA_192,
287     S390_FEAT_PCC_CMAC_TDEA,
288     S390_FEAT_PCC_CMAC_AES_128,
289     S390_FEAT_PCC_CMAC_AES_192,
290     S390_FEAT_PCC_CMAC_AES_256,
291     S390_FEAT_PCC_CMAC_EAES_128,
292     S390_FEAT_PCC_CMAC_EAES_192,
293     S390_FEAT_PCC_CMAC_EAES_256,
294     S390_FEAT_PCC_XTS_AES_128,
295     S390_FEAT_PCC_XTS_AES_256,
296     S390_FEAT_PCC_XTS_EAES_128,
297     S390_FEAT_PCC_XTS_EAES_256,
298 
299     /* PPNO/PRNO */
300     S390_FEAT_PPNO_SHA_512_DRNG,
301     S390_FEAT_PRNO_TRNG_QRTCR,
302     S390_FEAT_PRNO_TRNG,
303 
304     /* KMA */
305     S390_FEAT_KMA_GCM_AES_128,
306     S390_FEAT_KMA_GCM_AES_192,
307     S390_FEAT_KMA_GCM_AES_256 ,
308     S390_FEAT_KMA_GCM_EAES_128,
309     S390_FEAT_KMA_GCM_EAES_192,
310     S390_FEAT_KMA_GCM_EAES_256,
311     S390_FEAT_MAX,
312 } S390Feat;
313 
314 #endif /* TARGET_S390X_CPU_FEATURES_DEF_H */
315