1 /*
2  * CPU features/facilities for s390
3  *
4  * Copyright IBM Corp. 2016, 2018
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_AP_QUERY_CONFIG_INFO,
31     S390_FEAT_IPTE_RANGE,
32     S390_FEAT_NONQ_KEY_SETTING,
33     S390_FEAT_AP_FACILITIES_TEST,
34     S390_FEAT_EXTENDED_TRANSLATION_2,
35     S390_FEAT_MSA,
36     S390_FEAT_LONG_DISPLACEMENT,
37     S390_FEAT_LONG_DISPLACEMENT_FAST,
38     S390_FEAT_HFP_MADDSUB,
39     S390_FEAT_EXTENDED_IMMEDIATE,
40     S390_FEAT_EXTENDED_TRANSLATION_3,
41     S390_FEAT_HFP_UNNORMALIZED_EXT,
42     S390_FEAT_ETF2_ENH,
43     S390_FEAT_STORE_CLOCK_FAST,
44     S390_FEAT_PARSING_ENH,
45     S390_FEAT_MOVE_WITH_OPTIONAL_SPEC,
46     S390_FEAT_TOD_CLOCK_STEERING,
47     S390_FEAT_ETF3_ENH,
48     S390_FEAT_EXTRACT_CPU_TIME,
49     S390_FEAT_COMPARE_AND_SWAP_AND_STORE,
50     S390_FEAT_COMPARE_AND_SWAP_AND_STORE_2,
51     S390_FEAT_GENERAL_INSTRUCTIONS_EXT,
52     S390_FEAT_EXECUTE_EXT,
53     S390_FEAT_ENHANCED_MONITOR,
54     S390_FEAT_FLOATING_POINT_EXT,
55     S390_FEAT_ORDER_PRESERVING_COMPRESSION,
56     S390_FEAT_SET_PROGRAM_PARAMETERS,
57     S390_FEAT_FLOATING_POINT_SUPPPORT_ENH,
58     S390_FEAT_DFP,
59     S390_FEAT_DFP_FAST,
60     S390_FEAT_PFPO,
61     S390_FEAT_STFLE_45,
62     S390_FEAT_CMPSC_ENH,
63     S390_FEAT_DFP_ZONED_CONVERSION,
64     S390_FEAT_STFLE_49,
65     S390_FEAT_CONSTRAINT_TRANSACTIONAL_EXE,
66     S390_FEAT_LOCAL_TLB_CLEARING,
67     S390_FEAT_INTERLOCKED_ACCESS_2,
68     S390_FEAT_STFLE_53,
69     S390_FEAT_ENTROPY_ENC_COMP,
70     S390_FEAT_MSA_EXT_5,
71     S390_FEAT_MISC_INSTRUCTION_EXT,
72     S390_FEAT_SEMAPHORE_ASSIST,
73     S390_FEAT_TIME_SLICE_INSTRUMENTATION,
74     S390_FEAT_MISC_INSTRUCTION_EXT3,
75     S390_FEAT_RUNTIME_INSTRUMENTATION,
76     S390_FEAT_ZPCI,
77     S390_FEAT_ADAPTER_EVENT_NOTIFICATION,
78     S390_FEAT_ADAPTER_INT_SUPPRESSION,
79     S390_FEAT_TRANSACTIONAL_EXE,
80     S390_FEAT_STORE_HYPERVISOR_INFO,
81     S390_FEAT_ACCESS_EXCEPTION_FS_INDICATION,
82     S390_FEAT_MSA_EXT_3,
83     S390_FEAT_MSA_EXT_4,
84     S390_FEAT_EDAT_2,
85     S390_FEAT_DFP_PACKED_CONVERSION,
86     S390_FEAT_PPA15,
87     S390_FEAT_BPB,
88     S390_FEAT_VECTOR,
89     S390_FEAT_INSTRUCTION_EXEC_PROT,
90     S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
91     S390_FEAT_GUARDED_STORAGE,
92     S390_FEAT_VECTOR_PACKED_DECIMAL,
93     S390_FEAT_VECTOR_ENH,
94     S390_FEAT_MULTIPLE_EPOCH,
95     S390_FEAT_TEST_PENDING_EXT_INTERRUPTION,
96     S390_FEAT_INSERT_REFERENCE_BITS_MULT,
97     S390_FEAT_MSA_EXT_8,
98     S390_FEAT_CMM_NT,
99     S390_FEAT_VECTOR_ENH2,
100     S390_FEAT_ESORT_BASE,
101     S390_FEAT_DEFLATE_BASE,
102     S390_FEAT_VECTOR_BCD_ENH,
103     S390_FEAT_MSA_EXT_9,
104     S390_FEAT_ETOKEN,
105 
106     /* Sclp Conf Char */
107     S390_FEAT_SIE_GSLS,
108     S390_FEAT_ESOP,
109     S390_FEAT_HPMA2,
110     S390_FEAT_SIE_KSS,
111 
112     /* Sclp Conf Char Ext */
113     S390_FEAT_SIE_64BSCAO,
114     S390_FEAT_SIE_CMMA,
115     S390_FEAT_SIE_PFMFI,
116     S390_FEAT_SIE_IBS,
117 
118     /* Sclp Cpu */
119     S390_FEAT_SIE_F2,
120     S390_FEAT_SIE_SKEY,
121     S390_FEAT_SIE_GPERE,
122     S390_FEAT_SIE_SIIF,
123     S390_FEAT_SIE_SIGPIF,
124     S390_FEAT_SIE_IB,
125     S390_FEAT_SIE_CEI,
126 
127     /* Misc */
128     S390_FEAT_DAT_ENH_2,
129     S390_FEAT_CMM,
130     S390_FEAT_AP,
131 
132     /* PLO */
133     S390_FEAT_PLO_CL,
134     S390_FEAT_PLO_CLG,
135     S390_FEAT_PLO_CLGR,
136     S390_FEAT_PLO_CLX,
137     S390_FEAT_PLO_CS,
138     S390_FEAT_PLO_CSG,
139     S390_FEAT_PLO_CSGR,
140     S390_FEAT_PLO_CSX,
141     S390_FEAT_PLO_DCS,
142     S390_FEAT_PLO_DCSG,
143     S390_FEAT_PLO_DCSGR,
144     S390_FEAT_PLO_DCSX,
145     S390_FEAT_PLO_CSST,
146     S390_FEAT_PLO_CSSTG,
147     S390_FEAT_PLO_CSSTGR,
148     S390_FEAT_PLO_CSSTX,
149     S390_FEAT_PLO_CSDST,
150     S390_FEAT_PLO_CSDSTG,
151     S390_FEAT_PLO_CSDSTGR,
152     S390_FEAT_PLO_CSDSTX,
153     S390_FEAT_PLO_CSTST,
154     S390_FEAT_PLO_CSTSTG,
155     S390_FEAT_PLO_CSTSTGR,
156     S390_FEAT_PLO_CSTSTX,
157 
158     /* PTFF */
159     S390_FEAT_PTFF_QTO,
160     S390_FEAT_PTFF_QSI,
161     S390_FEAT_PTFF_QPT,
162     S390_FEAT_PTFF_QUI,
163     S390_FEAT_PTFF_QTOU,
164     S390_FEAT_PTFF_QSIE,
165     S390_FEAT_PTFF_QTOUE,
166     S390_FEAT_PTFF_STO,
167     S390_FEAT_PTFF_STOU,
168     S390_FEAT_PTFF_STOE,
169     S390_FEAT_PTFF_STOUE,
170 
171     /* KMAC */
172     S390_FEAT_KMAC_DEA,
173     S390_FEAT_KMAC_TDEA_128,
174     S390_FEAT_KMAC_TDEA_192,
175     S390_FEAT_KMAC_EDEA,
176     S390_FEAT_KMAC_ETDEA_128,
177     S390_FEAT_KMAC_ETDEA_192,
178     S390_FEAT_KMAC_AES_128,
179     S390_FEAT_KMAC_AES_192,
180     S390_FEAT_KMAC_AES_256,
181     S390_FEAT_KMAC_EAES_128,
182     S390_FEAT_KMAC_EAES_192,
183     S390_FEAT_KMAC_EAES_256,
184 
185     /* KMC */
186     S390_FEAT_KMC_DEA,
187     S390_FEAT_KMC_TDEA_128,
188     S390_FEAT_KMC_TDEA_192,
189     S390_FEAT_KMC_EDEA,
190     S390_FEAT_KMC_ETDEA_128,
191     S390_FEAT_KMC_ETDEA_192,
192     S390_FEAT_KMC_AES_128,
193     S390_FEAT_KMC_AES_192,
194     S390_FEAT_KMC_AES_256,
195     S390_FEAT_KMC_EAES_128,
196     S390_FEAT_KMC_EAES_192,
197     S390_FEAT_KMC_EAES_256,
198     S390_FEAT_KMC_PRNG,
199 
200     /* KM */
201     S390_FEAT_KM_DEA,
202     S390_FEAT_KM_TDEA_128,
203     S390_FEAT_KM_TDEA_192,
204     S390_FEAT_KM_EDEA,
205     S390_FEAT_KM_ETDEA_128,
206     S390_FEAT_KM_ETDEA_192,
207     S390_FEAT_KM_AES_128,
208     S390_FEAT_KM_AES_192,
209     S390_FEAT_KM_AES_256,
210     S390_FEAT_KM_EAES_128,
211     S390_FEAT_KM_EAES_192,
212     S390_FEAT_KM_EAES_256,
213     S390_FEAT_KM_XTS_AES_128,
214     S390_FEAT_KM_XTS_AES_256,
215     S390_FEAT_KM_XTS_EAES_128,
216     S390_FEAT_KM_XTS_EAES_256,
217 
218     /* KIMD */
219     S390_FEAT_KIMD_SHA_1,
220     S390_FEAT_KIMD_SHA_256,
221     S390_FEAT_KIMD_SHA_512,
222     S390_FEAT_KIMD_SHA3_224,
223     S390_FEAT_KIMD_SHA3_256,
224     S390_FEAT_KIMD_SHA3_384,
225     S390_FEAT_KIMD_SHA3_512,
226     S390_FEAT_KIMD_SHAKE_128,
227     S390_FEAT_KIMD_SHAKE_256,
228     S390_FEAT_KIMD_GHASH,
229 
230     /* KLMD */
231     S390_FEAT_KLMD_SHA_1,
232     S390_FEAT_KLMD_SHA_256,
233     S390_FEAT_KLMD_SHA_512,
234     S390_FEAT_KLMD_SHA3_224,
235     S390_FEAT_KLMD_SHA3_256,
236     S390_FEAT_KLMD_SHA3_384,
237     S390_FEAT_KLMD_SHA3_512,
238     S390_FEAT_KLMD_SHAKE_128,
239     S390_FEAT_KLMD_SHAKE_256,
240 
241     /* PCKMO */
242     S390_FEAT_PCKMO_EDEA,
243     S390_FEAT_PCKMO_ETDEA_128,
244     S390_FEAT_PCKMO_ETDEA_256,
245     S390_FEAT_PCKMO_AES_128,
246     S390_FEAT_PCKMO_AES_192,
247     S390_FEAT_PCKMO_AES_256,
248     S390_FEAT_PCKMO_ECC_P256,
249     S390_FEAT_PCKMO_ECC_P384,
250     S390_FEAT_PCKMO_ECC_P521,
251     S390_FEAT_PCKMO_ECC_ED25519,
252     S390_FEAT_PCKMO_ECC_ED448,
253 
254     /* KMCTR */
255     S390_FEAT_KMCTR_DEA,
256     S390_FEAT_KMCTR_TDEA_128,
257     S390_FEAT_KMCTR_TDEA_192,
258     S390_FEAT_KMCTR_EDEA,
259     S390_FEAT_KMCTR_ETDEA_128,
260     S390_FEAT_KMCTR_ETDEA_192,
261     S390_FEAT_KMCTR_AES_128,
262     S390_FEAT_KMCTR_AES_192,
263     S390_FEAT_KMCTR_AES_256,
264     S390_FEAT_KMCTR_EAES_128,
265     S390_FEAT_KMCTR_EAES_192,
266     S390_FEAT_KMCTR_EAES_256,
267 
268     /* KMF */
269     S390_FEAT_KMF_DEA,
270     S390_FEAT_KMF_TDEA_128,
271     S390_FEAT_KMF_TDEA_192,
272     S390_FEAT_KMF_EDEA,
273     S390_FEAT_KMF_ETDEA_128,
274     S390_FEAT_KMF_ETDEA_192,
275     S390_FEAT_KMF_AES_128,
276     S390_FEAT_KMF_AES_192,
277     S390_FEAT_KMF_AES_256,
278     S390_FEAT_KMF_EAES_128,
279     S390_FEAT_KMF_EAES_192,
280     S390_FEAT_KMF_EAES_256,
281 
282     /* KMO */
283     S390_FEAT_KMO_DEA,
284     S390_FEAT_KMO_TDEA_128,
285     S390_FEAT_KMO_TDEA_192,
286     S390_FEAT_KMO_EDEA,
287     S390_FEAT_KMO_ETDEA_128,
288     S390_FEAT_KMO_ETDEA_192,
289     S390_FEAT_KMO_AES_128,
290     S390_FEAT_KMO_AES_192,
291     S390_FEAT_KMO_AES_256,
292     S390_FEAT_KMO_EAES_128,
293     S390_FEAT_KMO_EAES_192,
294     S390_FEAT_KMO_EAES_256,
295 
296     /* PCC */
297     S390_FEAT_PCC_CMAC_DEA,
298     S390_FEAT_PCC_CMAC_TDEA_128,
299     S390_FEAT_PCC_CMAC_TDEA_192,
300     S390_FEAT_PCC_CMAC_ETDEA_128,
301     S390_FEAT_PCC_CMAC_ETDEA_192,
302     S390_FEAT_PCC_CMAC_TDEA,
303     S390_FEAT_PCC_CMAC_AES_128,
304     S390_FEAT_PCC_CMAC_AES_192,
305     S390_FEAT_PCC_CMAC_AES_256,
306     S390_FEAT_PCC_CMAC_EAES_128,
307     S390_FEAT_PCC_CMAC_EAES_192,
308     S390_FEAT_PCC_CMAC_EAES_256,
309     S390_FEAT_PCC_XTS_AES_128,
310     S390_FEAT_PCC_XTS_AES_256,
311     S390_FEAT_PCC_XTS_EAES_128,
312     S390_FEAT_PCC_XTS_EAES_256,
313     S390_FEAT_PCC_SCALAR_MULT_P256,
314     S390_FEAT_PCC_SCALAR_MULT_P384,
315     S390_FEAT_PCC_SCALAR_MULT_P512,
316     S390_FEAT_PCC_SCALAR_MULT_ED25519,
317     S390_FEAT_PCC_SCALAR_MULT_ED448,
318     S390_FEAT_PCC_SCALAR_MULT_X25519,
319     S390_FEAT_PCC_SCALAR_MULT_X448,
320 
321     /* PPNO/PRNO */
322     S390_FEAT_PPNO_SHA_512_DRNG,
323     S390_FEAT_PRNO_TRNG_QRTCR,
324     S390_FEAT_PRNO_TRNG,
325 
326     /* KMA */
327     S390_FEAT_KMA_GCM_AES_128,
328     S390_FEAT_KMA_GCM_AES_192,
329     S390_FEAT_KMA_GCM_AES_256 ,
330     S390_FEAT_KMA_GCM_EAES_128,
331     S390_FEAT_KMA_GCM_EAES_192,
332     S390_FEAT_KMA_GCM_EAES_256,
333 
334     /* KDSA */
335     S390_FEAT_ECDSA_VERIFY_P256,
336     S390_FEAT_ECDSA_VERIFY_P384,
337     S390_FEAT_ECDSA_VERIFY_P512,
338     S390_FEAT_ECDSA_SIGN_P256,
339     S390_FEAT_ECDSA_SIGN_P384,
340     S390_FEAT_ECDSA_SIGN_P512,
341     S390_FEAT_EECDSA_SIGN_P256,
342     S390_FEAT_EECDSA_SIGN_P384,
343     S390_FEAT_EECDSA_SIGN_P512,
344     S390_FEAT_EDDSA_VERIFY_ED25519,
345     S390_FEAT_EDDSA_VERIFY_ED448,
346     S390_FEAT_EDDSA_SIGN_ED25519,
347     S390_FEAT_EDDSA_SIGN_ED448,
348     S390_FEAT_EEDDSA_SIGN_ED25519,
349     S390_FEAT_EEDDSA_SIGN_ED448,
350 
351     /* SORTL */
352     S390_FEAT_SORTL_SFLR,
353     S390_FEAT_SORTL_SVLR,
354     S390_FEAT_SORTL_32,
355     S390_FEAT_SORTL_128,
356     S390_FEAT_SORTL_F0,
357 
358     /* DEFLATE */
359     S390_FEAT_DEFLATE_GHDT,
360     S390_FEAT_DEFLATE_CMPR,
361     S390_FEAT_DEFLATE_XPND,
362     S390_FEAT_DEFLATE_F0,
363 
364     S390_FEAT_MAX,
365 } S390Feat;
366 
367 #endif /* TARGET_S390X_CPU_FEATURES_DEF_H */
368