1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
/* automatically generated by tools/bindgen-all-the-things */

#![allow(clippy::missing_safety_doc)]
#![allow(clippy::undocumented_unsafe_blocks)]
#![allow(clippy::upper_case_acronyms)]
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(dead_code)]

// Added by kvm_sys/bindgen.sh
use zerocopy::AsBytes;
use zerocopy::FromBytes;
use zerocopy::FromZeroes;

// TODO(b/316337317): Update if new memslot flag is accepted in upstream
pub const KVM_MEM_NON_COHERENT_DMA: u32 = 8;
pub const KVM_CAP_USER_CONFIGURE_NONCOHERENT_DMA: u32 = 236;

// TODO(qwandor): Update this once the pKVM patches are merged upstream with a stable capability ID.
pub const KVM_CAP_ARM_PROTECTED_VM: u32 = 0xffbadab1;
pub const KVM_CAP_ARM_PROTECTED_VM_FLAGS_SET_FW_IPA: u32 = 0;
pub const KVM_CAP_ARM_PROTECTED_VM_FLAGS_INFO: u32 = 1;
pub const KVM_VM_TYPE_ARM_PROTECTED: u32 = 0x80000000;
pub const KVM_DEV_VFIO_PVIOMMU: u32 = 2;
pub const KVM_DEV_VFIO_PVIOMMU_ATTACH: u32 = 1;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vfio_iommu_info {
    pub device_fd: i32,
    pub nr_sids: u32,
}
pub const KVM_DEV_VFIO_PVIOMMU_GET_INFO: u32 = 2;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vfio_iommu_config {
    pub device_fd: i32,
    pub sid_idx: u32,
    pub vsid: u32,
}
pub const KVM_PVIOMMU_SET_CONFIG: i32 = 1;

// This is how zerocopy's author deal with bindings for __BindgenBitfieldUnit<Storage>, see:
// https://fuchsia-review.googlesource.com/c/859278/8/src/starnix/lib/linux_uapi/generate.py
unsafe impl<Storage> AsBytes for __BindgenBitfieldUnit<Storage>
where
    Storage: AsBytes,
{
    fn only_derive_is_allowed_to_implement_this_trait() {}
}

unsafe impl<Storage> FromBytes for __BindgenBitfieldUnit<Storage>
where
    Storage: FromBytes,
{
    fn only_derive_is_allowed_to_implement_this_trait() {}
}

unsafe impl<Storage> FromZeroes for __BindgenBitfieldUnit<Storage>
where
    Storage: FromZeroes,
{
    fn only_derive_is_allowed_to_implement_this_trait() {}
}

