xref: /openbmc/qemu/host/include/i386/host/cpuinfo.h (revision 87b8bde5)
1 /*
2  * SPDX-License-Identifier: GPL-2.0-or-later
3  * Host specific cpu identification for x86.
4  */
5 
6 #ifndef HOST_CPUINFO_H
7 #define HOST_CPUINFO_H
8 
9 /* Digested version of <cpuid.h> */
10 
11 #define CPUINFO_ALWAYS          (1u << 0)  /* so cpuinfo is nonzero */
12 #define CPUINFO_MOVBE           (1u << 2)
13 #define CPUINFO_LZCNT           (1u << 3)
14 #define CPUINFO_POPCNT          (1u << 4)
15 #define CPUINFO_BMI1            (1u << 5)
16 #define CPUINFO_BMI2            (1u << 6)
17 #define CPUINFO_SSE2            (1u << 7)
18 #define CPUINFO_AVX1            (1u << 9)
19 #define CPUINFO_AVX2            (1u << 10)
20 #define CPUINFO_AVX512F         (1u << 11)
21 #define CPUINFO_AVX512VL        (1u << 12)
22 #define CPUINFO_AVX512BW        (1u << 13)
23 #define CPUINFO_AVX512DQ        (1u << 14)
24 #define CPUINFO_AVX512VBMI2     (1u << 15)
25 #define CPUINFO_ATOMIC_VMOVDQA  (1u << 16)
26 #define CPUINFO_ATOMIC_VMOVDQU  (1u << 17)
27 #define CPUINFO_AES             (1u << 18)
28 #define CPUINFO_PCLMUL          (1u << 19)
29 
30 /* Initialized with a constructor. */
31 extern unsigned cpuinfo;
32 
33 /*
34  * We cannot rely on constructor ordering, so other constructors must
35  * use the function interface rather than the variable above.
36  */
37 unsigned cpuinfo_init(void);
38 
39 #endif /* HOST_CPUINFO_H */
40