#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
    storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
    #[inline]
    pub const fn new(storage: Storage) -> Self {
        Self { storage }
    }
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
    Storage: AsRef<[u8]> + AsMut<[u8]>,
{
    #[inline]
    pub fn get_bit(&self, index: usize) -> bool {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = self.storage.as_ref()[byte_index];
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        byte & mask == mask
    }
    #[inline]
    pub fn set_bit(&mut self, index: usize, val: bool) {
        debug_assert!(index / 8 < self.storage.as_ref().len());
        let byte_index = index / 8;
        let byte = &mut self.storage.as_mut()[byte_index];
        let bit_index = if cfg!(target_endian = "big") {
            7 - (index % 8)
        } else {
            index % 8
        };
        let mask = 1 << bit_index;
        if val {
            *byte |= mask;
        } else {
            *byte &= !mask;
        }
    }
    #[inline]
    pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        let mut val = 0;
        for i in 0..(bit_width as usize) {
            if self.get_bit(i + bit_offset) {
                let index = if cfg!(target_endian = "big") {
                    bit_width as usize - 1 - i
                } else {
                    i
                };
                val |= 1 << index;
            }
        }
        val
    }
    #[inline]
    pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
        debug_assert!(bit_width <= 64);
        debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
        debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
        for i in 0..(bit_width as usize) {
            let mask = 1 << i;
            let val_bit_is_set = val & mask == mask;
            let index = if cfg!(target_endian = "big") {
                bit_width as usize - 1 - i
            } else {
                i
            };
            self.set_bit(index + bit_offset, val_bit_is_set);
        }
    }
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
    #[inline]
    pub const fn new() -> Self {
        __IncompleteArrayField(::std::marker::PhantomData, [])
    }
    #[inline]
    pub fn as_ptr(&self) -> *const T {
        self as *const _ as *const T
    }
    #[inline]
    pub fn as_mut_ptr(&mut self) -> *mut T {
        self as *mut _ as *mut T
    }
    #[inline]
    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
        ::std::slice::from_raw_parts(self.as_ptr(), len)
    }
    #[inline]
    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
    }
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_str("__IncompleteArrayField")
    }
}
#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl<T> __BindgenUnionField<T> {
    #[inline]
    pub const fn new() -> Self {
        __BindgenUnionField(::std::marker::PhantomData)
    }
    #[inline]
    pub unsafe fn as_ref(&self) -> &T {
        ::std::mem::transmute(self)
    }
    #[inline]
    pub unsafe fn as_mut(&mut self) -> &mut T {
        ::std::mem::transmute(self)
    }
}
impl<T> ::std::default::Default for __BindgenUnionField<T> {
    #[inline]
    fn default() -> Self {
        Self::new()
    }
}
impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}
impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_str("__BindgenUnionField")
    }
}
impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
    fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
}
impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
    fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
        true
    }
}
impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
pub const KVM_PIO_PAGE_OFFSET: u32 = 1;
pub const KVM_COALESCED_MMIO_PAGE_OFFSET: u32 = 2;
pub const KVM_DIRTY_LOG_PAGE_OFFSET: u32 = 64;
pub const DE_VECTOR: u32 = 0;
pub const DB_VECTOR: u32 = 1;
pub const BP_VECTOR: u32 = 3;
pub const OF_VECTOR: u32 = 4;
pub const BR_VECTOR: u32 = 5;
pub const UD_VECTOR: u32 = 6;
pub const NM_VECTOR: u32 = 7;
pub const DF_VECTOR: u32 = 8;
pub const TS_VECTOR: u32 = 10;
pub const NP_VECTOR: u32 = 11;
pub const SS_VECTOR: u32 = 12;
pub const GP_VECTOR: u32 = 13;
pub const PF_VECTOR: u32 = 14;
pub const MF_VECTOR: u32 = 16;
pub const AC_VECTOR: u32 = 17;
pub const MC_VECTOR: u32 = 18;
pub const XM_VECTOR: u32 = 19;
pub const VE_VECTOR: u32 = 20;
pub const KVM_NR_INTERRUPTS: u32 = 256;
pub const KVM_IOAPIC_NUM_PINS: u32 = 24;
pub const KVM_IRQCHIP_PIC_MASTER: u32 = 0;
pub const KVM_IRQCHIP_PIC_SLAVE: u32 = 1;
pub const KVM_IRQCHIP_IOAPIC: u32 = 2;
pub const KVM_NR_IRQCHIPS: u32 = 3;
pub const KVM_RUN_X86_SMM: u32 = 1;
pub const KVM_RUN_X86_BUS_LOCK: u32 = 2;
pub const KVM_APIC_REG_SIZE: u32 = 1024;
pub const KVM_SREGS2_FLAGS_PDPTRS_VALID: u32 = 1;
pub const KVM_MSR_FILTER_MAX_BITMAP_SIZE: u32 = 1536;
pub const KVM_MSR_FILTER_READ: u32 = 1;
pub const KVM_MSR_FILTER_WRITE: u32 = 2;
pub const KVM_MSR_FILTER_RANGE_VALID_MASK: u32 = 3;
pub const KVM_MSR_FILTER_MAX_RANGES: u32 = 16;
pub const KVM_MSR_FILTER_DEFAULT_ALLOW: u32 = 0;
pub const KVM_MSR_FILTER_DEFAULT_DENY: u32 = 1;
pub const KVM_MSR_FILTER_VALID_MASK: u32 = 1;
pub const KVM_CPUID_FLAG_SIGNIFCANT_INDEX: u32 = 1;
pub const KVM_CPUID_FLAG_STATEFUL_FUNC: u32 = 2;
pub const KVM_CPUID_FLAG_STATE_READ_NEXT: u32 = 4;
pub const KVM_GUESTDBG_USE_SW_BP: u32 = 65536;
pub const KVM_GUESTDBG_USE_HW_BP: u32 = 131072;
pub const KVM_GUESTDBG_INJECT_DB: u32 = 262144;
pub const KVM_GUESTDBG_INJECT_BP: u32 = 524288;
pub const KVM_GUESTDBG_BLOCKIRQ: u32 = 1048576;
pub const KVM_PIT_FLAGS_HPET_LEGACY: u32 = 1;
pub const KVM_PIT_FLAGS_SPEAKER_DATA_ON: u32 = 2;
pub const KVM_VCPUEVENT_VALID_NMI_PENDING: u32 = 1;
pub const KVM_VCPUEVENT_VALID_SIPI_VECTOR: u32 = 2;
pub const KVM_VCPUEVENT_VALID_SHADOW: u32 = 4;
pub const KVM_VCPUEVENT_VALID_SMM: u32 = 8;
pub const KVM_VCPUEVENT_VALID_PAYLOAD: u32 = 16;
pub const KVM_VCPUEVENT_VALID_TRIPLE_FAULT: u32 = 32;
pub const KVM_X86_SHADOW_INT_MOV_SS: u32 = 1;
pub const KVM_X86_SHADOW_INT_STI: u32 = 2;
pub const KVM_MAX_XCRS: u32 = 16;
pub const KVM_SYNC_X86_REGS: u32 = 1;
pub const KVM_SYNC_X86_SREGS: u32 = 2;
pub const KVM_SYNC_X86_EVENTS: u32 = 4;
pub const KVM_SYNC_X86_VALID_FIELDS: u32 = 7;
pub const KVM_X86_QUIRK_LINT0_REENABLED: u32 = 1;
pub const KVM_X86_QUIRK_CD_NW_CLEARED: u32 = 2;
pub const KVM_X86_QUIRK_LAPIC_MMIO_HOLE: u32 = 4;
pub const KVM_X86_QUIRK_OUT_7E_INC_RIP: u32 = 8;
pub const KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT: u32 = 16;
pub const KVM_X86_QUIRK_FIX_HYPERCALL_INSN: u32 = 32;
pub const KVM_X86_QUIRK_MWAIT_NEVER_UD_FAULTS: u32 = 64;
pub const KVM_STATE_NESTED_FORMAT_VMX: u32 = 0;
pub const KVM_STATE_NESTED_FORMAT_SVM: u32 = 1;
pub const KVM_STATE_NESTED_GUEST_MODE: u32 = 1;
pub const KVM_STATE_NESTED_RUN_PENDING: u32 = 2;
pub const KVM_STATE_NESTED_EVMCS: u32 = 4;
pub const KVM_STATE_NESTED_MTF_PENDING: u32 = 8;
pub const KVM_STATE_NESTED_GIF_SET: u32 = 256;
pub const KVM_STATE_NESTED_SMM_GUEST_MODE: u32 = 1;
pub const KVM_STATE_NESTED_SMM_VMXON: u32 = 2;
pub const KVM_STATE_NESTED_VMX_VMCS_SIZE: u32 = 4096;
pub const KVM_STATE_NESTED_SVM_VMCB_SIZE: u32 = 4096;
pub const KVM_STATE_VMX_PREEMPTION_TIMER_DEADLINE: u32 = 1;
pub const KVM_X86_XCOMP_GUEST_SUPP: u32 = 0;
pub const KVM_PMU_EVENT_ALLOW: u32 = 0;
pub const KVM_PMU_EVENT_DENY: u32 = 1;
pub const KVM_PMU_MASKED_ENTRY_UMASK_MASK_SHIFT: u32 = 56;
pub const KVM_VCPU_TSC_CTRL: u32 = 0;
pub const KVM_VCPU_TSC_OFFSET: u32 = 0;
pub const KVM_API_VERSION: u32 = 12;
pub const KVM_TRC_SHIFT: u32 = 16;
pub const KVM_TRC_ENTRYEXIT: u32 = 65536;
pub const KVM_TRC_HANDLER: u32 = 131072;
pub const KVM_TRC_VMENTRY: u32 = 65537;
pub const KVM_TRC_VMEXIT: u32 = 65538;
pub const KVM_TRC_PAGE_FAULT: u32 = 131073;
pub const KVM_TRC_HEAD_SIZE: u32 = 12;
pub const KVM_TRC_CYCLE_SIZE: u32 = 8;
pub const KVM_TRC_EXTRA_MAX: u32 = 7;
pub const KVM_TRC_INJ_VIRQ: u32 = 131074;
pub const KVM_TRC_REDELIVER_EVT: u32 = 131075;
pub const KVM_TRC_PEND_INTR: u32 = 131076;
pub const KVM_TRC_IO_READ: u32 = 131077;
pub const KVM_TRC_IO_WRITE: u32 = 131078;
pub const KVM_TRC_CR_READ: u32 = 131079;
pub const KVM_TRC_CR_WRITE: u32 = 131080;
pub const KVM_TRC_DR_READ: u32 = 131081;
pub const KVM_TRC_DR_WRITE: u32 = 131082;
pub const KVM_TRC_MSR_READ: u32 = 131083;
pub const KVM_TRC_MSR_WRITE: u32 = 131084;
pub const KVM_TRC_CPUID: u32 = 131085;
pub const KVM_TRC_INTR: u32 = 131086;
pub const KVM_TRC_NMI: u32 = 131087;
pub const KVM_TRC_VMMCALL: u32 = 131088;
pub const KVM_TRC_HLT: u32 = 131089;
pub const KVM_TRC_CLTS: u32 = 131090;
pub const KVM_TRC_LMSW: u32 = 131091;
pub const KVM_TRC_APIC_ACCESS: u32 = 131092;
pub const KVM_TRC_TDP_FAULT: u32 = 131093;
pub const KVM_TRC_GTLB_WRITE: u32 = 131094;
pub const KVM_TRC_STLB_WRITE: u32 = 131095;
pub const KVM_TRC_STLB_INVAL: u32 = 131096;
pub const KVM_TRC_PPC_INSTR: u32 = 131097;
pub const KVM_MEM_LOG_DIRTY_PAGES: u32 = 1;
pub const KVM_MEM_READONLY: u32 = 2;
pub const KVM_PIT_SPEAKER_DUMMY: u32 = 1;
pub const KVM_S390_CMMA_PEEK: u32 = 1;
pub const KVM_EXIT_HYPERV_SYNIC: u32 = 1;
pub const KVM_EXIT_HYPERV_HCALL: u32 = 2;
pub const KVM_EXIT_HYPERV_SYNDBG: u32 = 3;
pub const KVM_EXIT_XEN_HCALL: u32 = 1;
pub const KVM_S390_GET_SKEYS_NONE: u32 = 1;
pub const KVM_S390_SKEYS_MAX: u32 = 1048576;
pub const KVM_EXIT_UNKNOWN: u32 = 0;
pub const KVM_EXIT_EXCEPTION: u32 = 1;
pub const KVM_EXIT_IO: u32 = 2;
pub const KVM_EXIT_HYPERCALL: u32 = 3;
pub const KVM_EXIT_DEBUG: u32 = 4;
pub const KVM_EXIT_HLT: u32 = 5;
pub const KVM_EXIT_MMIO: u32 = 6;
pub const KVM_EXIT_IRQ_WINDOW_OPEN: u32 = 7;
pub const KVM_EXIT_SHUTDOWN: u32 = 8;
pub const KVM_EXIT_FAIL_ENTRY: u32 = 9;
pub const KVM_EXIT_INTR: u32 = 10;
pub const KVM_EXIT_SET_TPR: u32 = 11;
pub const KVM_EXIT_TPR_ACCESS: u32 = 12;
pub const KVM_EXIT_S390_SIEIC: u32 = 13;
pub const KVM_EXIT_S390_RESET: u32 = 14;
pub const KVM_EXIT_DCR: u32 = 15;
pub const KVM_EXIT_NMI: u32 = 16;
pub const KVM_EXIT_INTERNAL_ERROR: u32 = 17;
pub const KVM_EXIT_OSI: u32 = 18;
pub const KVM_EXIT_PAPR_HCALL: u32 = 19;
pub const KVM_EXIT_S390_UCONTROL: u32 = 20;
pub const KVM_EXIT_WATCHDOG: u32 = 21;
pub const KVM_EXIT_S390_TSCH: u32 = 22;
pub const KVM_EXIT_EPR: u32 = 23;
pub const KVM_EXIT_SYSTEM_EVENT: u32 = 24;
pub const KVM_EXIT_S390_STSI: u32 = 25;
pub const KVM_EXIT_IOAPIC_EOI: u32 = 26;
pub const KVM_EXIT_HYPERV: u32 = 27;
pub const KVM_EXIT_ARM_NISV: u32 = 28;
pub const KVM_EXIT_X86_RDMSR: u32 = 29;
pub const KVM_EXIT_X86_WRMSR: u32 = 30;
pub const KVM_EXIT_DIRTY_RING_FULL: u32 = 31;
pub const KVM_EXIT_AP_RESET_HOLD: u32 = 32;
pub const KVM_EXIT_X86_BUS_LOCK: u32 = 33;
pub const KVM_EXIT_XEN: u32 = 34;
pub const KVM_EXIT_RISCV_SBI: u32 = 35;
pub const KVM_EXIT_RISCV_CSR: u32 = 36;
pub const KVM_EXIT_NOTIFY: u32 = 37;
pub const KVM_INTERNAL_ERROR_EMULATION: u32 = 1;
pub const KVM_INTERNAL_ERROR_SIMUL_EX: u32 = 2;
pub const KVM_INTERNAL_ERROR_DELIVERY_EV: u32 = 3;
pub const KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON: u32 = 4;
pub const KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES: u32 = 1;
pub const KVM_EXIT_IO_IN: u32 = 0;
pub const KVM_EXIT_IO_OUT: u32 = 1;
pub const KVM_S390_RESET_POR: u32 = 1;
pub const KVM_S390_RESET_CLEAR: u32 = 2;
pub const KVM_S390_RESET_SUBSYSTEM: u32 = 4;
pub const KVM_S390_RESET_CPU_INIT: u32 = 8;
pub const KVM_S390_RESET_IPL: u32 = 16;
pub const KVM_SYSTEM_EVENT_SHUTDOWN: u32 = 1;
pub const KVM_SYSTEM_EVENT_RESET: u32 = 2;
pub const KVM_SYSTEM_EVENT_CRASH: u32 = 3;
pub const KVM_SYSTEM_EVENT_WAKEUP: u32 = 4;
pub const KVM_SYSTEM_EVENT_SUSPEND: u32 = 5;
pub const KVM_SYSTEM_EVENT_SEV_TERM: u32 = 6;
pub const KVM_MSR_EXIT_REASON_INVAL: u32 = 1;
pub const KVM_MSR_EXIT_REASON_UNKNOWN: u32 = 2;
pub const KVM_MSR_EXIT_REASON_FILTER: u32 = 4;
pub const KVM_MSR_EXIT_REASON_VALID_MASK: u32 = 7;
pub const KVM_NOTIFY_CONTEXT_INVALID: u32 = 1;
pub const SYNC_REGS_SIZE_BYTES: u32 = 2048;
pub const KVM_S390_MEMOP_LOGICAL_READ: u32 = 0;
pub const KVM_S390_MEMOP_LOGICAL_WRITE: u32 = 1;
pub const KVM_S390_MEMOP_SIDA_READ: u32 = 2;
pub const KVM_S390_MEMOP_SIDA_WRITE: u32 = 3;
pub const KVM_S390_MEMOP_ABSOLUTE_READ: u32 = 4;
pub const KVM_S390_MEMOP_ABSOLUTE_WRITE: u32 = 5;
pub const KVM_S390_MEMOP_ABSOLUTE_CMPXCHG: u32 = 6;
pub const KVM_S390_MEMOP_F_CHECK_ONLY: u32 = 1;
pub const KVM_S390_MEMOP_F_INJECT_EXCEPTION: u32 = 2;
pub const KVM_S390_MEMOP_F_SKEY_PROTECTION: u32 = 4;
pub const KVM_S390_MEMOP_EXTENSION_CAP_BASE: u32 = 1;
pub const KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG: u32 = 2;
pub const KVM_MP_STATE_RUNNABLE: u32 = 0;
pub const KVM_MP_STATE_UNINITIALIZED: u32 = 1;
pub const KVM_MP_STATE_INIT_RECEIVED: u32 = 2;
pub const KVM_MP_STATE_HALTED: u32 = 3;
pub const KVM_MP_STATE_SIPI_RECEIVED: u32 = 4;
pub const KVM_MP_STATE_STOPPED: u32 = 5;
pub const KVM_MP_STATE_CHECK_STOP: u32 = 6;
pub const KVM_MP_STATE_OPERATING: u32 = 7;
pub const KVM_MP_STATE_LOAD: u32 = 8;
pub const KVM_MP_STATE_AP_RESET_HOLD: u32 = 9;
pub const KVM_MP_STATE_SUSPENDED: u32 = 10;
pub const KVM_S390_SIGP_STOP: u32 = 4294836224;
pub const KVM_S390_PROGRAM_INT: u32 = 4294836225;
pub const KVM_S390_SIGP_SET_PREFIX: u32 = 4294836226;
pub const KVM_S390_RESTART: u32 = 4294836227;
pub const KVM_S390_INT_PFAULT_INIT: u32 = 4294836228;
pub const KVM_S390_INT_PFAULT_DONE: u32 = 4294836229;
pub const KVM_S390_MCHK: u32 = 4294840320;
pub const KVM_S390_INT_CLOCK_COMP: u32 = 4294905860;
pub const KVM_S390_INT_CPU_TIMER: u32 = 4294905861;
pub const KVM_S390_INT_VIRTIO: u32 = 4294911491;
pub const KVM_S390_INT_SERVICE: u32 = 4294910977;
pub const KVM_S390_INT_EMERGENCY: u32 = 4294906369;
pub const KVM_S390_INT_EXTERNAL_CALL: u32 = 4294906370;
pub const KVM_S390_INT_IO_MIN: u32 = 0;
pub const KVM_S390_INT_IO_MAX: u32 = 4294836223;
pub const KVM_S390_INT_IO_AI_MASK: u32 = 67108864;
pub const KVM_S390_PGM_FLAGS_ILC_VALID: u32 = 1;
pub const KVM_S390_PGM_FLAGS_ILC_0: u32 = 2;
pub const KVM_S390_PGM_FLAGS_ILC_1: u32 = 4;
pub const KVM_S390_PGM_FLAGS_ILC_MASK: u32 = 6;
pub const KVM_S390_PGM_FLAGS_NO_REWIND: u32 = 8;
pub const KVM_S390_STOP_FLAG_STORE_STATUS: u32 = 1;
pub const KVM_GUESTDBG_ENABLE: u32 = 1;
pub const KVM_GUESTDBG_SINGLESTEP: u32 = 2;
pub const KVM_X86_DISABLE_EXITS_MWAIT: u32 = 1;
pub const KVM_X86_DISABLE_EXITS_HLT: u32 = 2;
pub const KVM_X86_DISABLE_EXITS_PAUSE: u32 = 4;
pub const KVM_X86_DISABLE_EXITS_CSTATE: u32 = 8;
pub const KVM_X86_DISABLE_VALID_EXITS: u32 = 15;
pub const KVM_PPC_PVINFO_FLAGS_EV_IDLE: u32 = 1;
pub const KVM_PPC_PAGE_SIZES_MAX_SZ: u32 = 8;
pub const KVM_PPC_PAGE_SIZES_REAL: u32 = 1;
pub const KVM_PPC_1T_SEGMENTS: u32 = 2;
pub const KVM_PPC_NO_HASH: u32 = 4;
pub const KVMIO: u32 = 174;
pub const KVM_VM_S390_UCONTROL: u32 = 1;
pub const KVM_VM_PPC_HV: u32 = 1;
pub const KVM_VM_PPC_PR: u32 = 2;
pub const KVM_VM_MIPS_AUTO: u32 = 0;
pub const KVM_VM_MIPS_VZ: u32 = 1;
pub const KVM_VM_MIPS_TE: u32 = 2;
pub const KVM_S390_SIE_PAGE_OFFSET: u32 = 1;
pub const KVM_VM_TYPE_ARM_IPA_SIZE_MASK: u32 = 255;
pub const KVM_CAP_IRQCHIP: u32 = 0;
pub const KVM_CAP_HLT: u32 = 1;
pub const KVM_CAP_MMU_SHADOW_CACHE_CONTROL: u32 = 2;
pub const KVM_CAP_USER_MEMORY: u32 = 3;
pub const KVM_CAP_SET_TSS_ADDR: u32 = 4;
pub const KVM_CAP_VAPIC: u32 = 6;
pub const KVM_CAP_EXT_CPUID: u32 = 7;
pub const KVM_CAP_CLOCKSOURCE: u32 = 8;
pub const KVM_CAP_NR_VCPUS: u32 = 9;
pub const KVM_CAP_NR_MEMSLOTS: u32 = 10;
pub const KVM_CAP_PIT: u32 = 11;
pub const KVM_CAP_NOP_IO_DELAY: u32 = 12;
pub const KVM_CAP_PV_MMU: u32 = 13;
pub const KVM_CAP_MP_STATE: u32 = 14;
pub const KVM_CAP_COALESCED_MMIO: u32 = 15;
pub const KVM_CAP_SYNC_MMU: u32 = 16;
pub const KVM_CAP_IOMMU: u32 = 18;
pub const KVM_CAP_DESTROY_MEMORY_REGION_WORKS: u32 = 21;
pub const KVM_CAP_USER_NMI: u32 = 22;
pub const KVM_CAP_SET_GUEST_DEBUG: u32 = 23;
pub const KVM_CAP_REINJECT_CONTROL: u32 = 24;
pub const KVM_CAP_IRQ_ROUTING: u32 = 25;
pub const KVM_CAP_IRQ_INJECT_STATUS: u32 = 26;
pub const KVM_CAP_ASSIGN_DEV_IRQ: u32 = 29;
pub const KVM_CAP_JOIN_MEMORY_REGIONS_WORKS: u32 = 30;
pub const KVM_CAP_MCE: u32 = 31;
pub const KVM_CAP_IRQFD: u32 = 32;
pub const KVM_CAP_PIT2: u32 = 33;
pub const KVM_CAP_SET_BOOT_CPU_ID: u32 = 34;
pub const KVM_CAP_PIT_STATE2: u32 = 35;
pub const KVM_CAP_IOEVENTFD: u32 = 36;
pub const KVM_CAP_SET_IDENTITY_MAP_ADDR: u32 = 37;
pub const KVM_CAP_XEN_HVM: u32 = 38;
pub const KVM_CAP_ADJUST_CLOCK: u32 = 39;
pub const KVM_CAP_INTERNAL_ERROR_DATA: u32 = 40;
pub const KVM_CAP_VCPU_EVENTS: u32 = 41;
pub const KVM_CAP_S390_PSW: u32 = 42;
pub const KVM_CAP_PPC_SEGSTATE: u32 = 43;
pub const KVM_CAP_HYPERV: u32 = 44;
pub const KVM_CAP_HYPERV_VAPIC: u32 = 45;
pub const KVM_CAP_HYPERV_SPIN: u32 = 46;
pub const KVM_CAP_PCI_SEGMENT: u32 = 47;
pub const KVM_CAP_PPC_PAIRED_SINGLES: u32 = 48;
pub const KVM_CAP_INTR_SHADOW: u32 = 49;
pub const KVM_CAP_DEBUGREGS: u32 = 50;
pub const KVM_CAP_X86_ROBUST_SINGLESTEP: u32 = 51;
pub const KVM_CAP_PPC_OSI: u32 = 52;
pub const KVM_CAP_PPC_UNSET_IRQ: u32 = 53;
pub const KVM_CAP_ENABLE_CAP: u32 = 54;
pub const KVM_CAP_XSAVE: u32 = 55;
pub const KVM_CAP_XCRS: u32 = 56;
pub const KVM_CAP_PPC_GET_PVINFO: u32 = 57;
pub const KVM_CAP_PPC_IRQ_LEVEL: u32 = 58;
pub const KVM_CAP_ASYNC_PF: u32 = 59;
pub const KVM_CAP_TSC_CONTROL: u32 = 60;
pub const KVM_CAP_GET_TSC_KHZ: u32 = 61;
pub const KVM_CAP_PPC_BOOKE_SREGS: u32 = 62;
pub const KVM_CAP_SPAPR_TCE: u32 = 63;
pub const KVM_CAP_PPC_SMT: u32 = 64;
pub const KVM_CAP_PPC_RMA: u32 = 65;
pub const KVM_CAP_MAX_VCPUS: u32 = 66;
pub const KVM_CAP_PPC_HIOR: u32 = 67;
pub const KVM_CAP_PPC_PAPR: u32 = 68;
pub const KVM_CAP_SW_TLB: u32 = 69;
pub const KVM_CAP_ONE_REG: u32 = 70;
pub const KVM_CAP_S390_GMAP: u32 = 71;
pub const KVM_CAP_TSC_DEADLINE_TIMER: u32 = 72;
pub const KVM_CAP_S390_UCONTROL: u32 = 73;
pub const KVM_CAP_SYNC_REGS: u32 = 74;
pub const KVM_CAP_PCI_2_3: u32 = 75;
pub const KVM_CAP_KVMCLOCK_CTRL: u32 = 76;
pub const KVM_CAP_SIGNAL_MSI: u32 = 77;
pub const KVM_CAP_PPC_GET_SMMU_INFO: u32 = 78;
pub const KVM_CAP_S390_COW: u32 = 79;
pub const KVM_CAP_PPC_ALLOC_HTAB: u32 = 80;
pub const KVM_CAP_READONLY_MEM: u32 = 81;
pub const KVM_CAP_IRQFD_RESAMPLE: u32 = 82;
pub const KVM_CAP_PPC_BOOKE_WATCHDOG: u32 = 83;
pub const KVM_CAP_PPC_HTAB_FD: u32 = 84;
pub const KVM_CAP_S390_CSS_SUPPORT: u32 = 85;
pub const KVM_CAP_PPC_EPR: u32 = 86;
pub const KVM_CAP_ARM_PSCI: u32 = 87;
pub const KVM_CAP_ARM_SET_DEVICE_ADDR: u32 = 88;
pub const KVM_CAP_DEVICE_CTRL: u32 = 89;
pub const KVM_CAP_IRQ_MPIC: u32 = 90;
pub const KVM_CAP_PPC_RTAS: u32 = 91;
pub const KVM_CAP_IRQ_XICS: u32 = 92;
pub const KVM_CAP_ARM_EL1_32BIT: u32 = 93;
pub const KVM_CAP_SPAPR_MULTITCE: u32 = 94;
pub const KVM_CAP_EXT_EMUL_CPUID: u32 = 95;
pub const KVM_CAP_HYPERV_TIME: u32 = 96;
pub const KVM_CAP_IOAPIC_POLARITY_IGNORED: u32 = 97;
pub const KVM_CAP_ENABLE_CAP_VM: u32 = 98;
pub const KVM_CAP_S390_IRQCHIP: u32 = 99;
pub const KVM_CAP_IOEVENTFD_NO_LENGTH: u32 = 100;
pub const KVM_CAP_VM_ATTRIBUTES: u32 = 101;
pub const KVM_CAP_ARM_PSCI_0_2: u32 = 102;
pub const KVM_CAP_PPC_FIXUP_HCALL: u32 = 103;
pub const KVM_CAP_PPC_ENABLE_HCALL: u32 = 104;
pub const KVM_CAP_CHECK_EXTENSION_VM: u32 = 105;
pub const KVM_CAP_S390_USER_SIGP: u32 = 106;
pub const KVM_CAP_S390_VECTOR_REGISTERS: u32 = 107;
pub const KVM_CAP_S390_MEM_OP: u32 = 108;
pub const KVM_CAP_S390_USER_STSI: u32 = 109;
pub const KVM_CAP_S390_SKEYS: u32 = 110;
pub const KVM_CAP_MIPS_FPU: u32 = 111;
pub const KVM_CAP_MIPS_MSA: u32 = 112;
pub const KVM_CAP_S390_INJECT_IRQ: u32 = 113;
pub const KVM_CAP_S390_IRQ_STATE: u32 = 114;
pub const KVM_CAP_PPC_HWRNG: u32 = 115;
pub const KVM_CAP_DISABLE_QUIRKS: u32 = 116;
pub const KVM_CAP_X86_SMM: u32 = 117;
pub const KVM_CAP_MULTI_ADDRESS_SPACE: u32 = 118;
pub const KVM_CAP_GUEST_DEBUG_HW_BPS: u32 = 119;
pub const KVM_CAP_GUEST_DEBUG_HW_WPS: u32 = 120;
pub const KVM_CAP_SPLIT_IRQCHIP: u32 = 121;
pub const KVM_CAP_IOEVENTFD_ANY_LENGTH: u32 = 122;
pub const KVM_CAP_HYPERV_SYNIC: u32 = 123;
pub const KVM_CAP_S390_RI: u32 = 124;
pub const KVM_CAP_SPAPR_TCE_64: u32 = 125;
pub const KVM_CAP_ARM_PMU_V3: u32 = 126;
pub const KVM_CAP_VCPU_ATTRIBUTES: u32 = 127;
pub const KVM_CAP_MAX_VCPU_ID: u32 = 128;
pub const KVM_CAP_X2APIC_API: u32 = 129;
pub const KVM_CAP_S390_USER_INSTR0: u32 = 130;
pub const KVM_CAP_MSI_DEVID: u32 = 131;
pub const KVM_CAP_PPC_HTM: u32 = 132;
pub const KVM_CAP_SPAPR_RESIZE_HPT: u32 = 133;
pub const KVM_CAP_PPC_MMU_RADIX: u32 = 134;
pub const KVM_CAP_PPC_MMU_HASH_V3: u32 = 135;
pub const KVM_CAP_IMMEDIATE_EXIT: u32 = 136;
pub const KVM_CAP_MIPS_VZ: u32 = 137;
pub const KVM_CAP_MIPS_TE: u32 = 138;
pub const KVM_CAP_MIPS_64BIT: u32 = 139;
pub const KVM_CAP_S390_GS: u32 = 140;
pub const KVM_CAP_S390_AIS: u32 = 141;
pub const KVM_CAP_SPAPR_TCE_VFIO: u32 = 142;
pub const KVM_CAP_X86_DISABLE_EXITS: u32 = 143;
pub const KVM_CAP_ARM_USER_IRQ: u32 = 144;
pub const KVM_CAP_S390_CMMA_MIGRATION: u32 = 145;
pub const KVM_CAP_PPC_FWNMI: u32 = 146;
pub const KVM_CAP_PPC_SMT_POSSIBLE: u32 = 147;
pub const KVM_CAP_HYPERV_SYNIC2: u32 = 148;
pub const KVM_CAP_HYPERV_VP_INDEX: u32 = 149;
pub const KVM_CAP_S390_AIS_MIGRATION: u32 = 150;
pub const KVM_CAP_PPC_GET_CPU_CHAR: u32 = 151;
pub const KVM_CAP_S390_BPB: u32 = 152;
pub const KVM_CAP_GET_MSR_FEATURES: u32 = 153;
pub const KVM_CAP_HYPERV_EVENTFD: u32 = 154;
pub const KVM_CAP_HYPERV_TLBFLUSH: u32 = 155;
pub const KVM_CAP_S390_HPAGE_1M: u32 = 156;
pub const KVM_CAP_NESTED_STATE: u32 = 157;
pub const KVM_CAP_ARM_INJECT_SERROR_ESR: u32 = 158;
pub const KVM_CAP_MSR_PLATFORM_INFO: u32 = 159;
pub const KVM_CAP_PPC_NESTED_HV: u32 = 160;
pub const KVM_CAP_HYPERV_SEND_IPI: u32 = 161;
pub const KVM_CAP_COALESCED_PIO: u32 = 162;
pub const KVM_CAP_HYPERV_ENLIGHTENED_VMCS: u32 = 163;
pub const KVM_CAP_EXCEPTION_PAYLOAD: u32 = 164;
pub const KVM_CAP_ARM_VM_IPA_SIZE: u32 = 165;
pub const KVM_CAP_MANUAL_DIRTY_LOG_PROTECT: u32 = 166;
pub const KVM_CAP_HYPERV_CPUID: u32 = 167;
pub const KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2: u32 = 168;
pub const KVM_CAP_PPC_IRQ_XIVE: u32 = 169;
pub const KVM_CAP_ARM_SVE: u32 = 170;
pub const KVM_CAP_ARM_PTRAUTH_ADDRESS: u32 = 171;
pub const KVM_CAP_ARM_PTRAUTH_GENERIC: u32 = 172;
pub const KVM_CAP_PMU_EVENT_FILTER: u32 = 173;
pub const KVM_CAP_ARM_IRQ_LINE_LAYOUT_2: u32 = 174;
pub const KVM_CAP_HYPERV_DIRECT_TLBFLUSH: u32 = 175;
pub const KVM_CAP_PPC_GUEST_DEBUG_SSTEP: u32 = 176;
pub const KVM_CAP_ARM_NISV_TO_USER: u32 = 177;
pub const KVM_CAP_ARM_INJECT_EXT_DABT: u32 = 178;
pub const KVM_CAP_S390_VCPU_RESETS: u32 = 179;
pub const KVM_CAP_S390_PROTECTED: u32 = 180;
pub const KVM_CAP_PPC_SECURE_GUEST: u32 = 181;
pub const KVM_CAP_HALT_POLL: u32 = 182;
pub const KVM_CAP_ASYNC_PF_INT: u32 = 183;
pub const KVM_CAP_LAST_CPU: u32 = 184;
pub const KVM_CAP_SMALLER_MAXPHYADDR: u32 = 185;
pub const KVM_CAP_S390_DIAG318: u32 = 186;
pub const KVM_CAP_STEAL_TIME: u32 = 187;
pub const KVM_CAP_X86_USER_SPACE_MSR: u32 = 188;
pub const KVM_CAP_X86_MSR_FILTER: u32 = 189;
pub const KVM_CAP_ENFORCE_PV_FEATURE_CPUID: u32 = 190;
pub const KVM_CAP_SYS_HYPERV_CPUID: u32 = 191;
pub const KVM_CAP_DIRTY_LOG_RING: u32 = 192;
pub const KVM_CAP_X86_BUS_LOCK_EXIT: u32 = 193;
pub const KVM_CAP_PPC_DAWR1: u32 = 194;
pub const KVM_CAP_SET_GUEST_DEBUG2: u32 = 195;
pub const KVM_CAP_SGX_ATTRIBUTE: u32 = 196;
pub const KVM_CAP_VM_COPY_ENC_CONTEXT_FROM: u32 = 197;
pub const KVM_CAP_PTP_KVM: u32 = 198;
pub const KVM_CAP_HYPERV_ENFORCE_CPUID: u32 = 199;
pub const KVM_CAP_SREGS2: u32 = 200;
pub const KVM_CAP_EXIT_HYPERCALL: u32 = 201;
pub const KVM_CAP_PPC_RPT_INVALIDATE: u32 = 202;
pub const KVM_CAP_BINARY_STATS_FD: u32 = 203;
pub const KVM_CAP_EXIT_ON_EMULATION_FAILURE: u32 = 204;
pub const KVM_CAP_ARM_MTE: u32 = 205;
pub const KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM: u32 = 206;
pub const KVM_CAP_VM_GPA_BITS: u32 = 207;
pub const KVM_CAP_XSAVE2: u32 = 208;
pub const KVM_CAP_SYS_ATTRIBUTES: u32 = 209;
pub const KVM_CAP_PPC_AIL_MODE_3: u32 = 210;
pub const KVM_CAP_S390_MEM_OP_EXTENSION: u32 = 211;
pub const KVM_CAP_PMU_CAPABILITY: u32 = 212;
pub const KVM_CAP_DISABLE_QUIRKS2: u32 = 213;
pub const KVM_CAP_VM_TSC_CONTROL: u32 = 214;
pub const KVM_CAP_SYSTEM_EVENT_DATA: u32 = 215;
pub const KVM_CAP_ARM_SYSTEM_SUSPEND: u32 = 216;
pub const KVM_CAP_S390_PROTECTED_DUMP: u32 = 217;
pub const KVM_CAP_X86_TRIPLE_FAULT_EVENT: u32 = 218;
pub const KVM_CAP_X86_NOTIFY_VMEXIT: u32 = 219;
pub const KVM_CAP_VM_DISABLE_NX_HUGE_PAGES: u32 = 220;
pub const KVM_CAP_S390_ZPCI_OP: u32 = 221;
pub const KVM_CAP_S390_CPU_TOPOLOGY: u32 = 222;
pub const KVM_CAP_DIRTY_LOG_RING_ACQ_REL: u32 = 223;
pub const KVM_CAP_S390_PROTECTED_ASYNC_DISABLE: u32 = 224;
pub const KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP: u32 = 225;
pub const KVM_CAP_PMU_EVENT_MASKED_EVENTS: u32 = 226;
pub const KVM_CAP_COUNTER_OFFSET: u32 = 227;
pub const KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE: u32 = 228;
pub const KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES: u32 = 229;
pub const KVM_CAP_GET_CUR_CPUFREQ: u32 = 512;
pub const KVM_CAP_UTIL_HINT: u32 = 513;
pub const KVM_CAP_GET_CPUFREQ_TBL: u32 = 514;
pub const KVM_IRQ_ROUTING_IRQCHIP: u32 = 1;
pub const KVM_IRQ_ROUTING_MSI: u32 = 2;
pub const KVM_IRQ_ROUTING_S390_ADAPTER: u32 = 3;
pub const KVM_IRQ_ROUTING_HV_SINT: u32 = 4;
pub const KVM_IRQ_ROUTING_XEN_EVTCHN: u32 = 5;
pub const KVM_XEN_HVM_CONFIG_HYPERCALL_MSR: u32 = 1;
pub const KVM_XEN_HVM_CONFIG_INTERCEPT_HCALL: u32 = 2;
pub const KVM_XEN_HVM_CONFIG_SHARED_INFO: u32 = 4;
pub const KVM_XEN_HVM_CONFIG_RUNSTATE: u32 = 8;
pub const KVM_XEN_HVM_CONFIG_EVTCHN_2LEVEL: u32 = 16;
pub const KVM_XEN_HVM_CONFIG_EVTCHN_SEND: u32 = 32;
pub const KVM_XEN_HVM_CONFIG_RUNSTATE_UPDATE_FLAG: u32 = 64;
pub const KVM_IRQFD_FLAG_DEASSIGN: u32 = 1;
pub const KVM_IRQFD_FLAG_RESAMPLE: u32 = 2;
pub const KVM_CLOCK_TSC_STABLE: u32 = 2;
pub const KVM_CLOCK_REALTIME: u32 = 4;
pub const KVM_CLOCK_HOST_TSC: u32 = 8;
pub const KVM_MMU_FSL_BOOKE_NOHV: u32 = 0;
pub const KVM_MMU_FSL_BOOKE_HV: u32 = 1;
pub const KVM_REG_ARCH_MASK: i64 = -72057594037927936;
pub const KVM_REG_GENERIC: u32 = 0;
pub const KVM_REG_PPC: u64 = 1152921504606846976;
pub const KVM_REG_X86: u64 = 2305843009213693952;
pub const KVM_REG_IA64: u64 = 3458764513820540928;
pub const KVM_REG_ARM: u64 = 4611686018427387904;
pub const KVM_REG_S390: u64 = 5764607523034234880;
pub const KVM_REG_ARM64: u64 = 6917529027641081856;
pub const KVM_REG_MIPS: u64 = 8070450532247928832;
pub const KVM_REG_RISCV: i64 = -9223372036854775808;
pub const KVM_REG_SIZE_SHIFT: u32 = 52;
pub const KVM_REG_SIZE_MASK: u64 = 67553994410557440;
pub const KVM_REG_SIZE_U8: u32 = 0;
pub const KVM_REG_SIZE_U16: u64 = 4503599627370496;
pub const KVM_REG_SIZE_U32: u64 = 9007199254740992;
pub const KVM_REG_SIZE_U64: u64 = 13510798882111488;
pub const KVM_REG_SIZE_U128: u64 = 18014398509481984;
pub const KVM_REG_SIZE_U256: u64 = 22517998136852480;
pub const KVM_REG_SIZE_U512: u64 = 27021597764222976;
pub const KVM_REG_SIZE_U1024: u64 = 31525197391593472;
pub const KVM_REG_SIZE_U2048: u64 = 36028797018963968;
pub const KVM_MSI_VALID_DEVID: u32 = 1;
pub const KVM_CREATE_DEVICE_TEST: u32 = 1;
pub const KVM_DEV_VFIO_FILE: u32 = 1;
pub const KVM_DEV_VFIO_FILE_ADD: u32 = 1;
pub const KVM_DEV_VFIO_FILE_DEL: u32 = 2;
pub const KVM_DEV_VFIO_GROUP: u32 = 1;
pub const KVM_DEV_VFIO_GROUP_ADD: u32 = 1;
pub const KVM_DEV_VFIO_GROUP_DEL: u32 = 2;
pub const KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: u32 = 3;
pub const KVM_S390_STORE_STATUS_NOADDR: i32 = -1;
pub const KVM_S390_STORE_STATUS_PREFIXED: i32 = -2;
pub const KVM_XEN_EVTCHN_DEASSIGN: u32 = 1;
pub const KVM_XEN_EVTCHN_UPDATE: u32 = 2;
pub const KVM_XEN_EVTCHN_RESET: u32 = 4;
pub const KVM_XEN_ATTR_TYPE_LONG_MODE: u32 = 0;
pub const KVM_XEN_ATTR_TYPE_SHARED_INFO: u32 = 1;
pub const KVM_XEN_ATTR_TYPE_UPCALL_VECTOR: u32 = 2;
pub const KVM_XEN_ATTR_TYPE_EVTCHN: u32 = 3;
pub const KVM_XEN_ATTR_TYPE_XEN_VERSION: u32 = 4;
pub const KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG: u32 = 5;
pub const KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO: u32 = 0;
pub const KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO: u32 = 1;
pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR: u32 = 2;
pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT: u32 = 3;
pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA: u32 = 4;
pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST: u32 = 5;
pub const KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID: u32 = 6;
pub const KVM_XEN_VCPU_ATTR_TYPE_TIMER: u32 = 7;
pub const KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR: u32 = 8;
pub const KVM_DEV_ASSIGN_ENABLE_IOMMU: u32 = 1;
pub const KVM_DEV_ASSIGN_PCI_2_3: u32 = 2;
pub const KVM_DEV_ASSIGN_MASK_INTX: u32 = 4;
pub const KVM_DEV_IRQ_HOST_INTX: u32 = 1;
pub const KVM_DEV_IRQ_HOST_MSI: u32 = 2;
pub const KVM_DEV_IRQ_HOST_MSIX: u32 = 4;
pub const KVM_DEV_IRQ_GUEST_INTX: u32 = 256;
pub const KVM_DEV_IRQ_GUEST_MSI: u32 = 512;
pub const KVM_DEV_IRQ_GUEST_MSIX: u32 = 1024;
pub const KVM_DEV_IRQ_HOST_MASK: u32 = 255;
pub const KVM_DEV_IRQ_GUEST_MASK: u32 = 65280;
pub const KVM_MAX_MSIX_PER_DEV: u32 = 256;
pub const KVM_X2APIC_API_USE_32BIT_IDS: u32 = 1;
pub const KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK: u32 = 2;
pub const KVM_ARM_DEV_EL1_VTIMER: u32 = 1;
pub const KVM_ARM_DEV_EL1_PTIMER: u32 = 2;
pub const KVM_ARM_DEV_PMU: u32 = 4;
pub const KVM_HYPERV_CONN_ID_MASK: u32 = 16777215;
pub const KVM_HYPERV_EVENTFD_DEASSIGN: u32 = 1;
pub const KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE: u32 = 1;
pub const KVM_DIRTY_LOG_INITIALLY_SET: u32 = 2;
pub const KVM_DIRTY_GFN_F_MASK: u32 = 3;
pub const KVM_BUS_LOCK_DETECTION_OFF: u32 = 1;
pub const KVM_BUS_LOCK_DETECTION_EXIT: u32 = 2;
pub const KVM_PMU_CAP_DISABLE: u32 = 1;
pub const KVM_STATS_TYPE_SHIFT: u32 = 0;
pub const KVM_STATS_TYPE_MASK: u32 = 15;
pub const KVM_STATS_TYPE_CUMULATIVE: u32 = 0;
pub const KVM_STATS_TYPE_INSTANT: u32 = 1;
pub const KVM_STATS_TYPE_PEAK: u32 = 2;
pub const KVM_STATS_TYPE_LINEAR_HIST: u32 = 3;
pub const KVM_STATS_TYPE_LOG_HIST: u32 = 4;
pub const KVM_STATS_TYPE_MAX: u32 = 4;
pub const KVM_STATS_UNIT_SHIFT: u32 = 4;
pub const KVM_STATS_UNIT_MASK: u32 = 240;
pub const KVM_STATS_UNIT_NONE: u32 = 0;
pub const KVM_STATS_UNIT_BYTES: u32 = 16;
pub const KVM_STATS_UNIT_SECONDS: u32 = 32;
pub const KVM_STATS_UNIT_CYCLES: u32 = 48;
pub const KVM_STATS_UNIT_BOOLEAN: u32 = 64;
pub const KVM_STATS_UNIT_MAX: u32 = 64;
pub const KVM_STATS_BASE_SHIFT: u32 = 8;
pub const KVM_STATS_BASE_MASK: u32 = 3840;
pub const KVM_STATS_BASE_POW10: u32 = 0;
pub const KVM_STATS_BASE_POW2: u32 = 256;
pub const KVM_STATS_BASE_MAX: u32 = 256;
pub const KVM_X86_NOTIFY_VMEXIT_ENABLED: u32 = 1;
pub const KVM_X86_NOTIFY_VMEXIT_USER: u32 = 2;
pub const KVM_S390_ZPCIOP_REG_AEN: u32 = 0;
pub const KVM_S390_ZPCIOP_DEREG_AEN: u32 = 1;
pub const KVM_S390_ZPCIOP_REGAEN_HOST: u32 = 1;
pub type __s128 = i128;
pub type __u128 = u128;
pub type __le16 = u16;
pub type __be16 = u16;
pub type __le32 = u32;
pub type __be32 = u32;
pub type __le64 = u64;
pub type __be64 = u64;
pub type __sum16 = u16;
pub type __wsum = u32;
pub type __poll_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_pic_state {
    pub last_irr: u8,
    pub irr: u8,
    pub imr: u8,
    pub isr: u8,
    pub priority_add: u8,
    pub irq_base: u8,
    pub read_reg_select: u8,
    pub poll: u8,
    pub special_mask: u8,
    pub init_state: u8,
    pub auto_eoi: u8,
    pub rotate_on_auto_eoi: u8,
    pub special_fully_nested_mode: u8,
    pub init4: u8,
    pub elcr: u8,
    pub elcr_mask: u8,
}
#[repr(C)]
#[derive(Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_ioapic_state {
    pub base_address: u64,
    pub ioregsel: u32,
    pub id: u32,
    pub irr: u32,
    pub pad: u32,
    pub redirtbl: [kvm_ioapic_state__bindgen_ty_1; 24usize],
}
#[repr(C)]
#[derive(Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub union kvm_ioapic_state__bindgen_ty_1 {
    pub bits: u64,
    pub fields: kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1 {
    pub vector: u8,
    pub _bitfield_align_1: [u8; 0],
    pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
    pub reserved: [u8; 4usize],
    pub dest_id: u8,
}
impl kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1 {
    #[inline]
    pub fn delivery_mode(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
    }
    #[inline]
    pub fn set_delivery_mode(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(0usize, 3u8, val as u64)
        }
    }
    #[inline]
    pub fn dest_mode(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_dest_mode(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(3usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn delivery_status(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_delivery_status(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(4usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn polarity(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_polarity(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(5usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn remote_irr(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_remote_irr(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(6usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn trig_mode(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_trig_mode(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(7usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn mask(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) }
    }
    #[inline]
    pub fn set_mask(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(8usize, 1u8, val as u64)
        }
    }
    #[inline]
    pub fn reserve(&self) -> u8 {
        unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u8) }
    }
    #[inline]
    pub fn set_reserve(&mut self, val: u8) {
        unsafe {
            let val: u8 = ::std::mem::transmute(val);
            self._bitfield_1.set(9usize, 7u8, val as u64)
        }
    }
    #[inline]
    pub fn new_bitfield_1(
        delivery_mode: u8,
        dest_mode: u8,
        delivery_status: u8,
        polarity: u8,
        remote_irr: u8,
        trig_mode: u8,
        mask: u8,
        reserve: u8,
    ) -> __BindgenBitfieldUnit<[u8; 2usize]> {
        let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
        __bindgen_bitfield_unit.set(0usize, 3u8, {
            let delivery_mode: u8 = unsafe { ::std::mem::transmute(delivery_mode) };
            delivery_mode as u64
        });
        __bindgen_bitfield_unit.set(3usize, 1u8, {
            let dest_mode: u8 = unsafe { ::std::mem::transmute(dest_mode) };
            dest_mode as u64
        });
        __bindgen_bitfield_unit.set(4usize, 1u8, {
            let delivery_status: u8 = unsafe { ::std::mem::transmute(delivery_status) };
            delivery_status as u64
        });
        __bindgen_bitfield_unit.set(5usize, 1u8, {
            let polarity: u8 = unsafe { ::std::mem::transmute(polarity) };
            polarity as u64
        });
        __bindgen_bitfield_unit.set(6usize, 1u8, {
            let remote_irr: u8 = unsafe { ::std::mem::transmute(remote_irr) };
            remote_irr as u64
        });
        __bindgen_bitfield_unit.set(7usize, 1u8, {
            let trig_mode: u8 = unsafe { ::std::mem::transmute(trig_mode) };
            trig_mode as u64
        });
        __bindgen_bitfield_unit.set(8usize, 1u8, {
            let mask: u8 = unsafe { ::std::mem::transmute(mask) };
            mask as u64
        });
        __bindgen_bitfield_unit.set(9usize, 7u8, {
            let reserve: u8 = unsafe { ::std::mem::transmute(reserve) };
            reserve as u64
        });
        __bindgen_bitfield_unit
    }
}
impl Default for kvm_ioapic_state__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_ioapic_state {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_regs {
    pub rax: u64,
    pub rbx: u64,
    pub rcx: u64,
    pub rdx: u64,
    pub rsi: u64,
    pub rdi: u64,
    pub rsp: u64,
    pub rbp: u64,
    pub r8: u64,
    pub r9: u64,
    pub r10: u64,
    pub r11: u64,
    pub r12: u64,
    pub r13: u64,
    pub r14: u64,
    pub r15: u64,
    pub rip: u64,
    pub rflags: u64,
}
#[repr(C)]
#[derive(Debug, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_lapic_state {
    pub regs: [::std::os::raw::c_char; 1024usize],
}
impl Default for kvm_lapic_state {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_segment {
    pub base: u64,
    pub limit: u32,
    pub selector: u16,
    pub type_: u8,
    pub present: u8,
    pub dpl: u8,
    pub db: u8,
    pub s: u8,
    pub l: u8,
    pub g: u8,
    pub avl: u8,
    pub unusable: u8,
    pub padding: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_dtable {
    pub base: u64,
    pub limit: u16,
    pub padding: [u16; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_sregs {
    pub cs: kvm_segment,
    pub ds: kvm_segment,
    pub es: kvm_segment,
    pub fs: kvm_segment,
    pub gs: kvm_segment,
    pub ss: kvm_segment,
    pub tr: kvm_segment,
    pub ldt: kvm_segment,
    pub gdt: kvm_dtable,
    pub idt: kvm_dtable,
    pub cr0: u64,
    pub cr2: u64,
    pub cr3: u64,
    pub cr4: u64,
    pub cr8: u64,
    pub efer: u64,
    pub apic_base: u64,
    pub interrupt_bitmap: [u64; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sregs2 {
    pub cs: kvm_segment,
    pub ds: kvm_segment,
    pub es: kvm_segment,
    pub fs: kvm_segment,
    pub gs: kvm_segment,
    pub ss: kvm_segment,
    pub tr: kvm_segment,
    pub ldt: kvm_segment,
    pub gdt: kvm_dtable,
    pub idt: kvm_dtable,
    pub cr0: u64,
    pub cr2: u64,
    pub cr3: u64,
    pub cr4: u64,
    pub cr8: u64,
    pub efer: u64,
    pub apic_base: u64,
    pub flags: u64,
    pub pdptrs: [u64; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_fpu {
    pub fpr: [[u8; 16usize]; 8usize],
    pub fcw: u16,
    pub fsw: u16,
    pub ftwx: u8,
    pub pad1: u8,
    pub last_opcode: u16,
    pub last_ip: u64,
    pub last_dp: u64,
    pub xmm: [[u8; 16usize]; 16usize],
    pub mxcsr: u32,
    pub pad2: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_msr_entry {
    pub index: u32,
    pub reserved: u32,
    pub data: u64,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_msrs {
    pub nmsrs: u32,
    pub pad: u32,
    pub entries: __IncompleteArrayField<kvm_msr_entry>,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_msr_list {
    pub nmsrs: u32,
    pub indices: __IncompleteArrayField<u32>,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_msr_filter_range {
    pub flags: u32,
    pub nmsrs: u32,
    pub base: u32,
    pub bitmap: *mut u8,
}
impl Default for kvm_msr_filter_range {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_msr_filter {
    pub flags: u32,
    pub ranges: [kvm_msr_filter_range; 16usize],
}
impl Default for kvm_msr_filter {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_cpuid_entry {
    pub function: u32,
    pub eax: u32,
    pub ebx: u32,
    pub ecx: u32,
    pub edx: u32,
    pub padding: u32,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_cpuid {
    pub nent: u32,
    pub padding: u32,
    pub entries: __IncompleteArrayField<kvm_cpuid_entry>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_cpuid_entry2 {
    pub function: u32,
    pub index: u32,
    pub flags: u32,
    pub eax: u32,
    pub ebx: u32,
    pub ecx: u32,
    pub edx: u32,
    pub padding: [u32; 3usize],
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_cpuid2 {
    pub nent: u32,
    pub padding: u32,
    pub entries: __IncompleteArrayField<kvm_cpuid_entry2>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_pit_channel_state {
    pub count: u32,
    pub latched_count: u16,
    pub count_latched: u8,
    pub status_latched: u8,
    pub status: u8,
    pub read_state: u8,
    pub write_state: u8,
    pub write_latch: u8,
    pub rw_mode: u8,
    pub mode: u8,
    pub bcd: u8,
    pub gate: u8,
    pub count_load_time: i64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_debug_exit_arch {
    pub exception: u32,
    pub pad: u32,
    pub pc: u64,
    pub dr6: u64,
    pub dr7: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_guest_debug_arch {
    pub debugreg: [u64; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_pit_state {
    pub channels: [kvm_pit_channel_state; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_pit_state2 {
    pub channels: [kvm_pit_channel_state; 3usize],
    pub flags: u32,
    pub reserved: [u32; 9usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_reinject_control {
    pub pit_reinject: u8,
    pub reserved: [u8; 31usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_vcpu_events {
    pub exception: kvm_vcpu_events__bindgen_ty_1,
    pub interrupt: kvm_vcpu_events__bindgen_ty_2,
    pub nmi: kvm_vcpu_events__bindgen_ty_3,
    pub sipi_vector: u32,
    pub flags: u32,
    pub smi: kvm_vcpu_events__bindgen_ty_4,
    pub triple_fault: kvm_vcpu_events__bindgen_ty_5,
    pub reserved: [u8; 26usize],
    pub exception_has_payload: u8,
    pub exception_payload: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_vcpu_events__bindgen_ty_1 {
    pub injected: u8,
    pub nr: u8,
    pub has_error_code: u8,
    pub pending: u8,
    pub error_code: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_vcpu_events__bindgen_ty_2 {
    pub injected: u8,
    pub nr: u8,
    pub soft: u8,
    pub shadow: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_vcpu_events__bindgen_ty_3 {
    pub injected: u8,
    pub pending: u8,
    pub masked: u8,
    pub pad: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_vcpu_events__bindgen_ty_4 {
    pub smm: u8,
    pub pending: u8,
    pub smm_inside_nmi: u8,
    pub latched_init: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_vcpu_events__bindgen_ty_5 {
    pub pending: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_debugregs {
    pub db: [u64; 4usize],
    pub dr6: u64,
    pub dr7: u64,
    pub flags: u64,
    pub reserved: [u64; 9usize],
}
#[repr(C)]
#[derive(Debug)]
pub struct kvm_xsave {
    pub region: [u32; 1024usize],
    pub extra: __IncompleteArrayField<u32>,
}
impl Default for kvm_xsave {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_xcr {
    pub xcr: u32,
    pub reserved: u32,
    pub value: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_xcrs {
    pub nr_xcrs: u32,
    pub flags: u32,
    pub xcrs: [kvm_xcr; 16usize],
    pub padding: [u64; 16usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sync_regs {
    pub regs: kvm_regs,
    pub sregs: kvm_sregs,
    pub events: kvm_vcpu_events,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_vmx_nested_state_data {
    pub vmcs12: [u8; 4096usize],
    pub shadow_vmcs12: [u8; 4096usize],
}
impl Default for kvm_vmx_nested_state_data {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vmx_nested_state_hdr {
    pub vmxon_pa: u64,
    pub vmcs12_pa: u64,
    pub smm: kvm_vmx_nested_state_hdr__bindgen_ty_1,
    pub pad: u16,
    pub flags: u32,
    pub preemption_timer_deadline: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vmx_nested_state_hdr__bindgen_ty_1 {
    pub flags: u16,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_svm_nested_state_data {
    pub vmcb12: [u8; 4096usize],
}
impl Default for kvm_svm_nested_state_data {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_svm_nested_state_hdr {
    pub vmcb_pa: u64,
}
#[repr(C)]
pub struct kvm_nested_state {
    pub flags: u16,
    pub format: u16,
    pub size: u32,
    pub hdr: kvm_nested_state__bindgen_ty_1,
    pub data: kvm_nested_state__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_nested_state__bindgen_ty_1 {
    pub vmx: kvm_vmx_nested_state_hdr,
    pub svm: kvm_svm_nested_state_hdr,
    pub pad: [u8; 120usize],
}
impl Default for kvm_nested_state__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct kvm_nested_state__bindgen_ty_2 {
    pub __bindgen_anon_1: __BindgenUnionField<kvm_nested_state__bindgen_ty_2__bindgen_ty_1>,
    pub __bindgen_anon_2: __BindgenUnionField<kvm_nested_state__bindgen_ty_2__bindgen_ty_2>,
    pub bindgen_union_field: [u8; 0usize],
}
#[repr(C)]
#[derive(Debug)]
pub struct kvm_nested_state__bindgen_ty_2__bindgen_ty_1 {
    pub __empty_vmx: kvm_nested_state__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1,
    pub vmx: __IncompleteArrayField<kvm_vmx_nested_state_data>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_nested_state__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 {}
impl Default for kvm_nested_state__bindgen_ty_2__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug)]
pub struct kvm_nested_state__bindgen_ty_2__bindgen_ty_2 {
    pub __empty_svm: kvm_nested_state__bindgen_ty_2__bindgen_ty_2__bindgen_ty_1,
    pub svm: __IncompleteArrayField<kvm_svm_nested_state_data>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_nested_state__bindgen_ty_2__bindgen_ty_2__bindgen_ty_1 {}
impl Default for kvm_nested_state__bindgen_ty_2__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_nested_state__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_nested_state {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_pmu_event_filter {
    pub action: u32,
    pub nevents: u32,
    pub fixed_counter_bitmap: u32,
    pub flags: u32,
    pub pad: [u32; 4usize],
    pub events: __IncompleteArrayField<u64>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_user_trace_setup {
    pub buf_size: u32,
    pub buf_nr: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_breakpoint {
    pub enabled: u32,
    pub padding: u32,
    pub address: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_debug_guest {
    pub enabled: u32,
    pub pad: u32,
    pub breakpoints: [kvm_breakpoint; 4usize],
    pub singlestep: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_userspace_memory_region {
    pub slot: u32,
    pub flags: u32,
    pub guest_phys_addr: u64,
    pub memory_size: u64,
    pub userspace_addr: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_irq_level {
    pub __bindgen_anon_1: kvm_irq_level__bindgen_ty_1,
    pub level: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_irq_level__bindgen_ty_1 {
    pub irq: u32,
    pub status: i32,
}
impl Default for kvm_irq_level__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_irq_level {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_irqchip {
    pub chip_id: u32,
    pub pad: u32,
    pub chip: kvm_irqchip__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_irqchip__bindgen_ty_1 {
    pub dummy: [::std::os::raw::c_char; 512usize],
    pub pic: kvm_pic_state,
    pub ioapic: kvm_ioapic_state,
}
impl Default for kvm_irqchip__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_irqchip {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_pit_config {
    pub flags: u32,
    pub pad: [u32; 15usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_skeys {
    pub start_gfn: u64,
    pub count: u64,
    pub skeydata_addr: u64,
    pub flags: u32,
    pub reserved: [u32; 9usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_s390_cmma_log {
    pub start_gfn: u64,
    pub count: u32,
    pub flags: u32,
    pub __bindgen_anon_1: kvm_s390_cmma_log__bindgen_ty_1,
    pub values: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_s390_cmma_log__bindgen_ty_1 {
    pub remaining: u64,
    pub mask: u64,
}
impl Default for kvm_s390_cmma_log__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_s390_cmma_log {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_hyperv_exit {
    pub type_: u32,
    pub pad1: u32,
    pub u: kvm_hyperv_exit__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_hyperv_exit__bindgen_ty_1 {
    pub synic: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1,
    pub hcall: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2,
    pub syndbg: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1 {
    pub msr: u32,
    pub pad2: u32,
    pub control: u64,
    pub evt_page: u64,
    pub msg_page: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2 {
    pub input: u64,
    pub result: u64,
    pub params: [u64; 2usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3 {
    pub msr: u32,
    pub pad2: u32,
    pub control: u64,
    pub status: u64,
    pub send_page: u64,
    pub recv_page: u64,
    pub pending_page: u64,
}
impl Default for kvm_hyperv_exit__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_hyperv_exit {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_xen_exit {
    pub type_: u32,
    pub u: kvm_xen_exit__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_xen_exit__bindgen_ty_1 {
    pub hcall: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_exit__bindgen_ty_1__bindgen_ty_1 {
    pub longmode: u32,
    pub cpl: u32,
    pub input: u64,
    pub result: u64,
    pub params: [u64; 6usize],
}
impl Default for kvm_xen_exit__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_xen_exit {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_run {
    pub request_interrupt_window: u8,
    pub immediate_exit: u8,
    pub padding1: [u8; 6usize],
    pub exit_reason: u32,
    pub ready_for_interrupt_injection: u8,
    pub if_flag: u8,
    pub flags: u16,
    pub cr8: u64,
    pub apic_base: u64,
    pub __bindgen_anon_1: kvm_run__bindgen_ty_1,
    pub kvm_valid_regs: u64,
    pub kvm_dirty_regs: u64,
    pub s: kvm_run__bindgen_ty_2,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_run__bindgen_ty_1 {
    pub hw: kvm_run__bindgen_ty_1__bindgen_ty_1,
    pub fail_entry: kvm_run__bindgen_ty_1__bindgen_ty_2,
    pub ex: kvm_run__bindgen_ty_1__bindgen_ty_3,
    pub io: kvm_run__bindgen_ty_1__bindgen_ty_4,
    pub debug: kvm_run__bindgen_ty_1__bindgen_ty_5,
    pub mmio: kvm_run__bindgen_ty_1__bindgen_ty_6,
    pub hypercall: kvm_run__bindgen_ty_1__bindgen_ty_7,
    pub tpr_access: kvm_run__bindgen_ty_1__bindgen_ty_8,
    pub s390_sieic: kvm_run__bindgen_ty_1__bindgen_ty_9,
    pub s390_reset_flags: u64,
    pub s390_ucontrol: kvm_run__bindgen_ty_1__bindgen_ty_10,
    pub dcr: kvm_run__bindgen_ty_1__bindgen_ty_11,
    pub internal: kvm_run__bindgen_ty_1__bindgen_ty_12,
    pub emulation_failure: kvm_run__bindgen_ty_1__bindgen_ty_13,
    pub osi: kvm_run__bindgen_ty_1__bindgen_ty_14,
    pub papr_hcall: kvm_run__bindgen_ty_1__bindgen_ty_15,
    pub s390_tsch: kvm_run__bindgen_ty_1__bindgen_ty_16,
    pub epr: kvm_run__bindgen_ty_1__bindgen_ty_17,
    pub system_event: kvm_run__bindgen_ty_1__bindgen_ty_18,
    pub s390_stsi: kvm_run__bindgen_ty_1__bindgen_ty_19,
    pub eoi: kvm_run__bindgen_ty_1__bindgen_ty_20,
    pub hyperv: kvm_hyperv_exit,
    pub arm_nisv: kvm_run__bindgen_ty_1__bindgen_ty_21,
    pub msr: kvm_run__bindgen_ty_1__bindgen_ty_22,
    pub xen: kvm_xen_exit,
    pub riscv_sbi: kvm_run__bindgen_ty_1__bindgen_ty_23,
    pub riscv_csr: kvm_run__bindgen_ty_1__bindgen_ty_24,
    pub notify: kvm_run__bindgen_ty_1__bindgen_ty_25,
    pub padding: [::std::os::raw::c_char; 256usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_1 {
    pub hardware_exit_reason: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_2 {
    pub hardware_entry_failure_reason: u64,
    pub cpu: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_3 {
    pub exception: u32,
    pub error_code: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_4 {
    pub direction: u8,
    pub size: u8,
    pub port: u16,
    pub count: u32,
    pub data_offset: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_5 {
    pub arch: kvm_debug_exit_arch,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_6 {
    pub phys_addr: u64,
    pub data: [u8; 8usize],
    pub len: u32,
    pub is_write: u8,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_7 {
    pub nr: u64,
    pub args: [u64; 6usize],
    pub ret: u64,
    pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1 {
    pub longmode: u32,
    pub flags: u64,
}
impl Default for kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_run__bindgen_ty_1__bindgen_ty_7 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_8 {
    pub rip: u64,
    pub is_write: u32,
    pub pad: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_9 {
    pub icptcode: u8,
    pub ipa: u16,
    pub ipb: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_10 {
    pub trans_exc_code: u64,
    pub pgm_code: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_11 {
    pub dcrn: u32,
    pub data: u32,
    pub is_write: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_12 {
    pub suberror: u32,
    pub ndata: u32,
    pub data: [u64; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_13 {
    pub suberror: u32,
    pub ndata: u32,
    pub flags: u64,
    pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1 {
    pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1 {
    pub insn_size: u8,
    pub insn_bytes: [u8; 15usize],
}
impl Default for kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_run__bindgen_ty_1__bindgen_ty_13 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_14 {
    pub gprs: [u64; 32usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_15 {
    pub nr: u64,
    pub ret: u64,
    pub args: [u64; 9usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_16 {
    pub subchannel_id: u16,
    pub subchannel_nr: u16,
    pub io_int_parm: u32,
    pub io_int_word: u32,
    pub ipb: u32,
    pub dequeued: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_17 {
    pub epr: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_18 {
    pub type_: u32,
    pub ndata: u32,
    pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1 {
    pub flags: u64,
    pub data: [u64; 16usize],
}
impl Default for kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_run__bindgen_ty_1__bindgen_ty_18 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_19 {
    pub addr: u64,
    pub ar: u8,
    pub reserved: u8,
    pub fc: u8,
    pub sel1: u8,
    pub sel2: u16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_20 {
    pub vector: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_21 {
    pub esr_iss: u64,
    pub fault_ipa: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_22 {
    pub error: u8,
    pub pad: [u8; 7usize],
    pub reason: u32,
    pub index: u32,
    pub data: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_23 {
    pub extension_id: ::std::os::raw::c_ulong,
    pub function_id: ::std::os::raw::c_ulong,
    pub args: [::std::os::raw::c_ulong; 6usize],
    pub ret: [::std::os::raw::c_ulong; 2usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_24 {
    pub csr_num: ::std::os::raw::c_ulong,
    pub new_value: ::std::os::raw::c_ulong,
    pub write_mask: ::std::os::raw::c_ulong,
    pub ret_value: ::std::os::raw::c_ulong,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_run__bindgen_ty_1__bindgen_ty_25 {
    pub flags: u32,
}
impl Default for kvm_run__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_run__bindgen_ty_2 {
    pub regs: kvm_sync_regs,
    pub padding: [::std::os::raw::c_char; 2048usize],
}
impl Default for kvm_run__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_run {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_coalesced_mmio_zone {
    pub addr: u64,
    pub size: u32,
    pub __bindgen_anon_1: kvm_coalesced_mmio_zone__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_coalesced_mmio_zone__bindgen_ty_1 {
    pub pad: u32,
    pub pio: u32,
}
impl Default for kvm_coalesced_mmio_zone__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_coalesced_mmio_zone {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_coalesced_mmio {
    pub phys_addr: u64,
    pub len: u32,
    pub __bindgen_anon_1: kvm_coalesced_mmio__bindgen_ty_1,
    pub data: [u8; 8usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_coalesced_mmio__bindgen_ty_1 {
    pub pad: u32,
    pub pio: u32,
}
impl Default for kvm_coalesced_mmio__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_coalesced_mmio {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct kvm_coalesced_mmio_ring {
    pub first: u32,
    pub last: u32,
    pub coalesced_mmio: __IncompleteArrayField<kvm_coalesced_mmio>,
}
impl Default for kvm_coalesced_mmio_ring {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_translation {
    pub linear_address: u64,
    pub physical_address: u64,
    pub valid: u8,
    pub writeable: u8,
    pub usermode: u8,
    pub pad: [u8; 5usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_s390_mem_op {
    pub gaddr: u64,
    pub flags: u64,
    pub size: u32,
    pub op: u32,
    pub buf: u64,
    pub __bindgen_anon_1: kvm_s390_mem_op__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_s390_mem_op__bindgen_ty_1 {
    pub __bindgen_anon_1: kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1,
    pub sida_offset: u32,
    pub reserved: [u8; 32usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1 {
    pub ar: u8,
    pub key: u8,
    pub pad1: [u8; 6usize],
    pub old_addr: u64,
}
impl Default for kvm_s390_mem_op__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_s390_mem_op {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_interrupt {
    pub irq: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_dirty_log {
    pub slot: u32,
    pub padding1: u32,
    pub __bindgen_anon_1: kvm_dirty_log__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_dirty_log__bindgen_ty_1 {
    pub dirty_bitmap: *mut ::std::os::raw::c_void,
    pub padding2: u64,
}
impl Default for kvm_dirty_log__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_dirty_log {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_clear_dirty_log {
    pub slot: u32,
    pub num_pages: u32,
    pub first_page: u64,
    pub __bindgen_anon_1: kvm_clear_dirty_log__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_clear_dirty_log__bindgen_ty_1 {
    pub dirty_bitmap: *mut ::std::os::raw::c_void,
    pub padding2: u64,
}
impl Default for kvm_clear_dirty_log__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_clear_dirty_log {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_signal_mask {
    pub len: u32,
    pub sigset: __IncompleteArrayField<u8>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_tpr_access_ctl {
    pub enabled: u32,
    pub flags: u32,
    pub reserved: [u32; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vapic_addr {
    pub vapic_addr: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_mp_state {
    pub mp_state: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_psw {
    pub mask: u64,
    pub addr: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_interrupt {
    pub type_: u32,
    pub parm: u32,
    pub parm64: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_io_info {
    pub subchannel_id: u16,
    pub subchannel_nr: u16,
    pub io_int_parm: u32,
    pub io_int_word: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_ext_info {
    pub ext_params: u32,
    pub pad: u32,
    pub ext_params2: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pgm_info {
    pub trans_exc_code: u64,
    pub mon_code: u64,
    pub per_address: u64,
    pub data_exc_code: u32,
    pub code: u16,
    pub mon_class_nr: u16,
    pub per_code: u8,
    pub per_atmid: u8,
    pub exc_access_id: u8,
    pub per_access_id: u8,
    pub op_access_id: u8,
    pub flags: u8,
    pub pad: [u8; 2usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_prefix_info {
    pub address: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_extcall_info {
    pub code: u16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_emerg_info {
    pub code: u16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_stop_info {
    pub flags: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_mchk_info {
    pub cr14: u64,
    pub mcic: u64,
    pub failing_storage_address: u64,
    pub ext_damage_code: u32,
    pub pad: u32,
    pub fixed_logout: [u8; 16usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_s390_irq {
    pub type_: u64,
    pub u: kvm_s390_irq__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_s390_irq__bindgen_ty_1 {
    pub io: kvm_s390_io_info,
    pub ext: kvm_s390_ext_info,
    pub pgm: kvm_s390_pgm_info,
    pub emerg: kvm_s390_emerg_info,
    pub extcall: kvm_s390_extcall_info,
    pub prefix: kvm_s390_prefix_info,
    pub stop: kvm_s390_stop_info,
    pub mchk: kvm_s390_mchk_info,
    pub reserved: [::std::os::raw::c_char; 64usize],
}
impl Default for kvm_s390_irq__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_s390_irq {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_irq_state {
    pub buf: u64,
    pub flags: u32,
    pub len: u32,
    pub reserved: [u32; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_guest_debug {
    pub control: u32,
    pub pad: u32,
    pub arch: kvm_guest_debug_arch,
}
pub const kvm_ioeventfd_flag_nr_datamatch: _bindgen_ty_1 = 0;
pub const kvm_ioeventfd_flag_nr_pio: _bindgen_ty_1 = 1;
pub const kvm_ioeventfd_flag_nr_deassign: _bindgen_ty_1 = 2;
pub const kvm_ioeventfd_flag_nr_virtio_ccw_notify: _bindgen_ty_1 = 3;
pub const kvm_ioeventfd_flag_nr_fast_mmio: _bindgen_ty_1 = 4;
pub const kvm_ioeventfd_flag_nr_max: _bindgen_ty_1 = 5;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_ioeventfd {
    pub datamatch: u64,
    pub addr: u64,
    pub len: u32,
    pub fd: i32,
    pub flags: u32,
    pub pad: [u8; 36usize],
}
impl Default for kvm_ioeventfd {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_enable_cap {
    pub cap: u32,
    pub flags: u32,
    pub args: [u64; 4usize],
    pub pad: [u8; 64usize],
}
impl Default for kvm_enable_cap {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct kvm_ppc_pvinfo {
    pub flags: u32,
    pub hcall: [u32; 4usize],
    pub pad: [u8; 108usize],
}
impl Default for kvm_ppc_pvinfo {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_ppc_one_page_size {
    pub page_shift: u32,
    pub pte_enc: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_ppc_one_seg_page_size {
    pub page_shift: u32,
    pub slb_enc: u32,
    pub enc: [kvm_ppc_one_page_size; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_ppc_smmu_info {
    pub flags: u64,
    pub slb_size: u32,
    pub data_keys: u16,
    pub instr_keys: u16,
    pub sps: [kvm_ppc_one_seg_page_size; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_ppc_resize_hpt {
    pub flags: u64,
    pub shift: u32,
    pub pad: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_irq_routing_irqchip {
    pub irqchip: u32,
    pub pin: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_irq_routing_msi {
    pub address_lo: u32,
    pub address_hi: u32,
    pub data: u32,
    pub __bindgen_anon_1: kvm_irq_routing_msi__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_irq_routing_msi__bindgen_ty_1 {
    pub pad: u32,
    pub devid: u32,
}
impl Default for kvm_irq_routing_msi__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_irq_routing_msi {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_irq_routing_s390_adapter {
    pub ind_addr: u64,
    pub summary_addr: u64,
    pub ind_offset: u64,
    pub summary_offset: u32,
    pub adapter_id: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_irq_routing_hv_sint {
    pub vcpu: u32,
    pub sint: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_irq_routing_xen_evtchn {
    pub port: u32,
    pub vcpu: u32,
    pub priority: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_irq_routing_entry {
    pub gsi: u32,
    pub type_: u32,
    pub flags: u32,
    pub pad: u32,
    pub u: kvm_irq_routing_entry__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_irq_routing_entry__bindgen_ty_1 {
    pub irqchip: kvm_irq_routing_irqchip,
    pub msi: kvm_irq_routing_msi,
    pub adapter: kvm_irq_routing_s390_adapter,
    pub hv_sint: kvm_irq_routing_hv_sint,
    pub xen_evtchn: kvm_irq_routing_xen_evtchn,
    pub pad: [u32; 8usize],
}
impl Default for kvm_irq_routing_entry__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_irq_routing_entry {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
pub struct kvm_irq_routing {
    pub nr: u32,
    pub flags: u32,
    pub entries: __IncompleteArrayField<kvm_irq_routing_entry>,
}
impl Default for kvm_irq_routing {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_x86_mce {
    pub status: u64,
    pub addr: u64,
    pub misc: u64,
    pub mcg_status: u64,
    pub bank: u8,
    pub pad1: [u8; 7usize],
    pub pad2: [u64; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_hvm_config {
    pub flags: u32,
    pub msr: u32,
    pub blob_addr_32: u64,
    pub blob_addr_64: u64,
    pub blob_size_32: u8,
    pub blob_size_64: u8,
    pub pad2: [u8; 30usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_irqfd {
    pub fd: u32,
    pub gsi: u32,
    pub flags: u32,
    pub resamplefd: u32,
    pub pad: [u8; 16usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, FromZeroes, FromBytes, AsBytes)]
pub struct kvm_clock_data {
    pub clock: u64,
    pub flags: u32,
    pub pad0: u32,
    pub realtime: u64,
    pub host_tsc: u64,
    pub pad: [u32; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_config_tlb {
    pub params: u64,
    pub array: u64,
    pub mmu_type: u32,
    pub array_len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_dirty_tlb {
    pub bitmap: u64,
    pub num_dirty: u32,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_reg_list {
    pub n: u64,
    pub reg: __IncompleteArrayField<u64>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_one_reg {
    pub id: u64,
    pub addr: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_msi {
    pub address_lo: u32,
    pub address_hi: u32,
    pub data: u32,
    pub flags: u32,
    pub devid: u32,
    pub pad: [u8; 12usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_arm_device_addr {
    pub id: u64,
    pub addr: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_create_device {
    pub type_: u32,
    pub fd: u32,
    pub flags: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_device_attr {
    pub flags: u32,
    pub group: u32,
    pub attr: u64,
    pub addr: u64,
}
pub const kvm_device_type_KVM_DEV_TYPE_FSL_MPIC_20: kvm_device_type = 1;
pub const kvm_device_type_KVM_DEV_TYPE_FSL_MPIC_42: kvm_device_type = 2;
pub const kvm_device_type_KVM_DEV_TYPE_XICS: kvm_device_type = 3;
pub const kvm_device_type_KVM_DEV_TYPE_VFIO: kvm_device_type = 4;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V2: kvm_device_type = 5;
pub const kvm_device_type_KVM_DEV_TYPE_FLIC: kvm_device_type = 6;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V3: kvm_device_type = 7;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_ITS: kvm_device_type = 8;
pub const kvm_device_type_KVM_DEV_TYPE_XIVE: kvm_device_type = 9;
pub const kvm_device_type_KVM_DEV_TYPE_ARM_PV_TIME: kvm_device_type = 10;
pub const kvm_device_type_KVM_DEV_TYPE_RISCV_AIA: kvm_device_type = 11;
pub const kvm_device_type_KVM_DEV_TYPE_MAX: kvm_device_type = 12;
pub type kvm_device_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_vfio_spapr_tce {
    pub groupfd: i32,
    pub tablefd: i32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_ucas_mapping {
    pub user_addr: u64,
    pub vcpu_addr: u64,
    pub length: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_enc_region {
    pub addr: u64,
    pub size: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_sec_parm {
    pub origin: u64,
    pub length: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_unp {
    pub addr: u64,
    pub size: u64,
    pub tweak: u64,
}
pub const pv_cmd_dmp_id_KVM_PV_DUMP_INIT: pv_cmd_dmp_id = 0;
pub const pv_cmd_dmp_id_KVM_PV_DUMP_CONFIG_STOR_STATE: pv_cmd_dmp_id = 1;
pub const pv_cmd_dmp_id_KVM_PV_DUMP_COMPLETE: pv_cmd_dmp_id = 2;
pub const pv_cmd_dmp_id_KVM_PV_DUMP_CPU: pv_cmd_dmp_id = 3;
pub type pv_cmd_dmp_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_dmp {
    pub subcmd: u64,
    pub buff_addr: u64,
    pub buff_len: u64,
    pub gaddr: u64,
    pub reserved: [u64; 4usize],
}
pub const pv_cmd_info_id_KVM_PV_INFO_VM: pv_cmd_info_id = 0;
pub const pv_cmd_info_id_KVM_PV_INFO_DUMP: pv_cmd_info_id = 1;
pub type pv_cmd_info_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_info_dump {
    pub dump_cpu_buffer_len: u64,
    pub dump_config_mem_buffer_per_1m: u64,
    pub dump_config_finalize_len: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_info_vm {
    pub inst_calls_list: [u64; 4usize],
    pub max_cpus: u64,
    pub max_guests: u64,
    pub max_guest_addr: u64,
    pub feature_indication: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_pv_info_header {
    pub id: u32,
    pub len_max: u32,
    pub len_written: u32,
    pub reserved: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_s390_pv_info {
    pub header: kvm_s390_pv_info_header,
    pub __bindgen_anon_1: kvm_s390_pv_info__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_s390_pv_info__bindgen_ty_1 {
    pub dump: kvm_s390_pv_info_dump,
    pub vm: kvm_s390_pv_info_vm,
}
impl Default for kvm_s390_pv_info__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_s390_pv_info {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub const pv_cmd_id_KVM_PV_ENABLE: pv_cmd_id = 0;
pub const pv_cmd_id_KVM_PV_DISABLE: pv_cmd_id = 1;
pub const pv_cmd_id_KVM_PV_SET_SEC_PARMS: pv_cmd_id = 2;
pub const pv_cmd_id_KVM_PV_UNPACK: pv_cmd_id = 3;
pub const pv_cmd_id_KVM_PV_VERIFY: pv_cmd_id = 4;
pub const pv_cmd_id_KVM_PV_PREP_RESET: pv_cmd_id = 5;
pub const pv_cmd_id_KVM_PV_UNSHARE_ALL: pv_cmd_id = 6;
pub const pv_cmd_id_KVM_PV_INFO: pv_cmd_id = 7;
pub const pv_cmd_id_KVM_PV_DUMP: pv_cmd_id = 8;
pub const pv_cmd_id_KVM_PV_ASYNC_CLEANUP_PREPARE: pv_cmd_id = 9;
pub const pv_cmd_id_KVM_PV_ASYNC_CLEANUP_PERFORM: pv_cmd_id = 10;
pub type pv_cmd_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_pv_cmd {
    pub cmd: u32,
    pub rc: u16,
    pub rrc: u16,
    pub data: u64,
    pub flags: u32,
    pub reserved: [u32; 3usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_xen_hvm_attr {
    pub type_: u16,
    pub pad: [u16; 3usize],
    pub u: kvm_xen_hvm_attr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_xen_hvm_attr__bindgen_ty_1 {
    pub long_mode: u8,
    pub vector: u8,
    pub runstate_update_flag: u8,
    pub shared_info: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1,
    pub evtchn: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2,
    pub xen_version: u32,
    pub pad: [u64; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1 {
    pub gfn: u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2 {
    pub send_port: u32,
    pub type_: u32,
    pub flags: u32,
    pub deliver: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {
    pub port: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1,
    pub eventfd: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2,
    pub padding: [u32; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 {
    pub port: u32,
    pub vcpu: u32,
    pub priority: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 {
    pub port: u32,
    pub fd: i32,
}
impl Default for kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_xen_hvm_attr__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_xen_hvm_attr {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_xen_vcpu_attr {
    pub type_: u16,
    pub pad: [u16; 3usize],
    pub u: kvm_xen_vcpu_attr__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_xen_vcpu_attr__bindgen_ty_1 {
    pub gpa: u64,
    pub pad: [u64; 8usize],
    pub runstate: kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1,
    pub vcpu_id: u32,
    pub timer: kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2,
    pub vector: u8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1 {
    pub state: u64,
    pub state_entry_time: u64,
    pub time_running: u64,
    pub time_runnable: u64,
    pub time_blocked: u64,
    pub time_offline: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2 {
    pub port: u32,
    pub priority: u32,
    pub expires_ns: u64,
}
impl Default for kvm_xen_vcpu_attr__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_xen_vcpu_attr {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub const sev_cmd_id_KVM_SEV_INIT: sev_cmd_id = 0;
pub const sev_cmd_id_KVM_SEV_ES_INIT: sev_cmd_id = 1;
pub const sev_cmd_id_KVM_SEV_LAUNCH_START: sev_cmd_id = 2;
pub const sev_cmd_id_KVM_SEV_LAUNCH_UPDATE_DATA: sev_cmd_id = 3;
pub const sev_cmd_id_KVM_SEV_LAUNCH_UPDATE_VMSA: sev_cmd_id = 4;
pub const sev_cmd_id_KVM_SEV_LAUNCH_SECRET: sev_cmd_id = 5;
pub const sev_cmd_id_KVM_SEV_LAUNCH_MEASURE: sev_cmd_id = 6;
pub const sev_cmd_id_KVM_SEV_LAUNCH_FINISH: sev_cmd_id = 7;
pub const sev_cmd_id_KVM_SEV_SEND_START: sev_cmd_id = 8;
pub const sev_cmd_id_KVM_SEV_SEND_UPDATE_DATA: sev_cmd_id = 9;
pub const sev_cmd_id_KVM_SEV_SEND_UPDATE_VMSA: sev_cmd_id = 10;
pub const sev_cmd_id_KVM_SEV_SEND_FINISH: sev_cmd_id = 11;
pub const sev_cmd_id_KVM_SEV_RECEIVE_START: sev_cmd_id = 12;
pub const sev_cmd_id_KVM_SEV_RECEIVE_UPDATE_DATA: sev_cmd_id = 13;
pub const sev_cmd_id_KVM_SEV_RECEIVE_UPDATE_VMSA: sev_cmd_id = 14;
pub const sev_cmd_id_KVM_SEV_RECEIVE_FINISH: sev_cmd_id = 15;
pub const sev_cmd_id_KVM_SEV_GUEST_STATUS: sev_cmd_id = 16;
pub const sev_cmd_id_KVM_SEV_DBG_DECRYPT: sev_cmd_id = 17;
pub const sev_cmd_id_KVM_SEV_DBG_ENCRYPT: sev_cmd_id = 18;
pub const sev_cmd_id_KVM_SEV_CERT_EXPORT: sev_cmd_id = 19;
pub const sev_cmd_id_KVM_SEV_GET_ATTESTATION_REPORT: sev_cmd_id = 20;
pub const sev_cmd_id_KVM_SEV_SEND_CANCEL: sev_cmd_id = 21;
pub const sev_cmd_id_KVM_SEV_NR_MAX: sev_cmd_id = 22;
pub type sev_cmd_id = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_cmd {
    pub id: u32,
    pub data: u64,
    pub error: u32,
    pub sev_fd: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_launch_start {
    pub handle: u32,
    pub policy: u32,
    pub dh_uaddr: u64,
    pub dh_len: u32,
    pub session_uaddr: u64,
    pub session_len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_launch_update_data {
    pub uaddr: u64,
    pub len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_launch_secret {
    pub hdr_uaddr: u64,
    pub hdr_len: u32,
    pub guest_uaddr: u64,
    pub guest_len: u32,
    pub trans_uaddr: u64,
    pub trans_len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_launch_measure {
    pub uaddr: u64,
    pub len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_guest_status {
    pub handle: u32,
    pub policy: u32,
    pub state: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_dbg {
    pub src_uaddr: u64,
    pub dst_uaddr: u64,
    pub len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_attestation_report {
    pub mnonce: [u8; 16usize],
    pub uaddr: u64,
    pub len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_send_start {
    pub policy: u32,
    pub pdh_cert_uaddr: u64,
    pub pdh_cert_len: u32,
    pub plat_certs_uaddr: u64,
    pub plat_certs_len: u32,
    pub amd_certs_uaddr: u64,
    pub amd_certs_len: u32,
    pub session_uaddr: u64,
    pub session_len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_send_update_data {
    pub hdr_uaddr: u64,
    pub hdr_len: u32,
    pub guest_uaddr: u64,
    pub guest_len: u32,
    pub trans_uaddr: u64,
    pub trans_len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_receive_start {
    pub handle: u32,
    pub policy: u32,
    pub pdh_uaddr: u64,
    pub pdh_len: u32,
    pub session_uaddr: u64,
    pub session_len: u32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_sev_receive_update_data {
    pub hdr_uaddr: u64,
    pub hdr_len: u32,
    pub guest_uaddr: u64,
    pub guest_len: u32,
    pub trans_uaddr: u64,
    pub trans_len: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_assigned_pci_dev {
    pub assigned_dev_id: u32,
    pub busnr: u32,
    pub devfn: u32,
    pub flags: u32,
    pub segnr: u32,
    pub __bindgen_anon_1: kvm_assigned_pci_dev__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_assigned_pci_dev__bindgen_ty_1 {
    pub reserved: [u32; 11usize],
}
impl Default for kvm_assigned_pci_dev__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_assigned_pci_dev {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_assigned_irq {
    pub assigned_dev_id: u32,
    pub host_irq: u32,
    pub guest_irq: u32,
    pub flags: u32,
    pub __bindgen_anon_1: kvm_assigned_irq__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_assigned_irq__bindgen_ty_1 {
    pub reserved: [u32; 12usize],
}
impl Default for kvm_assigned_irq__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_assigned_irq {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_assigned_msix_nr {
    pub assigned_dev_id: u32,
    pub entry_nr: u16,
    pub padding: u16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_assigned_msix_entry {
    pub assigned_dev_id: u32,
    pub gsi: u32,
    pub entry: u16,
    pub padding: [u16; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_hyperv_eventfd {
    pub conn_id: u32,
    pub fd: i32,
    pub flags: u32,
    pub padding: [u32; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_dirty_gfn {
    pub flags: u32,
    pub slot: u32,
    pub offset: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_stats_header {
    pub flags: u32,
    pub name_size: u32,
    pub num_desc: u32,
    pub id_offset: u32,
    pub desc_offset: u32,
    pub data_offset: u32,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct kvm_stats_desc {
    pub flags: u32,
    pub exponent: i16,
    pub size: u16,
    pub offset: u32,
    pub bucket_size: u32,
    pub name: __IncompleteArrayField<::std::os::raw::c_char>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct kvm_s390_zpci_op {
    pub fh: u32,
    pub op: u8,
    pub pad: [u8; 3usize],
    pub u: kvm_s390_zpci_op__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union kvm_s390_zpci_op__bindgen_ty_1 {
    pub reg_aen: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1,
    pub reserved: [u64; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1 {
    pub ibv: u64,
    pub sb: u64,
    pub flags: u32,
    pub noi: u32,
    pub isc: u8,
    pub sbo: u8,
    pub pad: u16,
}
impl Default for kvm_s390_zpci_op__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
impl Default for kvm_s390_zpci_op {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}