1 // Copyright 2019 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 /*
6 * automatically generated by bindgen 0.49.2.
7 * From chromeos-linux v5.4 include/linux/kvm.h
8 * $ cd /path/to/kernel/v5.4/
9 * $ make headers_install ARCH=x86 INSTALL_HDR_PATH=x86_v5_4_headers
10 * $ cd x86_v5_4_headers
11 * $ bindgen --with-derive-default -o bindings.rs include/linux/kvm.h -- -Iinclude
12 */
13
14 #[repr(C)]
15 #[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
16 pub struct __BindgenBitfieldUnit<Storage, Align>
17 where
18 Storage: AsRef<[u8]> + AsMut<[u8]>,
19 {
20 storage: Storage,
21 align: [Align; 0],
22 }
23 impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
24 where
25 Storage: AsRef<[u8]> + AsMut<[u8]>,
26 {
27 #[inline]
new(storage: Storage) -> Self28 pub fn new(storage: Storage) -> Self {
29 Self { storage, align: [] }
30 }
31 #[inline]
get_bit(&self, index: usize) -> bool32 pub fn get_bit(&self, index: usize) -> bool {
33 debug_assert!(index / 8 < self.storage.as_ref().len());
34 let byte_index = index / 8;
35 let byte = self.storage.as_ref()[byte_index];
36 let bit_index = if cfg!(target_endian = "big") {
37 7 - (index % 8)
38 } else {
39 index % 8
40 };
41 let mask = 1 << bit_index;
42 byte & mask == mask
43 }
44 #[inline]
set_bit(&mut self, index: usize, val: bool)45 pub fn set_bit(&mut self, index: usize, val: bool) {
46 debug_assert!(index / 8 < self.storage.as_ref().len());
47 let byte_index = index / 8;
48 let byte = &mut self.storage.as_mut()[byte_index];
49 let bit_index = if cfg!(target_endian = "big") {
50 7 - (index % 8)
51 } else {
52 index % 8
53 };
54 let mask = 1 << bit_index;
55 if val {
56 *byte |= mask;
57 } else {
58 *byte &= !mask;
59 }
60 }
61 #[inline]
get(&self, bit_offset: usize, bit_width: u8) -> u6462 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
63 debug_assert!(bit_width <= 64);
64 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
65 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
66 let mut val = 0;
67 for i in 0..(bit_width as usize) {
68 if self.get_bit(i + bit_offset) {
69 let index = if cfg!(target_endian = "big") {
70 bit_width as usize - 1 - i
71 } else {
72 i
73 };
74 val |= 1 << index;
75 }
76 }
77 val
78 }
79 #[inline]
set(&mut self, bit_offset: usize, bit_width: u8, val: u64)80 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
81 debug_assert!(bit_width <= 64);
82 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
83 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
84 for i in 0..(bit_width as usize) {
85 let mask = 1 << i;
86 let val_bit_is_set = val & mask == mask;
87 let index = if cfg!(target_endian = "big") {
88 bit_width as usize - 1 - i
89 } else {
90 i
91 };
92 self.set_bit(index + bit_offset, val_bit_is_set);
93 }
94 }
95 }
96 #[repr(C)]
97 #[derive(Default)]
98 pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
99 impl<T> __IncompleteArrayField<T> {
100 #[inline]
new() -> Self101 pub fn new() -> Self {
102 __IncompleteArrayField(::std::marker::PhantomData, [])
103 }
104 #[inline]
as_ptr(&self) -> *const T105 pub unsafe fn as_ptr(&self) -> *const T {
106 ::std::mem::transmute(self)
107 }
108 #[inline]
as_mut_ptr(&mut self) -> *mut T109 pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
110 ::std::mem::transmute(self)
111 }
112 #[inline]
as_slice(&self, len: usize) -> &[T]113 pub unsafe fn as_slice(&self, len: usize) -> &[T] {
114 ::std::slice::from_raw_parts(self.as_ptr(), len)
115 }
116 #[inline]
as_mut_slice(&mut self, len: usize) -> &mut [T]117 pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
118 ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
119 }
120 }
121 impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result122 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
123 fmt.write_str("__IncompleteArrayField")
124 }
125 }
126 impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
127 #[inline]
clone(&self) -> Self128 fn clone(&self) -> Self {
129 Self::new()
130 }
131 }
132 #[repr(C)]
133 pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
134 impl<T> __BindgenUnionField<T> {
135 #[inline]
new() -> Self136 pub fn new() -> Self {
137 __BindgenUnionField(::std::marker::PhantomData)
138 }
139 #[inline]
as_ref(&self) -> &T140 pub unsafe fn as_ref(&self) -> &T {
141 ::std::mem::transmute(self)
142 }
143 #[inline]
as_mut(&mut self) -> &mut T144 pub unsafe fn as_mut(&mut self) -> &mut T {
145 ::std::mem::transmute(self)
146 }
147 }
148 impl<T> ::std::default::Default for __BindgenUnionField<T> {
149 #[inline]
default() -> Self150 fn default() -> Self {
151 Self::new()
152 }
153 }
154 impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
155 #[inline]
clone(&self) -> Self156 fn clone(&self) -> Self {
157 Self::new()
158 }
159 }
160 impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
161 impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result162 fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
163 fmt.write_str("__BindgenUnionField")
164 }
165 }
166 impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
hash<H: ::std::hash::Hasher>(&self, _state: &mut H)167 fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
168 }
169 impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
eq(&self, _other: &__BindgenUnionField<T>) -> bool170 fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
171 true
172 }
173 }
174 impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
175 pub const __BITS_PER_LONG: u32 = 64;
176 pub const __FD_SETSIZE: u32 = 1024;
177 pub const _IOC_NRBITS: u32 = 8;
178 pub const _IOC_TYPEBITS: u32 = 8;
179 pub const _IOC_SIZEBITS: u32 = 14;
180 pub const _IOC_DIRBITS: u32 = 2;
181 pub const _IOC_NRMASK: u32 = 255;
182 pub const _IOC_TYPEMASK: u32 = 255;
183 pub const _IOC_SIZEMASK: u32 = 16383;
184 pub const _IOC_DIRMASK: u32 = 3;
185 pub const _IOC_NRSHIFT: u32 = 0;
186 pub const _IOC_TYPESHIFT: u32 = 8;
187 pub const _IOC_SIZESHIFT: u32 = 16;
188 pub const _IOC_DIRSHIFT: u32 = 30;
189 pub const _IOC_NONE: u32 = 0;
190 pub const _IOC_WRITE: u32 = 1;
191 pub const _IOC_READ: u32 = 2;
192 pub const IOC_IN: u32 = 1073741824;
193 pub const IOC_OUT: u32 = 2147483648;
194 pub const IOC_INOUT: u32 = 3221225472;
195 pub const IOCSIZE_MASK: u32 = 1073676288;
196 pub const IOCSIZE_SHIFT: u32 = 16;
197 pub const KVM_PIO_PAGE_OFFSET: u32 = 1;
198 pub const KVM_COALESCED_MMIO_PAGE_OFFSET: u32 = 2;
199 pub const DE_VECTOR: u32 = 0;
200 pub const DB_VECTOR: u32 = 1;
201 pub const BP_VECTOR: u32 = 3;
202 pub const OF_VECTOR: u32 = 4;
203 pub const BR_VECTOR: u32 = 5;
204 pub const UD_VECTOR: u32 = 6;
205 pub const NM_VECTOR: u32 = 7;
206 pub const DF_VECTOR: u32 = 8;
207 pub const TS_VECTOR: u32 = 10;
208 pub const NP_VECTOR: u32 = 11;
209 pub const SS_VECTOR: u32 = 12;
210 pub const GP_VECTOR: u32 = 13;
211 pub const PF_VECTOR: u32 = 14;
212 pub const MF_VECTOR: u32 = 16;
213 pub const AC_VECTOR: u32 = 17;
214 pub const MC_VECTOR: u32 = 18;
215 pub const XM_VECTOR: u32 = 19;
216 pub const VE_VECTOR: u32 = 20;
217 pub const KVM_NR_INTERRUPTS: u32 = 256;
218 pub const KVM_IOAPIC_NUM_PINS: u32 = 24;
219 pub const KVM_IRQCHIP_PIC_MASTER: u32 = 0;
220 pub const KVM_IRQCHIP_PIC_SLAVE: u32 = 1;
221 pub const KVM_IRQCHIP_IOAPIC: u32 = 2;
222 pub const KVM_NR_IRQCHIPS: u32 = 3;
223 pub const KVM_RUN_X86_SMM: u32 = 1;
224 pub const KVM_APIC_REG_SIZE: u32 = 1024;
225 pub const KVM_CPUID_FLAG_SIGNIFCANT_INDEX: u32 = 1;
226 pub const KVM_CPUID_FLAG_STATEFUL_FUNC: u32 = 2;
227 pub const KVM_CPUID_FLAG_STATE_READ_NEXT: u32 = 4;
228 pub const KVM_GUESTDBG_USE_SW_BP: u32 = 65536;
229 pub const KVM_GUESTDBG_USE_HW_BP: u32 = 131072;
230 pub const KVM_GUESTDBG_INJECT_DB: u32 = 262144;
231 pub const KVM_GUESTDBG_INJECT_BP: u32 = 524288;
232 pub const KVM_PIT_FLAGS_HPET_LEGACY: u32 = 1;
233 pub const KVM_VCPUEVENT_VALID_NMI_PENDING: u32 = 1;
234 pub const KVM_VCPUEVENT_VALID_SIPI_VECTOR: u32 = 2;
235 pub const KVM_VCPUEVENT_VALID_SHADOW: u32 = 4;
236 pub const KVM_VCPUEVENT_VALID_SMM: u32 = 8;
237 pub const KVM_VCPUEVENT_VALID_PAYLOAD: u32 = 16;
238 pub const KVM_X86_SHADOW_INT_MOV_SS: u32 = 1;
239 pub const KVM_X86_SHADOW_INT_STI: u32 = 2;
240 pub const KVM_MAX_XCRS: u32 = 16;
241 pub const KVM_SYNC_X86_REGS: u32 = 1;
242 pub const KVM_SYNC_X86_SREGS: u32 = 2;
243 pub const KVM_SYNC_X86_EVENTS: u32 = 4;
244 pub const KVM_SYNC_X86_VALID_FIELDS: u32 = 7;
245 pub const KVM_X86_QUIRK_LINT0_REENABLED: u32 = 1;
246 pub const KVM_X86_QUIRK_CD_NW_CLEARED: u32 = 2;
247 pub const KVM_X86_QUIRK_LAPIC_MMIO_HOLE: u32 = 4;
248 pub const KVM_X86_QUIRK_OUT_7E_INC_RIP: u32 = 8;
249 pub const KVM_X86_QUIRK_MISC_ENABLE_NO_MWAIT: u32 = 16;
250 pub const KVM_STATE_NESTED_FORMAT_VMX: u32 = 0;
251 pub const KVM_STATE_NESTED_FORMAT_SVM: u32 = 1;
252 pub const KVM_STATE_NESTED_GUEST_MODE: u32 = 1;
253 pub const KVM_STATE_NESTED_RUN_PENDING: u32 = 2;
254 pub const KVM_STATE_NESTED_EVMCS: u32 = 4;
255 pub const KVM_STATE_NESTED_SMM_GUEST_MODE: u32 = 1;
256 pub const KVM_STATE_NESTED_SMM_VMXON: u32 = 2;
257 pub const KVM_STATE_NESTED_VMX_VMCS_SIZE: u32 = 4096;
258 pub const KVM_PMU_EVENT_ALLOW: u32 = 0;
259 pub const KVM_PMU_EVENT_DENY: u32 = 1;
260 pub const KVM_API_VERSION: u32 = 12;
261 pub const KVM_TRC_SHIFT: u32 = 16;
262 pub const KVM_TRC_ENTRYEXIT: u32 = 65536;
263 pub const KVM_TRC_HANDLER: u32 = 131072;
264 pub const KVM_TRC_VMENTRY: u32 = 65537;
265 pub const KVM_TRC_VMEXIT: u32 = 65538;
266 pub const KVM_TRC_PAGE_FAULT: u32 = 131073;
267 pub const KVM_TRC_HEAD_SIZE: u32 = 12;
268 pub const KVM_TRC_CYCLE_SIZE: u32 = 8;
269 pub const KVM_TRC_EXTRA_MAX: u32 = 7;
270 pub const KVM_TRC_INJ_VIRQ: u32 = 131074;
271 pub const KVM_TRC_REDELIVER_EVT: u32 = 131075;
272 pub const KVM_TRC_PEND_INTR: u32 = 131076;
273 pub const KVM_TRC_IO_READ: u32 = 131077;
274 pub const KVM_TRC_IO_WRITE: u32 = 131078;
275 pub const KVM_TRC_CR_READ: u32 = 131079;
276 pub const KVM_TRC_CR_WRITE: u32 = 131080;
277 pub const KVM_TRC_DR_READ: u32 = 131081;
278 pub const KVM_TRC_DR_WRITE: u32 = 131082;
279 pub const KVM_TRC_MSR_READ: u32 = 131083;
280 pub const KVM_TRC_MSR_WRITE: u32 = 131084;
281 pub const KVM_TRC_CPUID: u32 = 131085;
282 pub const KVM_TRC_INTR: u32 = 131086;
283 pub const KVM_TRC_NMI: u32 = 131087;
284 pub const KVM_TRC_VMMCALL: u32 = 131088;
285 pub const KVM_TRC_HLT: u32 = 131089;
286 pub const KVM_TRC_CLTS: u32 = 131090;
287 pub const KVM_TRC_LMSW: u32 = 131091;
288 pub const KVM_TRC_APIC_ACCESS: u32 = 131092;
289 pub const KVM_TRC_TDP_FAULT: u32 = 131093;
290 pub const KVM_TRC_GTLB_WRITE: u32 = 131094;
291 pub const KVM_TRC_STLB_WRITE: u32 = 131095;
292 pub const KVM_TRC_STLB_INVAL: u32 = 131096;
293 pub const KVM_TRC_PPC_INSTR: u32 = 131097;
294 pub const KVM_MEM_LOG_DIRTY_PAGES: u32 = 1;
295 pub const KVM_MEM_READONLY: u32 = 2;
296 pub const KVM_PIT_SPEAKER_DUMMY: u32 = 1;
297 pub const KVM_S390_CMMA_PEEK: u32 = 1;
298 pub const KVM_EXIT_HYPERV_SYNIC: u32 = 1;
299 pub const KVM_EXIT_HYPERV_HCALL: u32 = 2;
300 pub const KVM_S390_GET_SKEYS_NONE: u32 = 1;
301 pub const KVM_S390_SKEYS_MAX: u32 = 1048576;
302 pub const KVM_EXIT_UNKNOWN: u32 = 0;
303 pub const KVM_EXIT_EXCEPTION: u32 = 1;
304 pub const KVM_EXIT_IO: u32 = 2;
305 pub const KVM_EXIT_HYPERCALL: u32 = 3;
306 pub const KVM_EXIT_DEBUG: u32 = 4;
307 pub const KVM_EXIT_HLT: u32 = 5;
308 pub const KVM_EXIT_MMIO: u32 = 6;
309 pub const KVM_EXIT_IRQ_WINDOW_OPEN: u32 = 7;
310 pub const KVM_EXIT_SHUTDOWN: u32 = 8;
311 pub const KVM_EXIT_FAIL_ENTRY: u32 = 9;
312 pub const KVM_EXIT_INTR: u32 = 10;
313 pub const KVM_EXIT_SET_TPR: u32 = 11;
314 pub const KVM_EXIT_TPR_ACCESS: u32 = 12;
315 pub const KVM_EXIT_S390_SIEIC: u32 = 13;
316 pub const KVM_EXIT_S390_RESET: u32 = 14;
317 pub const KVM_EXIT_DCR: u32 = 15;
318 pub const KVM_EXIT_NMI: u32 = 16;
319 pub const KVM_EXIT_INTERNAL_ERROR: u32 = 17;
320 pub const KVM_EXIT_OSI: u32 = 18;
321 pub const KVM_EXIT_PAPR_HCALL: u32 = 19;
322 pub const KVM_EXIT_S390_UCONTROL: u32 = 20;
323 pub const KVM_EXIT_WATCHDOG: u32 = 21;
324 pub const KVM_EXIT_S390_TSCH: u32 = 22;
325 pub const KVM_EXIT_EPR: u32 = 23;
326 pub const KVM_EXIT_SYSTEM_EVENT: u32 = 24;
327 pub const KVM_EXIT_S390_STSI: u32 = 25;
328 pub const KVM_EXIT_IOAPIC_EOI: u32 = 26;
329 pub const KVM_EXIT_HYPERV: u32 = 27;
330 pub const KVM_INTERNAL_ERROR_EMULATION: u32 = 1;
331 pub const KVM_INTERNAL_ERROR_SIMUL_EX: u32 = 2;
332 pub const KVM_INTERNAL_ERROR_DELIVERY_EV: u32 = 3;
333 pub const KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON: u32 = 4;
334 pub const KVM_EXIT_IO_IN: u32 = 0;
335 pub const KVM_EXIT_IO_OUT: u32 = 1;
336 pub const KVM_S390_RESET_POR: u32 = 1;
337 pub const KVM_S390_RESET_CLEAR: u32 = 2;
338 pub const KVM_S390_RESET_SUBSYSTEM: u32 = 4;
339 pub const KVM_S390_RESET_CPU_INIT: u32 = 8;
340 pub const KVM_S390_RESET_IPL: u32 = 16;
341 pub const KVM_SYSTEM_EVENT_SHUTDOWN: u32 = 1;
342 pub const KVM_SYSTEM_EVENT_RESET: u32 = 2;
343 pub const KVM_SYSTEM_EVENT_CRASH: u32 = 3;
344 pub const SYNC_REGS_SIZE_BYTES: u32 = 2048;
345 pub const KVM_S390_MEMOP_LOGICAL_READ: u32 = 0;
346 pub const KVM_S390_MEMOP_LOGICAL_WRITE: u32 = 1;
347 pub const KVM_S390_MEMOP_F_CHECK_ONLY: u32 = 1;
348 pub const KVM_S390_MEMOP_F_INJECT_EXCEPTION: u32 = 2;
349 pub const KVM_MP_STATE_RUNNABLE: u32 = 0;
350 pub const KVM_MP_STATE_UNINITIALIZED: u32 = 1;
351 pub const KVM_MP_STATE_INIT_RECEIVED: u32 = 2;
352 pub const KVM_MP_STATE_HALTED: u32 = 3;
353 pub const KVM_MP_STATE_SIPI_RECEIVED: u32 = 4;
354 pub const KVM_MP_STATE_STOPPED: u32 = 5;
355 pub const KVM_MP_STATE_CHECK_STOP: u32 = 6;
356 pub const KVM_MP_STATE_OPERATING: u32 = 7;
357 pub const KVM_MP_STATE_LOAD: u32 = 8;
358 pub const KVM_S390_SIGP_STOP: u32 = 4294836224;
359 pub const KVM_S390_PROGRAM_INT: u32 = 4294836225;
360 pub const KVM_S390_SIGP_SET_PREFIX: u32 = 4294836226;
361 pub const KVM_S390_RESTART: u32 = 4294836227;
362 pub const KVM_S390_INT_PFAULT_INIT: u32 = 4294836228;
363 pub const KVM_S390_INT_PFAULT_DONE: u32 = 4294836229;
364 pub const KVM_S390_MCHK: u32 = 4294840320;
365 pub const KVM_S390_INT_CLOCK_COMP: u32 = 4294905860;
366 pub const KVM_S390_INT_CPU_TIMER: u32 = 4294905861;
367 pub const KVM_S390_INT_VIRTIO: u32 = 4294911491;
368 pub const KVM_S390_INT_SERVICE: u32 = 4294910977;
369 pub const KVM_S390_INT_EMERGENCY: u32 = 4294906369;
370 pub const KVM_S390_INT_EXTERNAL_CALL: u32 = 4294906370;
371 pub const KVM_S390_INT_IO_MIN: u32 = 0;
372 pub const KVM_S390_INT_IO_MAX: u32 = 4294836223;
373 pub const KVM_S390_INT_IO_AI_MASK: u32 = 67108864;
374 pub const KVM_S390_PGM_FLAGS_ILC_VALID: u32 = 1;
375 pub const KVM_S390_PGM_FLAGS_ILC_0: u32 = 2;
376 pub const KVM_S390_PGM_FLAGS_ILC_1: u32 = 4;
377 pub const KVM_S390_PGM_FLAGS_ILC_MASK: u32 = 6;
378 pub const KVM_S390_PGM_FLAGS_NO_REWIND: u32 = 8;
379 pub const KVM_S390_STOP_FLAG_STORE_STATUS: u32 = 1;
380 pub const KVM_GUESTDBG_ENABLE: u32 = 1;
381 pub const KVM_GUESTDBG_SINGLESTEP: u32 = 2;
382 pub const KVM_X86_DISABLE_EXITS_MWAIT: u32 = 1;
383 pub const KVM_X86_DISABLE_EXITS_HLT: u32 = 2;
384 pub const KVM_X86_DISABLE_EXITS_PAUSE: u32 = 4;
385 pub const KVM_X86_DISABLE_EXITS_CSTATE: u32 = 8;
386 pub const KVM_X86_DISABLE_VALID_EXITS: u32 = 15;
387 pub const KVM_PPC_PVINFO_FLAGS_EV_IDLE: u32 = 1;
388 pub const KVM_PPC_PAGE_SIZES_MAX_SZ: u32 = 8;
389 pub const KVM_PPC_PAGE_SIZES_REAL: u32 = 1;
390 pub const KVM_PPC_1T_SEGMENTS: u32 = 2;
391 pub const KVM_PPC_NO_HASH: u32 = 4;
392 pub const KVMIO: u32 = 174;
393 pub const KVM_VM_S390_UCONTROL: u32 = 1;
394 pub const KVM_VM_PPC_HV: u32 = 1;
395 pub const KVM_VM_PPC_PR: u32 = 2;
396 pub const KVM_VM_MIPS_AUTO: u32 = 0;
397 pub const KVM_VM_MIPS_VZ: u32 = 1;
398 pub const KVM_VM_MIPS_TE: u32 = 2;
399 pub const KVM_S390_SIE_PAGE_OFFSET: u32 = 1;
400 pub const KVM_VM_TYPE_ARM_IPA_SIZE_MASK: u32 = 255;
401 pub const KVM_CAP_IRQCHIP: u32 = 0;
402 pub const KVM_CAP_HLT: u32 = 1;
403 pub const KVM_CAP_MMU_SHADOW_CACHE_CONTROL: u32 = 2;
404 pub const KVM_CAP_USER_MEMORY: u32 = 3;
405 pub const KVM_CAP_SET_TSS_ADDR: u32 = 4;
406 pub const KVM_CAP_VAPIC: u32 = 6;
407 pub const KVM_CAP_EXT_CPUID: u32 = 7;
408 pub const KVM_CAP_CLOCKSOURCE: u32 = 8;
409 pub const KVM_CAP_NR_VCPUS: u32 = 9;
410 pub const KVM_CAP_NR_MEMSLOTS: u32 = 10;
411 pub const KVM_CAP_PIT: u32 = 11;
412 pub const KVM_CAP_NOP_IO_DELAY: u32 = 12;
413 pub const KVM_CAP_PV_MMU: u32 = 13;
414 pub const KVM_CAP_MP_STATE: u32 = 14;
415 pub const KVM_CAP_COALESCED_MMIO: u32 = 15;
416 pub const KVM_CAP_SYNC_MMU: u32 = 16;
417 pub const KVM_CAP_IOMMU: u32 = 18;
418 pub const KVM_CAP_DESTROY_MEMORY_REGION_WORKS: u32 = 21;
419 pub const KVM_CAP_USER_NMI: u32 = 22;
420 pub const KVM_CAP_SET_GUEST_DEBUG: u32 = 23;
421 pub const KVM_CAP_REINJECT_CONTROL: u32 = 24;
422 pub const KVM_CAP_IRQ_ROUTING: u32 = 25;
423 pub const KVM_CAP_IRQ_INJECT_STATUS: u32 = 26;
424 pub const KVM_CAP_ASSIGN_DEV_IRQ: u32 = 29;
425 pub const KVM_CAP_JOIN_MEMORY_REGIONS_WORKS: u32 = 30;
426 pub const KVM_CAP_MCE: u32 = 31;
427 pub const KVM_CAP_IRQFD: u32 = 32;
428 pub const KVM_CAP_PIT2: u32 = 33;
429 pub const KVM_CAP_SET_BOOT_CPU_ID: u32 = 34;
430 pub const KVM_CAP_PIT_STATE2: u32 = 35;
431 pub const KVM_CAP_IOEVENTFD: u32 = 36;
432 pub const KVM_CAP_SET_IDENTITY_MAP_ADDR: u32 = 37;
433 pub const KVM_CAP_XEN_HVM: u32 = 38;
434 pub const KVM_CAP_ADJUST_CLOCK: u32 = 39;
435 pub const KVM_CAP_INTERNAL_ERROR_DATA: u32 = 40;
436 pub const KVM_CAP_VCPU_EVENTS: u32 = 41;
437 pub const KVM_CAP_S390_PSW: u32 = 42;
438 pub const KVM_CAP_PPC_SEGSTATE: u32 = 43;
439 pub const KVM_CAP_HYPERV: u32 = 44;
440 pub const KVM_CAP_HYPERV_VAPIC: u32 = 45;
441 pub const KVM_CAP_HYPERV_SPIN: u32 = 46;
442 pub const KVM_CAP_PCI_SEGMENT: u32 = 47;
443 pub const KVM_CAP_PPC_PAIRED_SINGLES: u32 = 48;
444 pub const KVM_CAP_INTR_SHADOW: u32 = 49;
445 pub const KVM_CAP_DEBUGREGS: u32 = 50;
446 pub const KVM_CAP_X86_ROBUST_SINGLESTEP: u32 = 51;
447 pub const KVM_CAP_PPC_OSI: u32 = 52;
448 pub const KVM_CAP_PPC_UNSET_IRQ: u32 = 53;
449 pub const KVM_CAP_ENABLE_CAP: u32 = 54;
450 pub const KVM_CAP_XSAVE: u32 = 55;
451 pub const KVM_CAP_XCRS: u32 = 56;
452 pub const KVM_CAP_PPC_GET_PVINFO: u32 = 57;
453 pub const KVM_CAP_PPC_IRQ_LEVEL: u32 = 58;
454 pub const KVM_CAP_ASYNC_PF: u32 = 59;
455 pub const KVM_CAP_TSC_CONTROL: u32 = 60;
456 pub const KVM_CAP_GET_TSC_KHZ: u32 = 61;
457 pub const KVM_CAP_PPC_BOOKE_SREGS: u32 = 62;
458 pub const KVM_CAP_SPAPR_TCE: u32 = 63;
459 pub const KVM_CAP_PPC_SMT: u32 = 64;
460 pub const KVM_CAP_PPC_RMA: u32 = 65;
461 pub const KVM_CAP_MAX_VCPUS: u32 = 66;
462 pub const KVM_CAP_PPC_HIOR: u32 = 67;
463 pub const KVM_CAP_PPC_PAPR: u32 = 68;
464 pub const KVM_CAP_SW_TLB: u32 = 69;
465 pub const KVM_CAP_ONE_REG: u32 = 70;
466 pub const KVM_CAP_S390_GMAP: u32 = 71;
467 pub const KVM_CAP_TSC_DEADLINE_TIMER: u32 = 72;
468 pub const KVM_CAP_S390_UCONTROL: u32 = 73;
469 pub const KVM_CAP_SYNC_REGS: u32 = 74;
470 pub const KVM_CAP_PCI_2_3: u32 = 75;
471 pub const KVM_CAP_KVMCLOCK_CTRL: u32 = 76;
472 pub const KVM_CAP_SIGNAL_MSI: u32 = 77;
473 pub const KVM_CAP_PPC_GET_SMMU_INFO: u32 = 78;
474 pub const KVM_CAP_S390_COW: u32 = 79;
475 pub const KVM_CAP_PPC_ALLOC_HTAB: u32 = 80;
476 pub const KVM_CAP_READONLY_MEM: u32 = 81;
477 pub const KVM_CAP_IRQFD_RESAMPLE: u32 = 82;
478 pub const KVM_CAP_PPC_BOOKE_WATCHDOG: u32 = 83;
479 pub const KVM_CAP_PPC_HTAB_FD: u32 = 84;
480 pub const KVM_CAP_S390_CSS_SUPPORT: u32 = 85;
481 pub const KVM_CAP_PPC_EPR: u32 = 86;
482 pub const KVM_CAP_ARM_PSCI: u32 = 87;
483 pub const KVM_CAP_ARM_SET_DEVICE_ADDR: u32 = 88;
484 pub const KVM_CAP_DEVICE_CTRL: u32 = 89;
485 pub const KVM_CAP_IRQ_MPIC: u32 = 90;
486 pub const KVM_CAP_PPC_RTAS: u32 = 91;
487 pub const KVM_CAP_IRQ_XICS: u32 = 92;
488 pub const KVM_CAP_ARM_EL1_32BIT: u32 = 93;
489 pub const KVM_CAP_SPAPR_MULTITCE: u32 = 94;
490 pub const KVM_CAP_EXT_EMUL_CPUID: u32 = 95;
491 pub const KVM_CAP_HYPERV_TIME: u32 = 96;
492 pub const KVM_CAP_IOAPIC_POLARITY_IGNORED: u32 = 97;
493 pub const KVM_CAP_ENABLE_CAP_VM: u32 = 98;
494 pub const KVM_CAP_S390_IRQCHIP: u32 = 99;
495 pub const KVM_CAP_IOEVENTFD_NO_LENGTH: u32 = 100;
496 pub const KVM_CAP_VM_ATTRIBUTES: u32 = 101;
497 pub const KVM_CAP_ARM_PSCI_0_2: u32 = 102;
498 pub const KVM_CAP_PPC_FIXUP_HCALL: u32 = 103;
499 pub const KVM_CAP_PPC_ENABLE_HCALL: u32 = 104;
500 pub const KVM_CAP_CHECK_EXTENSION_VM: u32 = 105;
501 pub const KVM_CAP_S390_USER_SIGP: u32 = 106;
502 pub const KVM_CAP_S390_VECTOR_REGISTERS: u32 = 107;
503 pub const KVM_CAP_S390_MEM_OP: u32 = 108;
504 pub const KVM_CAP_S390_USER_STSI: u32 = 109;
505 pub const KVM_CAP_S390_SKEYS: u32 = 110;
506 pub const KVM_CAP_MIPS_FPU: u32 = 111;
507 pub const KVM_CAP_MIPS_MSA: u32 = 112;
508 pub const KVM_CAP_S390_INJECT_IRQ: u32 = 113;
509 pub const KVM_CAP_S390_IRQ_STATE: u32 = 114;
510 pub const KVM_CAP_PPC_HWRNG: u32 = 115;
511 pub const KVM_CAP_DISABLE_QUIRKS: u32 = 116;
512 pub const KVM_CAP_X86_SMM: u32 = 117;
513 pub const KVM_CAP_MULTI_ADDRESS_SPACE: u32 = 118;
514 pub const KVM_CAP_GUEST_DEBUG_HW_BPS: u32 = 119;
515 pub const KVM_CAP_GUEST_DEBUG_HW_WPS: u32 = 120;
516 pub const KVM_CAP_SPLIT_IRQCHIP: u32 = 121;
517 pub const KVM_CAP_IOEVENTFD_ANY_LENGTH: u32 = 122;
518 pub const KVM_CAP_HYPERV_SYNIC: u32 = 123;
519 pub const KVM_CAP_S390_RI: u32 = 124;
520 pub const KVM_CAP_SPAPR_TCE_64: u32 = 125;
521 pub const KVM_CAP_ARM_PMU_V3: u32 = 126;
522 pub const KVM_CAP_VCPU_ATTRIBUTES: u32 = 127;
523 pub const KVM_CAP_MAX_VCPU_ID: u32 = 128;
524 pub const KVM_CAP_X2APIC_API: u32 = 129;
525 pub const KVM_CAP_S390_USER_INSTR0: u32 = 130;
526 pub const KVM_CAP_MSI_DEVID: u32 = 131;
527 pub const KVM_CAP_PPC_HTM: u32 = 132;
528 pub const KVM_CAP_SPAPR_RESIZE_HPT: u32 = 133;
529 pub const KVM_CAP_PPC_MMU_RADIX: u32 = 134;
530 pub const KVM_CAP_PPC_MMU_HASH_V3: u32 = 135;
531 pub const KVM_CAP_IMMEDIATE_EXIT: u32 = 136;
532 pub const KVM_CAP_MIPS_VZ: u32 = 137;
533 pub const KVM_CAP_MIPS_TE: u32 = 138;
534 pub const KVM_CAP_MIPS_64BIT: u32 = 139;
535 pub const KVM_CAP_S390_GS: u32 = 140;
536 pub const KVM_CAP_S390_AIS: u32 = 141;
537 pub const KVM_CAP_SPAPR_TCE_VFIO: u32 = 142;
538 pub const KVM_CAP_X86_DISABLE_EXITS: u32 = 143;
539 pub const KVM_CAP_ARM_USER_IRQ: u32 = 144;
540 pub const KVM_CAP_S390_CMMA_MIGRATION: u32 = 145;
541 pub const KVM_CAP_PPC_FWNMI: u32 = 146;
542 pub const KVM_CAP_PPC_SMT_POSSIBLE: u32 = 147;
543 pub const KVM_CAP_HYPERV_SYNIC2: u32 = 148;
544 pub const KVM_CAP_HYPERV_VP_INDEX: u32 = 149;
545 pub const KVM_CAP_S390_AIS_MIGRATION: u32 = 150;
546 pub const KVM_CAP_PPC_GET_CPU_CHAR: u32 = 151;
547 pub const KVM_CAP_S390_BPB: u32 = 152;
548 pub const KVM_CAP_GET_MSR_FEATURES: u32 = 153;
549 pub const KVM_CAP_HYPERV_EVENTFD: u32 = 154;
550 pub const KVM_CAP_HYPERV_TLBFLUSH: u32 = 155;
551 pub const KVM_CAP_S390_HPAGE_1M: u32 = 156;
552 pub const KVM_CAP_NESTED_STATE: u32 = 157;
553 pub const KVM_CAP_ARM_INJECT_SERROR_ESR: u32 = 158;
554 pub const KVM_CAP_MSR_PLATFORM_INFO: u32 = 159;
555 pub const KVM_CAP_PPC_NESTED_HV: u32 = 160;
556 pub const KVM_CAP_HYPERV_SEND_IPI: u32 = 161;
557 pub const KVM_CAP_COALESCED_PIO: u32 = 162;
558 pub const KVM_CAP_HYPERV_ENLIGHTENED_VMCS: u32 = 163;
559 pub const KVM_CAP_EXCEPTION_PAYLOAD: u32 = 164;
560 pub const KVM_CAP_ARM_VM_IPA_SIZE: u32 = 165;
561 pub const KVM_CAP_MANUAL_DIRTY_LOG_PROTECT: u32 = 166;
562 pub const KVM_CAP_HYPERV_CPUID: u32 = 167;
563 pub const KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2: u32 = 168;
564 pub const KVM_CAP_PPC_IRQ_XIVE: u32 = 169;
565 pub const KVM_CAP_ARM_SVE: u32 = 170;
566 pub const KVM_CAP_ARM_PTRAUTH_ADDRESS: u32 = 171;
567 pub const KVM_CAP_ARM_PTRAUTH_GENERIC: u32 = 172;
568 pub const KVM_CAP_PMU_EVENT_FILTER: u32 = 173;
569 pub const KVM_CAP_ARM_IRQ_LINE_LAYOUT_2: u32 = 174;
570 pub const KVM_CAP_HYPERV_DIRECT_TLBFLUSH: u32 = 175;
571 // TODO(qwandor): Update this once the pKVM patches are merged upstream with a stable capability ID.
572 pub const KVM_CAP_ARM_PROTECTED_VM: u32 = 0xffbadab1;
573 pub const KVM_CAP_ARM_PROTECTED_VM_FLAGS_ENABLE: u32 = 0;
574 pub const KVM_CAP_ARM_PROTECTED_VM_FLAGS_INFO: u32 = 1;
575 pub const KVM_IRQ_ROUTING_IRQCHIP: u32 = 1;
576 pub const KVM_IRQ_ROUTING_MSI: u32 = 2;
577 pub const KVM_IRQ_ROUTING_S390_ADAPTER: u32 = 3;
578 pub const KVM_IRQ_ROUTING_HV_SINT: u32 = 4;
579 pub const KVM_IRQFD_FLAG_DEASSIGN: u32 = 1;
580 pub const KVM_IRQFD_FLAG_RESAMPLE: u32 = 2;
581 pub const KVM_CLOCK_TSC_STABLE: u32 = 2;
582 pub const KVM_MMU_FSL_BOOKE_NOHV: u32 = 0;
583 pub const KVM_MMU_FSL_BOOKE_HV: u32 = 1;
584 pub const KVM_REG_ARCH_MASK: i64 = -72057594037927936;
585 pub const KVM_REG_GENERIC: u32 = 0;
586 pub const KVM_REG_PPC: u64 = 1152921504606846976;
587 pub const KVM_REG_X86: u64 = 2305843009213693952;
588 pub const KVM_REG_IA64: u64 = 3458764513820540928;
589 pub const KVM_REG_ARM: u64 = 4611686018427387904;
590 pub const KVM_REG_S390: u64 = 5764607523034234880;
591 pub const KVM_REG_ARM64: u64 = 6917529027641081856;
592 pub const KVM_REG_MIPS: u64 = 8070450532247928832;
593 pub const KVM_REG_RISCV: i64 = -9223372036854775808;
594 pub const KVM_REG_SIZE_SHIFT: u32 = 52;
595 pub const KVM_REG_SIZE_MASK: u64 = 67553994410557440;
596 pub const KVM_REG_SIZE_U8: u32 = 0;
597 pub const KVM_REG_SIZE_U16: u64 = 4503599627370496;
598 pub const KVM_REG_SIZE_U32: u64 = 9007199254740992;
599 pub const KVM_REG_SIZE_U64: u64 = 13510798882111488;
600 pub const KVM_REG_SIZE_U128: u64 = 18014398509481984;
601 pub const KVM_REG_SIZE_U256: u64 = 22517998136852480;
602 pub const KVM_REG_SIZE_U512: u64 = 27021597764222976;
603 pub const KVM_REG_SIZE_U1024: u64 = 31525197391593472;
604 pub const KVM_REG_SIZE_U2048: u64 = 36028797018963968;
605 pub const KVM_MSI_VALID_DEVID: u32 = 1;
606 pub const KVM_CREATE_DEVICE_TEST: u32 = 1;
607 pub const KVM_DEV_VFIO_GROUP: u32 = 1;
608 pub const KVM_DEV_VFIO_GROUP_ADD: u32 = 1;
609 pub const KVM_DEV_VFIO_GROUP_DEL: u32 = 2;
610 pub const KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: u32 = 3;
611 pub const KVM_S390_STORE_STATUS_NOADDR: i32 = -1;
612 pub const KVM_S390_STORE_STATUS_PREFIXED: i32 = -2;
613 pub const KVM_DEV_ASSIGN_ENABLE_IOMMU: u32 = 1;
614 pub const KVM_DEV_ASSIGN_PCI_2_3: u32 = 2;
615 pub const KVM_DEV_ASSIGN_MASK_INTX: u32 = 4;
616 pub const KVM_DEV_IRQ_HOST_INTX: u32 = 1;
617 pub const KVM_DEV_IRQ_HOST_MSI: u32 = 2;
618 pub const KVM_DEV_IRQ_HOST_MSIX: u32 = 4;
619 pub const KVM_DEV_IRQ_GUEST_INTX: u32 = 256;
620 pub const KVM_DEV_IRQ_GUEST_MSI: u32 = 512;
621 pub const KVM_DEV_IRQ_GUEST_MSIX: u32 = 1024;
622 pub const KVM_DEV_IRQ_HOST_MASK: u32 = 255;
623 pub const KVM_DEV_IRQ_GUEST_MASK: u32 = 65280;
624 pub const KVM_MAX_MSIX_PER_DEV: u32 = 256;
625 pub const KVM_X2APIC_API_USE_32BIT_IDS: u32 = 1;
626 pub const KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK: u32 = 2;
627 pub const KVM_ARM_DEV_EL1_VTIMER: u32 = 1;
628 pub const KVM_ARM_DEV_EL1_PTIMER: u32 = 2;
629 pub const KVM_ARM_DEV_PMU: u32 = 4;
630 pub const KVM_HYPERV_CONN_ID_MASK: u32 = 16777215;
631 pub const KVM_HYPERV_EVENTFD_DEASSIGN: u32 = 1;
632 pub type __s8 = ::std::os::raw::c_schar;
633 pub type __u8 = ::std::os::raw::c_uchar;
634 pub type __s16 = ::std::os::raw::c_short;
635 pub type __u16 = ::std::os::raw::c_ushort;
636 pub type __s32 = ::std::os::raw::c_int;
637 pub type __u32 = ::std::os::raw::c_uint;
638 pub type __s64 = ::std::os::raw::c_longlong;
639 pub type __u64 = ::std::os::raw::c_ulonglong;
640 #[repr(C)]
641 #[derive(Debug, Default, Copy, Clone)]
642 pub struct __kernel_fd_set {
643 pub fds_bits: [::std::os::raw::c_ulong; 16usize],
644 }
645 #[test]
bindgen_test_layout___kernel_fd_set()646 fn bindgen_test_layout___kernel_fd_set() {
647 assert_eq!(
648 ::std::mem::size_of::<__kernel_fd_set>(),
649 128usize,
650 concat!("Size of: ", stringify!(__kernel_fd_set))
651 );
652 assert_eq!(
653 ::std::mem::align_of::<__kernel_fd_set>(),
654 8usize,
655 concat!("Alignment of ", stringify!(__kernel_fd_set))
656 );
657 assert_eq!(
658 unsafe { &(*(::std::ptr::null::<__kernel_fd_set>())).fds_bits as *const _ as usize },
659 0usize,
660 concat!(
661 "Offset of field: ",
662 stringify!(__kernel_fd_set),
663 "::",
664 stringify!(fds_bits)
665 )
666 );
667 }
668 pub type __kernel_sighandler_t =
669 ::std::option::Option<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
670 pub type __kernel_key_t = ::std::os::raw::c_int;
671 pub type __kernel_mqd_t = ::std::os::raw::c_int;
672 pub type __kernel_old_uid_t = ::std::os::raw::c_ushort;
673 pub type __kernel_old_gid_t = ::std::os::raw::c_ushort;
674 pub type __kernel_old_dev_t = ::std::os::raw::c_ulong;
675 pub type __kernel_long_t = ::std::os::raw::c_long;
676 pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
677 pub type __kernel_ino_t = __kernel_ulong_t;
678 pub type __kernel_mode_t = ::std::os::raw::c_uint;
679 pub type __kernel_pid_t = ::std::os::raw::c_int;
680 pub type __kernel_ipc_pid_t = ::std::os::raw::c_int;
681 pub type __kernel_uid_t = ::std::os::raw::c_uint;
682 pub type __kernel_gid_t = ::std::os::raw::c_uint;
683 pub type __kernel_suseconds_t = __kernel_long_t;
684 pub type __kernel_daddr_t = ::std::os::raw::c_int;
685 pub type __kernel_uid32_t = ::std::os::raw::c_uint;
686 pub type __kernel_gid32_t = ::std::os::raw::c_uint;
687 pub type __kernel_size_t = __kernel_ulong_t;
688 pub type __kernel_ssize_t = __kernel_long_t;
689 pub type __kernel_ptrdiff_t = __kernel_long_t;
690 #[repr(C)]
691 #[derive(Debug, Default, Copy, Clone)]
692 pub struct __kernel_fsid_t {
693 pub val: [::std::os::raw::c_int; 2usize],
694 }
695 #[test]
bindgen_test_layout___kernel_fsid_t()696 fn bindgen_test_layout___kernel_fsid_t() {
697 assert_eq!(
698 ::std::mem::size_of::<__kernel_fsid_t>(),
699 8usize,
700 concat!("Size of: ", stringify!(__kernel_fsid_t))
701 );
702 assert_eq!(
703 ::std::mem::align_of::<__kernel_fsid_t>(),
704 4usize,
705 concat!("Alignment of ", stringify!(__kernel_fsid_t))
706 );
707 assert_eq!(
708 unsafe { &(*(::std::ptr::null::<__kernel_fsid_t>())).val as *const _ as usize },
709 0usize,
710 concat!(
711 "Offset of field: ",
712 stringify!(__kernel_fsid_t),
713 "::",
714 stringify!(val)
715 )
716 );
717 }
718 pub type __kernel_off_t = __kernel_long_t;
719 pub type __kernel_loff_t = ::std::os::raw::c_longlong;
720 pub type __kernel_time_t = __kernel_long_t;
721 pub type __kernel_time64_t = ::std::os::raw::c_longlong;
722 pub type __kernel_clock_t = __kernel_long_t;
723 pub type __kernel_timer_t = ::std::os::raw::c_int;
724 pub type __kernel_clockid_t = ::std::os::raw::c_int;
725 pub type __kernel_caddr_t = *mut ::std::os::raw::c_char;
726 pub type __kernel_uid16_t = ::std::os::raw::c_ushort;
727 pub type __kernel_gid16_t = ::std::os::raw::c_ushort;
728 pub type __le16 = __u16;
729 pub type __be16 = __u16;
730 pub type __le32 = __u32;
731 pub type __be32 = __u32;
732 pub type __le64 = __u64;
733 pub type __be64 = __u64;
734 pub type __sum16 = __u16;
735 pub type __wsum = __u32;
736 pub type __poll_t = ::std::os::raw::c_uint;
737 #[repr(C)]
738 #[derive(Debug, Default, Copy, Clone)]
739 pub struct kvm_memory_alias {
740 pub slot: __u32,
741 pub flags: __u32,
742 pub guest_phys_addr: __u64,
743 pub memory_size: __u64,
744 pub target_phys_addr: __u64,
745 }
746 #[test]
bindgen_test_layout_kvm_memory_alias()747 fn bindgen_test_layout_kvm_memory_alias() {
748 assert_eq!(
749 ::std::mem::size_of::<kvm_memory_alias>(),
750 32usize,
751 concat!("Size of: ", stringify!(kvm_memory_alias))
752 );
753 assert_eq!(
754 ::std::mem::align_of::<kvm_memory_alias>(),
755 8usize,
756 concat!("Alignment of ", stringify!(kvm_memory_alias))
757 );
758 assert_eq!(
759 unsafe { &(*(::std::ptr::null::<kvm_memory_alias>())).slot as *const _ as usize },
760 0usize,
761 concat!(
762 "Offset of field: ",
763 stringify!(kvm_memory_alias),
764 "::",
765 stringify!(slot)
766 )
767 );
768 assert_eq!(
769 unsafe { &(*(::std::ptr::null::<kvm_memory_alias>())).flags as *const _ as usize },
770 4usize,
771 concat!(
772 "Offset of field: ",
773 stringify!(kvm_memory_alias),
774 "::",
775 stringify!(flags)
776 )
777 );
778 assert_eq!(
779 unsafe {
780 &(*(::std::ptr::null::<kvm_memory_alias>())).guest_phys_addr as *const _ as usize
781 },
782 8usize,
783 concat!(
784 "Offset of field: ",
785 stringify!(kvm_memory_alias),
786 "::",
787 stringify!(guest_phys_addr)
788 )
789 );
790 assert_eq!(
791 unsafe { &(*(::std::ptr::null::<kvm_memory_alias>())).memory_size as *const _ as usize },
792 16usize,
793 concat!(
794 "Offset of field: ",
795 stringify!(kvm_memory_alias),
796 "::",
797 stringify!(memory_size)
798 )
799 );
800 assert_eq!(
801 unsafe {
802 &(*(::std::ptr::null::<kvm_memory_alias>())).target_phys_addr as *const _ as usize
803 },
804 24usize,
805 concat!(
806 "Offset of field: ",
807 stringify!(kvm_memory_alias),
808 "::",
809 stringify!(target_phys_addr)
810 )
811 );
812 }
813 #[repr(C)]
814 #[derive(Debug, Default, Copy, Clone)]
815 pub struct kvm_pic_state {
816 pub last_irr: __u8,
817 pub irr: __u8,
818 pub imr: __u8,
819 pub isr: __u8,
820 pub priority_add: __u8,
821 pub irq_base: __u8,
822 pub read_reg_select: __u8,
823 pub poll: __u8,
824 pub special_mask: __u8,
825 pub init_state: __u8,
826 pub auto_eoi: __u8,
827 pub rotate_on_auto_eoi: __u8,
828 pub special_fully_nested_mode: __u8,
829 pub init4: __u8,
830 pub elcr: __u8,
831 pub elcr_mask: __u8,
832 }
833 #[test]
bindgen_test_layout_kvm_pic_state()834 fn bindgen_test_layout_kvm_pic_state() {
835 assert_eq!(
836 ::std::mem::size_of::<kvm_pic_state>(),
837 16usize,
838 concat!("Size of: ", stringify!(kvm_pic_state))
839 );
840 assert_eq!(
841 ::std::mem::align_of::<kvm_pic_state>(),
842 1usize,
843 concat!("Alignment of ", stringify!(kvm_pic_state))
844 );
845 assert_eq!(
846 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).last_irr as *const _ as usize },
847 0usize,
848 concat!(
849 "Offset of field: ",
850 stringify!(kvm_pic_state),
851 "::",
852 stringify!(last_irr)
853 )
854 );
855 assert_eq!(
856 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).irr as *const _ as usize },
857 1usize,
858 concat!(
859 "Offset of field: ",
860 stringify!(kvm_pic_state),
861 "::",
862 stringify!(irr)
863 )
864 );
865 assert_eq!(
866 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).imr as *const _ as usize },
867 2usize,
868 concat!(
869 "Offset of field: ",
870 stringify!(kvm_pic_state),
871 "::",
872 stringify!(imr)
873 )
874 );
875 assert_eq!(
876 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).isr as *const _ as usize },
877 3usize,
878 concat!(
879 "Offset of field: ",
880 stringify!(kvm_pic_state),
881 "::",
882 stringify!(isr)
883 )
884 );
885 assert_eq!(
886 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).priority_add as *const _ as usize },
887 4usize,
888 concat!(
889 "Offset of field: ",
890 stringify!(kvm_pic_state),
891 "::",
892 stringify!(priority_add)
893 )
894 );
895 assert_eq!(
896 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).irq_base as *const _ as usize },
897 5usize,
898 concat!(
899 "Offset of field: ",
900 stringify!(kvm_pic_state),
901 "::",
902 stringify!(irq_base)
903 )
904 );
905 assert_eq!(
906 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).read_reg_select as *const _ as usize },
907 6usize,
908 concat!(
909 "Offset of field: ",
910 stringify!(kvm_pic_state),
911 "::",
912 stringify!(read_reg_select)
913 )
914 );
915 assert_eq!(
916 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).poll as *const _ as usize },
917 7usize,
918 concat!(
919 "Offset of field: ",
920 stringify!(kvm_pic_state),
921 "::",
922 stringify!(poll)
923 )
924 );
925 assert_eq!(
926 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).special_mask as *const _ as usize },
927 8usize,
928 concat!(
929 "Offset of field: ",
930 stringify!(kvm_pic_state),
931 "::",
932 stringify!(special_mask)
933 )
934 );
935 assert_eq!(
936 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).init_state as *const _ as usize },
937 9usize,
938 concat!(
939 "Offset of field: ",
940 stringify!(kvm_pic_state),
941 "::",
942 stringify!(init_state)
943 )
944 );
945 assert_eq!(
946 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).auto_eoi as *const _ as usize },
947 10usize,
948 concat!(
949 "Offset of field: ",
950 stringify!(kvm_pic_state),
951 "::",
952 stringify!(auto_eoi)
953 )
954 );
955 assert_eq!(
956 unsafe {
957 &(*(::std::ptr::null::<kvm_pic_state>())).rotate_on_auto_eoi as *const _ as usize
958 },
959 11usize,
960 concat!(
961 "Offset of field: ",
962 stringify!(kvm_pic_state),
963 "::",
964 stringify!(rotate_on_auto_eoi)
965 )
966 );
967 assert_eq!(
968 unsafe {
969 &(*(::std::ptr::null::<kvm_pic_state>())).special_fully_nested_mode as *const _ as usize
970 },
971 12usize,
972 concat!(
973 "Offset of field: ",
974 stringify!(kvm_pic_state),
975 "::",
976 stringify!(special_fully_nested_mode)
977 )
978 );
979 assert_eq!(
980 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).init4 as *const _ as usize },
981 13usize,
982 concat!(
983 "Offset of field: ",
984 stringify!(kvm_pic_state),
985 "::",
986 stringify!(init4)
987 )
988 );
989 assert_eq!(
990 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).elcr as *const _ as usize },
991 14usize,
992 concat!(
993 "Offset of field: ",
994 stringify!(kvm_pic_state),
995 "::",
996 stringify!(elcr)
997 )
998 );
999 assert_eq!(
1000 unsafe { &(*(::std::ptr::null::<kvm_pic_state>())).elcr_mask as *const _ as usize },
1001 15usize,
1002 concat!(
1003 "Offset of field: ",
1004 stringify!(kvm_pic_state),
1005 "::",
1006 stringify!(elcr_mask)
1007 )
1008 );
1009 }
1010 #[repr(C)]
1011 #[derive(Copy, Clone)]
1012 pub struct kvm_ioapic_state {
1013 pub base_address: __u64,
1014 pub ioregsel: __u32,
1015 pub id: __u32,
1016 pub irr: __u32,
1017 pub pad: __u32,
1018 pub redirtbl: [kvm_ioapic_state__bindgen_ty_1; 24usize],
1019 }
1020 #[repr(C)]
1021 #[derive(Copy, Clone)]
1022 pub union kvm_ioapic_state__bindgen_ty_1 {
1023 pub bits: __u64,
1024 pub fields: kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1,
1025 _bindgen_union_align: u64,
1026 }
1027 #[repr(C)]
1028 #[derive(Debug, Default, Copy, Clone)]
1029 pub struct kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1 {
1030 pub vector: __u8,
1031 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize], u8>,
1032 pub reserved: [__u8; 4usize],
1033 pub dest_id: __u8,
1034 }
1035 #[test]
bindgen_test_layout_kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1()1036 fn bindgen_test_layout_kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1() {
1037 assert_eq!(
1038 ::std::mem::size_of::<kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1>(),
1039 8usize,
1040 concat!(
1041 "Size of: ",
1042 stringify!(kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1)
1043 )
1044 );
1045 assert_eq!(
1046 ::std::mem::align_of::<kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1>(),
1047 1usize,
1048 concat!(
1049 "Alignment of ",
1050 stringify!(kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1)
1051 )
1052 );
1053 assert_eq!(
1054 unsafe {
1055 &(*(::std::ptr::null::<kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1>())).vector
1056 as *const _ as usize
1057 },
1058 0usize,
1059 concat!(
1060 "Offset of field: ",
1061 stringify!(kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1),
1062 "::",
1063 stringify!(vector)
1064 )
1065 );
1066 assert_eq!(
1067 unsafe {
1068 &(*(::std::ptr::null::<kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1>())).reserved
1069 as *const _ as usize
1070 },
1071 3usize,
1072 concat!(
1073 "Offset of field: ",
1074 stringify!(kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1),
1075 "::",
1076 stringify!(reserved)
1077 )
1078 );
1079 assert_eq!(
1080 unsafe {
1081 &(*(::std::ptr::null::<kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1>())).dest_id
1082 as *const _ as usize
1083 },
1084 7usize,
1085 concat!(
1086 "Offset of field: ",
1087 stringify!(kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1),
1088 "::",
1089 stringify!(dest_id)
1090 )
1091 );
1092 }
1093 impl kvm_ioapic_state__bindgen_ty_1__bindgen_ty_1 {
1094 #[inline]
delivery_mode(&self) -> __u81095 pub fn delivery_mode(&self) -> __u8 {
1096 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
1097 }
1098 #[inline]
set_delivery_mode(&mut self, val: __u8)1099 pub fn set_delivery_mode(&mut self, val: __u8) {
1100 unsafe {
1101 let val: u8 = ::std::mem::transmute(val);
1102 self._bitfield_1.set(0usize, 3u8, val as u64)
1103 }
1104 }
1105 #[inline]
dest_mode(&self) -> __u81106 pub fn dest_mode(&self) -> __u8 {
1107 unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
1108 }
1109 #[inline]
set_dest_mode(&mut self, val: __u8)1110 pub fn set_dest_mode(&mut self, val: __u8) {
1111 unsafe {
1112 let val: u8 = ::std::mem::transmute(val);
1113 self._bitfield_1.set(3usize, 1u8, val as u64)
1114 }
1115 }
1116 #[inline]
delivery_status(&self) -> __u81117 pub fn delivery_status(&self) -> __u8 {
1118 unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
1119 }
1120 #[inline]
set_delivery_status(&mut self, val: __u8)1121 pub fn set_delivery_status(&mut self, val: __u8) {
1122 unsafe {
1123 let val: u8 = ::std::mem::transmute(val);
1124 self._bitfield_1.set(4usize, 1u8, val as u64)
1125 }
1126 }
1127 #[inline]
polarity(&self) -> __u81128 pub fn polarity(&self) -> __u8 {
1129 unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u8) }
1130 }
1131 #[inline]
set_polarity(&mut self, val: __u8)1132 pub fn set_polarity(&mut self, val: __u8) {
1133 unsafe {
1134 let val: u8 = ::std::mem::transmute(val);
1135 self._bitfield_1.set(5usize, 1u8, val as u64)
1136 }
1137 }
1138 #[inline]
remote_irr(&self) -> __u81139 pub fn remote_irr(&self) -> __u8 {
1140 unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u8) }
1141 }
1142 #[inline]
set_remote_irr(&mut self, val: __u8)1143 pub fn set_remote_irr(&mut self, val: __u8) {
1144 unsafe {
1145 let val: u8 = ::std::mem::transmute(val);
1146 self._bitfield_1.set(6usize, 1u8, val as u64)
1147 }
1148 }
1149 #[inline]
trig_mode(&self) -> __u81150 pub fn trig_mode(&self) -> __u8 {
1151 unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u8) }
1152 }
1153 #[inline]
set_trig_mode(&mut self, val: __u8)1154 pub fn set_trig_mode(&mut self, val: __u8) {
1155 unsafe {
1156 let val: u8 = ::std::mem::transmute(val);
1157 self._bitfield_1.set(7usize, 1u8, val as u64)
1158 }
1159 }
1160 #[inline]
mask(&self) -> __u81161 pub fn mask(&self) -> __u8 {
1162 unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u8) }
1163 }
1164 #[inline]
set_mask(&mut self, val: __u8)1165 pub fn set_mask(&mut self, val: __u8) {
1166 unsafe {
1167 let val: u8 = ::std::mem::transmute(val);
1168 self._bitfield_1.set(8usize, 1u8, val as u64)
1169 }
1170 }
1171 #[inline]
reserve(&self) -> __u81172 pub fn reserve(&self) -> __u8 {
1173 unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u8) }
1174 }
1175 #[inline]
set_reserve(&mut self, val: __u8)1176 pub fn set_reserve(&mut self, val: __u8) {
1177 unsafe {
1178 let val: u8 = ::std::mem::transmute(val);
1179 self._bitfield_1.set(9usize, 7u8, val as u64)
1180 }
1181 }
1182 #[inline]
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], u8>1183 pub fn new_bitfield_1(
1184 delivery_mode: __u8,
1185 dest_mode: __u8,
1186 delivery_status: __u8,
1187 polarity: __u8,
1188 remote_irr: __u8,
1189 trig_mode: __u8,
1190 mask: __u8,
1191 reserve: __u8,
1192 ) -> __BindgenBitfieldUnit<[u8; 2usize], u8> {
1193 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize], u8> =
1194 Default::default();
1195 __bindgen_bitfield_unit.set(0usize, 3u8, {
1196 let delivery_mode: u8 = unsafe { ::std::mem::transmute(delivery_mode) };
1197 delivery_mode as u64
1198 });
1199 __bindgen_bitfield_unit.set(3usize, 1u8, {
1200 let dest_mode: u8 = unsafe { ::std::mem::transmute(dest_mode) };
1201 dest_mode as u64
1202 });
1203 __bindgen_bitfield_unit.set(4usize, 1u8, {
1204 let delivery_status: u8 = unsafe { ::std::mem::transmute(delivery_status) };
1205 delivery_status as u64
1206 });
1207 __bindgen_bitfield_unit.set(5usize, 1u8, {
1208 let polarity: u8 = unsafe { ::std::mem::transmute(polarity) };
1209 polarity as u64
1210 });
1211 __bindgen_bitfield_unit.set(6usize, 1u8, {
1212 let remote_irr: u8 = unsafe { ::std::mem::transmute(remote_irr) };
1213 remote_irr as u64
1214 });
1215 __bindgen_bitfield_unit.set(7usize, 1u8, {
1216 let trig_mode: u8 = unsafe { ::std::mem::transmute(trig_mode) };
1217 trig_mode as u64
1218 });
1219 __bindgen_bitfield_unit.set(8usize, 1u8, {
1220 let mask: u8 = unsafe { ::std::mem::transmute(mask) };
1221 mask as u64
1222 });
1223 __bindgen_bitfield_unit.set(9usize, 7u8, {
1224 let reserve: u8 = unsafe { ::std::mem::transmute(reserve) };
1225 reserve as u64
1226 });
1227 __bindgen_bitfield_unit
1228 }
1229 }
1230 #[test]
bindgen_test_layout_kvm_ioapic_state__bindgen_ty_1()1231 fn bindgen_test_layout_kvm_ioapic_state__bindgen_ty_1() {
1232 assert_eq!(
1233 ::std::mem::size_of::<kvm_ioapic_state__bindgen_ty_1>(),
1234 8usize,
1235 concat!("Size of: ", stringify!(kvm_ioapic_state__bindgen_ty_1))
1236 );
1237 assert_eq!(
1238 ::std::mem::align_of::<kvm_ioapic_state__bindgen_ty_1>(),
1239 8usize,
1240 concat!("Alignment of ", stringify!(kvm_ioapic_state__bindgen_ty_1))
1241 );
1242 assert_eq!(
1243 unsafe {
1244 &(*(::std::ptr::null::<kvm_ioapic_state__bindgen_ty_1>())).bits as *const _ as usize
1245 },
1246 0usize,
1247 concat!(
1248 "Offset of field: ",
1249 stringify!(kvm_ioapic_state__bindgen_ty_1),
1250 "::",
1251 stringify!(bits)
1252 )
1253 );
1254 assert_eq!(
1255 unsafe {
1256 &(*(::std::ptr::null::<kvm_ioapic_state__bindgen_ty_1>())).fields as *const _ as usize
1257 },
1258 0usize,
1259 concat!(
1260 "Offset of field: ",
1261 stringify!(kvm_ioapic_state__bindgen_ty_1),
1262 "::",
1263 stringify!(fields)
1264 )
1265 );
1266 }
1267 impl Default for kvm_ioapic_state__bindgen_ty_1 {
default() -> Self1268 fn default() -> Self {
1269 unsafe { ::std::mem::zeroed() }
1270 }
1271 }
1272 #[test]
bindgen_test_layout_kvm_ioapic_state()1273 fn bindgen_test_layout_kvm_ioapic_state() {
1274 assert_eq!(
1275 ::std::mem::size_of::<kvm_ioapic_state>(),
1276 216usize,
1277 concat!("Size of: ", stringify!(kvm_ioapic_state))
1278 );
1279 assert_eq!(
1280 ::std::mem::align_of::<kvm_ioapic_state>(),
1281 8usize,
1282 concat!("Alignment of ", stringify!(kvm_ioapic_state))
1283 );
1284 assert_eq!(
1285 unsafe { &(*(::std::ptr::null::<kvm_ioapic_state>())).base_address as *const _ as usize },
1286 0usize,
1287 concat!(
1288 "Offset of field: ",
1289 stringify!(kvm_ioapic_state),
1290 "::",
1291 stringify!(base_address)
1292 )
1293 );
1294 assert_eq!(
1295 unsafe { &(*(::std::ptr::null::<kvm_ioapic_state>())).ioregsel as *const _ as usize },
1296 8usize,
1297 concat!(
1298 "Offset of field: ",
1299 stringify!(kvm_ioapic_state),
1300 "::",
1301 stringify!(ioregsel)
1302 )
1303 );
1304 assert_eq!(
1305 unsafe { &(*(::std::ptr::null::<kvm_ioapic_state>())).id as *const _ as usize },
1306 12usize,
1307 concat!(
1308 "Offset of field: ",
1309 stringify!(kvm_ioapic_state),
1310 "::",
1311 stringify!(id)
1312 )
1313 );
1314 assert_eq!(
1315 unsafe { &(*(::std::ptr::null::<kvm_ioapic_state>())).irr as *const _ as usize },
1316 16usize,
1317 concat!(
1318 "Offset of field: ",
1319 stringify!(kvm_ioapic_state),
1320 "::",
1321 stringify!(irr)
1322 )
1323 );
1324 assert_eq!(
1325 unsafe { &(*(::std::ptr::null::<kvm_ioapic_state>())).pad as *const _ as usize },
1326 20usize,
1327 concat!(
1328 "Offset of field: ",
1329 stringify!(kvm_ioapic_state),
1330 "::",
1331 stringify!(pad)
1332 )
1333 );
1334 assert_eq!(
1335 unsafe { &(*(::std::ptr::null::<kvm_ioapic_state>())).redirtbl as *const _ as usize },
1336 24usize,
1337 concat!(
1338 "Offset of field: ",
1339 stringify!(kvm_ioapic_state),
1340 "::",
1341 stringify!(redirtbl)
1342 )
1343 );
1344 }
1345 impl Default for kvm_ioapic_state {
default() -> Self1346 fn default() -> Self {
1347 unsafe { ::std::mem::zeroed() }
1348 }
1349 }
1350 #[repr(C)]
1351 #[derive(Debug, Default, Copy, Clone)]
1352 pub struct kvm_regs {
1353 pub rax: __u64,
1354 pub rbx: __u64,
1355 pub rcx: __u64,
1356 pub rdx: __u64,
1357 pub rsi: __u64,
1358 pub rdi: __u64,
1359 pub rsp: __u64,
1360 pub rbp: __u64,
1361 pub r8: __u64,
1362 pub r9: __u64,
1363 pub r10: __u64,
1364 pub r11: __u64,
1365 pub r12: __u64,
1366 pub r13: __u64,
1367 pub r14: __u64,
1368 pub r15: __u64,
1369 pub rip: __u64,
1370 pub rflags: __u64,
1371 }
1372 #[test]
bindgen_test_layout_kvm_regs()1373 fn bindgen_test_layout_kvm_regs() {
1374 assert_eq!(
1375 ::std::mem::size_of::<kvm_regs>(),
1376 144usize,
1377 concat!("Size of: ", stringify!(kvm_regs))
1378 );
1379 assert_eq!(
1380 ::std::mem::align_of::<kvm_regs>(),
1381 8usize,
1382 concat!("Alignment of ", stringify!(kvm_regs))
1383 );
1384 assert_eq!(
1385 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rax as *const _ as usize },
1386 0usize,
1387 concat!(
1388 "Offset of field: ",
1389 stringify!(kvm_regs),
1390 "::",
1391 stringify!(rax)
1392 )
1393 );
1394 assert_eq!(
1395 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rbx as *const _ as usize },
1396 8usize,
1397 concat!(
1398 "Offset of field: ",
1399 stringify!(kvm_regs),
1400 "::",
1401 stringify!(rbx)
1402 )
1403 );
1404 assert_eq!(
1405 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rcx as *const _ as usize },
1406 16usize,
1407 concat!(
1408 "Offset of field: ",
1409 stringify!(kvm_regs),
1410 "::",
1411 stringify!(rcx)
1412 )
1413 );
1414 assert_eq!(
1415 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rdx as *const _ as usize },
1416 24usize,
1417 concat!(
1418 "Offset of field: ",
1419 stringify!(kvm_regs),
1420 "::",
1421 stringify!(rdx)
1422 )
1423 );
1424 assert_eq!(
1425 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rsi as *const _ as usize },
1426 32usize,
1427 concat!(
1428 "Offset of field: ",
1429 stringify!(kvm_regs),
1430 "::",
1431 stringify!(rsi)
1432 )
1433 );
1434 assert_eq!(
1435 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rdi as *const _ as usize },
1436 40usize,
1437 concat!(
1438 "Offset of field: ",
1439 stringify!(kvm_regs),
1440 "::",
1441 stringify!(rdi)
1442 )
1443 );
1444 assert_eq!(
1445 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rsp as *const _ as usize },
1446 48usize,
1447 concat!(
1448 "Offset of field: ",
1449 stringify!(kvm_regs),
1450 "::",
1451 stringify!(rsp)
1452 )
1453 );
1454 assert_eq!(
1455 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rbp as *const _ as usize },
1456 56usize,
1457 concat!(
1458 "Offset of field: ",
1459 stringify!(kvm_regs),
1460 "::",
1461 stringify!(rbp)
1462 )
1463 );
1464 assert_eq!(
1465 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r8 as *const _ as usize },
1466 64usize,
1467 concat!(
1468 "Offset of field: ",
1469 stringify!(kvm_regs),
1470 "::",
1471 stringify!(r8)
1472 )
1473 );
1474 assert_eq!(
1475 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r9 as *const _ as usize },
1476 72usize,
1477 concat!(
1478 "Offset of field: ",
1479 stringify!(kvm_regs),
1480 "::",
1481 stringify!(r9)
1482 )
1483 );
1484 assert_eq!(
1485 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r10 as *const _ as usize },
1486 80usize,
1487 concat!(
1488 "Offset of field: ",
1489 stringify!(kvm_regs),
1490 "::",
1491 stringify!(r10)
1492 )
1493 );
1494 assert_eq!(
1495 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r11 as *const _ as usize },
1496 88usize,
1497 concat!(
1498 "Offset of field: ",
1499 stringify!(kvm_regs),
1500 "::",
1501 stringify!(r11)
1502 )
1503 );
1504 assert_eq!(
1505 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r12 as *const _ as usize },
1506 96usize,
1507 concat!(
1508 "Offset of field: ",
1509 stringify!(kvm_regs),
1510 "::",
1511 stringify!(r12)
1512 )
1513 );
1514 assert_eq!(
1515 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r13 as *const _ as usize },
1516 104usize,
1517 concat!(
1518 "Offset of field: ",
1519 stringify!(kvm_regs),
1520 "::",
1521 stringify!(r13)
1522 )
1523 );
1524 assert_eq!(
1525 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r14 as *const _ as usize },
1526 112usize,
1527 concat!(
1528 "Offset of field: ",
1529 stringify!(kvm_regs),
1530 "::",
1531 stringify!(r14)
1532 )
1533 );
1534 assert_eq!(
1535 unsafe { &(*(::std::ptr::null::<kvm_regs>())).r15 as *const _ as usize },
1536 120usize,
1537 concat!(
1538 "Offset of field: ",
1539 stringify!(kvm_regs),
1540 "::",
1541 stringify!(r15)
1542 )
1543 );
1544 assert_eq!(
1545 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rip as *const _ as usize },
1546 128usize,
1547 concat!(
1548 "Offset of field: ",
1549 stringify!(kvm_regs),
1550 "::",
1551 stringify!(rip)
1552 )
1553 );
1554 assert_eq!(
1555 unsafe { &(*(::std::ptr::null::<kvm_regs>())).rflags as *const _ as usize },
1556 136usize,
1557 concat!(
1558 "Offset of field: ",
1559 stringify!(kvm_regs),
1560 "::",
1561 stringify!(rflags)
1562 )
1563 );
1564 }
1565 #[repr(C)]
1566 #[derive(Copy, Clone)]
1567 pub struct kvm_lapic_state {
1568 pub regs: [::std::os::raw::c_char; 1024usize],
1569 }
1570 #[test]
bindgen_test_layout_kvm_lapic_state()1571 fn bindgen_test_layout_kvm_lapic_state() {
1572 assert_eq!(
1573 ::std::mem::size_of::<kvm_lapic_state>(),
1574 1024usize,
1575 concat!("Size of: ", stringify!(kvm_lapic_state))
1576 );
1577 assert_eq!(
1578 ::std::mem::align_of::<kvm_lapic_state>(),
1579 1usize,
1580 concat!("Alignment of ", stringify!(kvm_lapic_state))
1581 );
1582 assert_eq!(
1583 unsafe { &(*(::std::ptr::null::<kvm_lapic_state>())).regs as *const _ as usize },
1584 0usize,
1585 concat!(
1586 "Offset of field: ",
1587 stringify!(kvm_lapic_state),
1588 "::",
1589 stringify!(regs)
1590 )
1591 );
1592 }
1593 impl Default for kvm_lapic_state {
default() -> Self1594 fn default() -> Self {
1595 unsafe { ::std::mem::zeroed() }
1596 }
1597 }
1598 #[repr(C)]
1599 #[derive(Debug, Default, Copy, Clone)]
1600 pub struct kvm_segment {
1601 pub base: __u64,
1602 pub limit: __u32,
1603 pub selector: __u16,
1604 pub type_: __u8,
1605 pub present: __u8,
1606 pub dpl: __u8,
1607 pub db: __u8,
1608 pub s: __u8,
1609 pub l: __u8,
1610 pub g: __u8,
1611 pub avl: __u8,
1612 pub unusable: __u8,
1613 pub padding: __u8,
1614 }
1615 #[test]
bindgen_test_layout_kvm_segment()1616 fn bindgen_test_layout_kvm_segment() {
1617 assert_eq!(
1618 ::std::mem::size_of::<kvm_segment>(),
1619 24usize,
1620 concat!("Size of: ", stringify!(kvm_segment))
1621 );
1622 assert_eq!(
1623 ::std::mem::align_of::<kvm_segment>(),
1624 8usize,
1625 concat!("Alignment of ", stringify!(kvm_segment))
1626 );
1627 assert_eq!(
1628 unsafe { &(*(::std::ptr::null::<kvm_segment>())).base as *const _ as usize },
1629 0usize,
1630 concat!(
1631 "Offset of field: ",
1632 stringify!(kvm_segment),
1633 "::",
1634 stringify!(base)
1635 )
1636 );
1637 assert_eq!(
1638 unsafe { &(*(::std::ptr::null::<kvm_segment>())).limit as *const _ as usize },
1639 8usize,
1640 concat!(
1641 "Offset of field: ",
1642 stringify!(kvm_segment),
1643 "::",
1644 stringify!(limit)
1645 )
1646 );
1647 assert_eq!(
1648 unsafe { &(*(::std::ptr::null::<kvm_segment>())).selector as *const _ as usize },
1649 12usize,
1650 concat!(
1651 "Offset of field: ",
1652 stringify!(kvm_segment),
1653 "::",
1654 stringify!(selector)
1655 )
1656 );
1657 assert_eq!(
1658 unsafe { &(*(::std::ptr::null::<kvm_segment>())).type_ as *const _ as usize },
1659 14usize,
1660 concat!(
1661 "Offset of field: ",
1662 stringify!(kvm_segment),
1663 "::",
1664 stringify!(type_)
1665 )
1666 );
1667 assert_eq!(
1668 unsafe { &(*(::std::ptr::null::<kvm_segment>())).present as *const _ as usize },
1669 15usize,
1670 concat!(
1671 "Offset of field: ",
1672 stringify!(kvm_segment),
1673 "::",
1674 stringify!(present)
1675 )
1676 );
1677 assert_eq!(
1678 unsafe { &(*(::std::ptr::null::<kvm_segment>())).dpl as *const _ as usize },
1679 16usize,
1680 concat!(
1681 "Offset of field: ",
1682 stringify!(kvm_segment),
1683 "::",
1684 stringify!(dpl)
1685 )
1686 );
1687 assert_eq!(
1688 unsafe { &(*(::std::ptr::null::<kvm_segment>())).db as *const _ as usize },
1689 17usize,
1690 concat!(
1691 "Offset of field: ",
1692 stringify!(kvm_segment),
1693 "::",
1694 stringify!(db)
1695 )
1696 );
1697 assert_eq!(
1698 unsafe { &(*(::std::ptr::null::<kvm_segment>())).s as *const _ as usize },
1699 18usize,
1700 concat!(
1701 "Offset of field: ",
1702 stringify!(kvm_segment),
1703 "::",
1704 stringify!(s)
1705 )
1706 );
1707 assert_eq!(
1708 unsafe { &(*(::std::ptr::null::<kvm_segment>())).l as *const _ as usize },
1709 19usize,
1710 concat!(
1711 "Offset of field: ",
1712 stringify!(kvm_segment),
1713 "::",
1714 stringify!(l)
1715 )
1716 );
1717 assert_eq!(
1718 unsafe { &(*(::std::ptr::null::<kvm_segment>())).g as *const _ as usize },
1719 20usize,
1720 concat!(
1721 "Offset of field: ",
1722 stringify!(kvm_segment),
1723 "::",
1724 stringify!(g)
1725 )
1726 );
1727 assert_eq!(
1728 unsafe { &(*(::std::ptr::null::<kvm_segment>())).avl as *const _ as usize },
1729 21usize,
1730 concat!(
1731 "Offset of field: ",
1732 stringify!(kvm_segment),
1733 "::",
1734 stringify!(avl)
1735 )
1736 );
1737 assert_eq!(
1738 unsafe { &(*(::std::ptr::null::<kvm_segment>())).unusable as *const _ as usize },
1739 22usize,
1740 concat!(
1741 "Offset of field: ",
1742 stringify!(kvm_segment),
1743 "::",
1744 stringify!(unusable)
1745 )
1746 );
1747 assert_eq!(
1748 unsafe { &(*(::std::ptr::null::<kvm_segment>())).padding as *const _ as usize },
1749 23usize,
1750 concat!(
1751 "Offset of field: ",
1752 stringify!(kvm_segment),
1753 "::",
1754 stringify!(padding)
1755 )
1756 );
1757 }
1758 #[repr(C)]
1759 #[derive(Debug, Default, Copy, Clone)]
1760 pub struct kvm_dtable {
1761 pub base: __u64,
1762 pub limit: __u16,
1763 pub padding: [__u16; 3usize],
1764 }
1765 #[test]
bindgen_test_layout_kvm_dtable()1766 fn bindgen_test_layout_kvm_dtable() {
1767 assert_eq!(
1768 ::std::mem::size_of::<kvm_dtable>(),
1769 16usize,
1770 concat!("Size of: ", stringify!(kvm_dtable))
1771 );
1772 assert_eq!(
1773 ::std::mem::align_of::<kvm_dtable>(),
1774 8usize,
1775 concat!("Alignment of ", stringify!(kvm_dtable))
1776 );
1777 assert_eq!(
1778 unsafe { &(*(::std::ptr::null::<kvm_dtable>())).base as *const _ as usize },
1779 0usize,
1780 concat!(
1781 "Offset of field: ",
1782 stringify!(kvm_dtable),
1783 "::",
1784 stringify!(base)
1785 )
1786 );
1787 assert_eq!(
1788 unsafe { &(*(::std::ptr::null::<kvm_dtable>())).limit as *const _ as usize },
1789 8usize,
1790 concat!(
1791 "Offset of field: ",
1792 stringify!(kvm_dtable),
1793 "::",
1794 stringify!(limit)
1795 )
1796 );
1797 assert_eq!(
1798 unsafe { &(*(::std::ptr::null::<kvm_dtable>())).padding as *const _ as usize },
1799 10usize,
1800 concat!(
1801 "Offset of field: ",
1802 stringify!(kvm_dtable),
1803 "::",
1804 stringify!(padding)
1805 )
1806 );
1807 }
1808 #[repr(C)]
1809 #[derive(Debug, Default, Copy, Clone)]
1810 pub struct kvm_sregs {
1811 pub cs: kvm_segment,
1812 pub ds: kvm_segment,
1813 pub es: kvm_segment,
1814 pub fs: kvm_segment,
1815 pub gs: kvm_segment,
1816 pub ss: kvm_segment,
1817 pub tr: kvm_segment,
1818 pub ldt: kvm_segment,
1819 pub gdt: kvm_dtable,
1820 pub idt: kvm_dtable,
1821 pub cr0: __u64,
1822 pub cr2: __u64,
1823 pub cr3: __u64,
1824 pub cr4: __u64,
1825 pub cr8: __u64,
1826 pub efer: __u64,
1827 pub apic_base: __u64,
1828 pub interrupt_bitmap: [__u64; 4usize],
1829 }
1830 #[test]
bindgen_test_layout_kvm_sregs()1831 fn bindgen_test_layout_kvm_sregs() {
1832 assert_eq!(
1833 ::std::mem::size_of::<kvm_sregs>(),
1834 312usize,
1835 concat!("Size of: ", stringify!(kvm_sregs))
1836 );
1837 assert_eq!(
1838 ::std::mem::align_of::<kvm_sregs>(),
1839 8usize,
1840 concat!("Alignment of ", stringify!(kvm_sregs))
1841 );
1842 assert_eq!(
1843 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).cs as *const _ as usize },
1844 0usize,
1845 concat!(
1846 "Offset of field: ",
1847 stringify!(kvm_sregs),
1848 "::",
1849 stringify!(cs)
1850 )
1851 );
1852 assert_eq!(
1853 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).ds as *const _ as usize },
1854 24usize,
1855 concat!(
1856 "Offset of field: ",
1857 stringify!(kvm_sregs),
1858 "::",
1859 stringify!(ds)
1860 )
1861 );
1862 assert_eq!(
1863 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).es as *const _ as usize },
1864 48usize,
1865 concat!(
1866 "Offset of field: ",
1867 stringify!(kvm_sregs),
1868 "::",
1869 stringify!(es)
1870 )
1871 );
1872 assert_eq!(
1873 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).fs as *const _ as usize },
1874 72usize,
1875 concat!(
1876 "Offset of field: ",
1877 stringify!(kvm_sregs),
1878 "::",
1879 stringify!(fs)
1880 )
1881 );
1882 assert_eq!(
1883 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).gs as *const _ as usize },
1884 96usize,
1885 concat!(
1886 "Offset of field: ",
1887 stringify!(kvm_sregs),
1888 "::",
1889 stringify!(gs)
1890 )
1891 );
1892 assert_eq!(
1893 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).ss as *const _ as usize },
1894 120usize,
1895 concat!(
1896 "Offset of field: ",
1897 stringify!(kvm_sregs),
1898 "::",
1899 stringify!(ss)
1900 )
1901 );
1902 assert_eq!(
1903 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).tr as *const _ as usize },
1904 144usize,
1905 concat!(
1906 "Offset of field: ",
1907 stringify!(kvm_sregs),
1908 "::",
1909 stringify!(tr)
1910 )
1911 );
1912 assert_eq!(
1913 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).ldt as *const _ as usize },
1914 168usize,
1915 concat!(
1916 "Offset of field: ",
1917 stringify!(kvm_sregs),
1918 "::",
1919 stringify!(ldt)
1920 )
1921 );
1922 assert_eq!(
1923 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).gdt as *const _ as usize },
1924 192usize,
1925 concat!(
1926 "Offset of field: ",
1927 stringify!(kvm_sregs),
1928 "::",
1929 stringify!(gdt)
1930 )
1931 );
1932 assert_eq!(
1933 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).idt as *const _ as usize },
1934 208usize,
1935 concat!(
1936 "Offset of field: ",
1937 stringify!(kvm_sregs),
1938 "::",
1939 stringify!(idt)
1940 )
1941 );
1942 assert_eq!(
1943 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).cr0 as *const _ as usize },
1944 224usize,
1945 concat!(
1946 "Offset of field: ",
1947 stringify!(kvm_sregs),
1948 "::",
1949 stringify!(cr0)
1950 )
1951 );
1952 assert_eq!(
1953 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).cr2 as *const _ as usize },
1954 232usize,
1955 concat!(
1956 "Offset of field: ",
1957 stringify!(kvm_sregs),
1958 "::",
1959 stringify!(cr2)
1960 )
1961 );
1962 assert_eq!(
1963 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).cr3 as *const _ as usize },
1964 240usize,
1965 concat!(
1966 "Offset of field: ",
1967 stringify!(kvm_sregs),
1968 "::",
1969 stringify!(cr3)
1970 )
1971 );
1972 assert_eq!(
1973 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).cr4 as *const _ as usize },
1974 248usize,
1975 concat!(
1976 "Offset of field: ",
1977 stringify!(kvm_sregs),
1978 "::",
1979 stringify!(cr4)
1980 )
1981 );
1982 assert_eq!(
1983 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).cr8 as *const _ as usize },
1984 256usize,
1985 concat!(
1986 "Offset of field: ",
1987 stringify!(kvm_sregs),
1988 "::",
1989 stringify!(cr8)
1990 )
1991 );
1992 assert_eq!(
1993 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).efer as *const _ as usize },
1994 264usize,
1995 concat!(
1996 "Offset of field: ",
1997 stringify!(kvm_sregs),
1998 "::",
1999 stringify!(efer)
2000 )
2001 );
2002 assert_eq!(
2003 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).apic_base as *const _ as usize },
2004 272usize,
2005 concat!(
2006 "Offset of field: ",
2007 stringify!(kvm_sregs),
2008 "::",
2009 stringify!(apic_base)
2010 )
2011 );
2012 assert_eq!(
2013 unsafe { &(*(::std::ptr::null::<kvm_sregs>())).interrupt_bitmap as *const _ as usize },
2014 280usize,
2015 concat!(
2016 "Offset of field: ",
2017 stringify!(kvm_sregs),
2018 "::",
2019 stringify!(interrupt_bitmap)
2020 )
2021 );
2022 }
2023 #[repr(C)]
2024 #[derive(Debug, Default, Copy, Clone)]
2025 pub struct kvm_fpu {
2026 pub fpr: [[__u8; 16usize]; 8usize],
2027 pub fcw: __u16,
2028 pub fsw: __u16,
2029 pub ftwx: __u8,
2030 pub pad1: __u8,
2031 pub last_opcode: __u16,
2032 pub last_ip: __u64,
2033 pub last_dp: __u64,
2034 pub xmm: [[__u8; 16usize]; 16usize],
2035 pub mxcsr: __u32,
2036 pub pad2: __u32,
2037 }
2038 #[test]
bindgen_test_layout_kvm_fpu()2039 fn bindgen_test_layout_kvm_fpu() {
2040 assert_eq!(
2041 ::std::mem::size_of::<kvm_fpu>(),
2042 416usize,
2043 concat!("Size of: ", stringify!(kvm_fpu))
2044 );
2045 assert_eq!(
2046 ::std::mem::align_of::<kvm_fpu>(),
2047 8usize,
2048 concat!("Alignment of ", stringify!(kvm_fpu))
2049 );
2050 assert_eq!(
2051 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).fpr as *const _ as usize },
2052 0usize,
2053 concat!(
2054 "Offset of field: ",
2055 stringify!(kvm_fpu),
2056 "::",
2057 stringify!(fpr)
2058 )
2059 );
2060 assert_eq!(
2061 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).fcw as *const _ as usize },
2062 128usize,
2063 concat!(
2064 "Offset of field: ",
2065 stringify!(kvm_fpu),
2066 "::",
2067 stringify!(fcw)
2068 )
2069 );
2070 assert_eq!(
2071 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).fsw as *const _ as usize },
2072 130usize,
2073 concat!(
2074 "Offset of field: ",
2075 stringify!(kvm_fpu),
2076 "::",
2077 stringify!(fsw)
2078 )
2079 );
2080 assert_eq!(
2081 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).ftwx as *const _ as usize },
2082 132usize,
2083 concat!(
2084 "Offset of field: ",
2085 stringify!(kvm_fpu),
2086 "::",
2087 stringify!(ftwx)
2088 )
2089 );
2090 assert_eq!(
2091 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).pad1 as *const _ as usize },
2092 133usize,
2093 concat!(
2094 "Offset of field: ",
2095 stringify!(kvm_fpu),
2096 "::",
2097 stringify!(pad1)
2098 )
2099 );
2100 assert_eq!(
2101 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).last_opcode as *const _ as usize },
2102 134usize,
2103 concat!(
2104 "Offset of field: ",
2105 stringify!(kvm_fpu),
2106 "::",
2107 stringify!(last_opcode)
2108 )
2109 );
2110 assert_eq!(
2111 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).last_ip as *const _ as usize },
2112 136usize,
2113 concat!(
2114 "Offset of field: ",
2115 stringify!(kvm_fpu),
2116 "::",
2117 stringify!(last_ip)
2118 )
2119 );
2120 assert_eq!(
2121 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).last_dp as *const _ as usize },
2122 144usize,
2123 concat!(
2124 "Offset of field: ",
2125 stringify!(kvm_fpu),
2126 "::",
2127 stringify!(last_dp)
2128 )
2129 );
2130 assert_eq!(
2131 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).xmm as *const _ as usize },
2132 152usize,
2133 concat!(
2134 "Offset of field: ",
2135 stringify!(kvm_fpu),
2136 "::",
2137 stringify!(xmm)
2138 )
2139 );
2140 assert_eq!(
2141 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).mxcsr as *const _ as usize },
2142 408usize,
2143 concat!(
2144 "Offset of field: ",
2145 stringify!(kvm_fpu),
2146 "::",
2147 stringify!(mxcsr)
2148 )
2149 );
2150 assert_eq!(
2151 unsafe { &(*(::std::ptr::null::<kvm_fpu>())).pad2 as *const _ as usize },
2152 412usize,
2153 concat!(
2154 "Offset of field: ",
2155 stringify!(kvm_fpu),
2156 "::",
2157 stringify!(pad2)
2158 )
2159 );
2160 }
2161 #[repr(C)]
2162 #[derive(Debug, Default, Copy, Clone)]
2163 pub struct kvm_msr_entry {
2164 pub index: __u32,
2165 pub reserved: __u32,
2166 pub data: __u64,
2167 }
2168 #[test]
bindgen_test_layout_kvm_msr_entry()2169 fn bindgen_test_layout_kvm_msr_entry() {
2170 assert_eq!(
2171 ::std::mem::size_of::<kvm_msr_entry>(),
2172 16usize,
2173 concat!("Size of: ", stringify!(kvm_msr_entry))
2174 );
2175 assert_eq!(
2176 ::std::mem::align_of::<kvm_msr_entry>(),
2177 8usize,
2178 concat!("Alignment of ", stringify!(kvm_msr_entry))
2179 );
2180 assert_eq!(
2181 unsafe { &(*(::std::ptr::null::<kvm_msr_entry>())).index as *const _ as usize },
2182 0usize,
2183 concat!(
2184 "Offset of field: ",
2185 stringify!(kvm_msr_entry),
2186 "::",
2187 stringify!(index)
2188 )
2189 );
2190 assert_eq!(
2191 unsafe { &(*(::std::ptr::null::<kvm_msr_entry>())).reserved as *const _ as usize },
2192 4usize,
2193 concat!(
2194 "Offset of field: ",
2195 stringify!(kvm_msr_entry),
2196 "::",
2197 stringify!(reserved)
2198 )
2199 );
2200 assert_eq!(
2201 unsafe { &(*(::std::ptr::null::<kvm_msr_entry>())).data as *const _ as usize },
2202 8usize,
2203 concat!(
2204 "Offset of field: ",
2205 stringify!(kvm_msr_entry),
2206 "::",
2207 stringify!(data)
2208 )
2209 );
2210 }
2211 #[repr(C)]
2212 #[derive(Debug, Default)]
2213 pub struct kvm_msrs {
2214 pub nmsrs: __u32,
2215 pub pad: __u32,
2216 pub entries: __IncompleteArrayField<kvm_msr_entry>,
2217 }
2218 #[test]
bindgen_test_layout_kvm_msrs()2219 fn bindgen_test_layout_kvm_msrs() {
2220 assert_eq!(
2221 ::std::mem::size_of::<kvm_msrs>(),
2222 8usize,
2223 concat!("Size of: ", stringify!(kvm_msrs))
2224 );
2225 assert_eq!(
2226 ::std::mem::align_of::<kvm_msrs>(),
2227 8usize,
2228 concat!("Alignment of ", stringify!(kvm_msrs))
2229 );
2230 assert_eq!(
2231 unsafe { &(*(::std::ptr::null::<kvm_msrs>())).nmsrs as *const _ as usize },
2232 0usize,
2233 concat!(
2234 "Offset of field: ",
2235 stringify!(kvm_msrs),
2236 "::",
2237 stringify!(nmsrs)
2238 )
2239 );
2240 assert_eq!(
2241 unsafe { &(*(::std::ptr::null::<kvm_msrs>())).pad as *const _ as usize },
2242 4usize,
2243 concat!(
2244 "Offset of field: ",
2245 stringify!(kvm_msrs),
2246 "::",
2247 stringify!(pad)
2248 )
2249 );
2250 assert_eq!(
2251 unsafe { &(*(::std::ptr::null::<kvm_msrs>())).entries as *const _ as usize },
2252 8usize,
2253 concat!(
2254 "Offset of field: ",
2255 stringify!(kvm_msrs),
2256 "::",
2257 stringify!(entries)
2258 )
2259 );
2260 }
2261 #[repr(C)]
2262 #[derive(Debug, Default)]
2263 pub struct kvm_msr_list {
2264 pub nmsrs: __u32,
2265 pub indices: __IncompleteArrayField<__u32>,
2266 }
2267 #[test]
bindgen_test_layout_kvm_msr_list()2268 fn bindgen_test_layout_kvm_msr_list() {
2269 assert_eq!(
2270 ::std::mem::size_of::<kvm_msr_list>(),
2271 4usize,
2272 concat!("Size of: ", stringify!(kvm_msr_list))
2273 );
2274 assert_eq!(
2275 ::std::mem::align_of::<kvm_msr_list>(),
2276 4usize,
2277 concat!("Alignment of ", stringify!(kvm_msr_list))
2278 );
2279 assert_eq!(
2280 unsafe { &(*(::std::ptr::null::<kvm_msr_list>())).nmsrs as *const _ as usize },
2281 0usize,
2282 concat!(
2283 "Offset of field: ",
2284 stringify!(kvm_msr_list),
2285 "::",
2286 stringify!(nmsrs)
2287 )
2288 );
2289 assert_eq!(
2290 unsafe { &(*(::std::ptr::null::<kvm_msr_list>())).indices as *const _ as usize },
2291 4usize,
2292 concat!(
2293 "Offset of field: ",
2294 stringify!(kvm_msr_list),
2295 "::",
2296 stringify!(indices)
2297 )
2298 );
2299 }
2300 #[repr(C)]
2301 #[derive(Debug, Default, Copy, Clone)]
2302 pub struct kvm_cpuid_entry {
2303 pub function: __u32,
2304 pub eax: __u32,
2305 pub ebx: __u32,
2306 pub ecx: __u32,
2307 pub edx: __u32,
2308 pub padding: __u32,
2309 }
2310 #[test]
bindgen_test_layout_kvm_cpuid_entry()2311 fn bindgen_test_layout_kvm_cpuid_entry() {
2312 assert_eq!(
2313 ::std::mem::size_of::<kvm_cpuid_entry>(),
2314 24usize,
2315 concat!("Size of: ", stringify!(kvm_cpuid_entry))
2316 );
2317 assert_eq!(
2318 ::std::mem::align_of::<kvm_cpuid_entry>(),
2319 4usize,
2320 concat!("Alignment of ", stringify!(kvm_cpuid_entry))
2321 );
2322 assert_eq!(
2323 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry>())).function as *const _ as usize },
2324 0usize,
2325 concat!(
2326 "Offset of field: ",
2327 stringify!(kvm_cpuid_entry),
2328 "::",
2329 stringify!(function)
2330 )
2331 );
2332 assert_eq!(
2333 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry>())).eax as *const _ as usize },
2334 4usize,
2335 concat!(
2336 "Offset of field: ",
2337 stringify!(kvm_cpuid_entry),
2338 "::",
2339 stringify!(eax)
2340 )
2341 );
2342 assert_eq!(
2343 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry>())).ebx as *const _ as usize },
2344 8usize,
2345 concat!(
2346 "Offset of field: ",
2347 stringify!(kvm_cpuid_entry),
2348 "::",
2349 stringify!(ebx)
2350 )
2351 );
2352 assert_eq!(
2353 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry>())).ecx as *const _ as usize },
2354 12usize,
2355 concat!(
2356 "Offset of field: ",
2357 stringify!(kvm_cpuid_entry),
2358 "::",
2359 stringify!(ecx)
2360 )
2361 );
2362 assert_eq!(
2363 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry>())).edx as *const _ as usize },
2364 16usize,
2365 concat!(
2366 "Offset of field: ",
2367 stringify!(kvm_cpuid_entry),
2368 "::",
2369 stringify!(edx)
2370 )
2371 );
2372 assert_eq!(
2373 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry>())).padding as *const _ as usize },
2374 20usize,
2375 concat!(
2376 "Offset of field: ",
2377 stringify!(kvm_cpuid_entry),
2378 "::",
2379 stringify!(padding)
2380 )
2381 );
2382 }
2383 #[repr(C)]
2384 #[derive(Debug, Default)]
2385 pub struct kvm_cpuid {
2386 pub nent: __u32,
2387 pub padding: __u32,
2388 pub entries: __IncompleteArrayField<kvm_cpuid_entry>,
2389 }
2390 #[test]
bindgen_test_layout_kvm_cpuid()2391 fn bindgen_test_layout_kvm_cpuid() {
2392 assert_eq!(
2393 ::std::mem::size_of::<kvm_cpuid>(),
2394 8usize,
2395 concat!("Size of: ", stringify!(kvm_cpuid))
2396 );
2397 assert_eq!(
2398 ::std::mem::align_of::<kvm_cpuid>(),
2399 4usize,
2400 concat!("Alignment of ", stringify!(kvm_cpuid))
2401 );
2402 assert_eq!(
2403 unsafe { &(*(::std::ptr::null::<kvm_cpuid>())).nent as *const _ as usize },
2404 0usize,
2405 concat!(
2406 "Offset of field: ",
2407 stringify!(kvm_cpuid),
2408 "::",
2409 stringify!(nent)
2410 )
2411 );
2412 assert_eq!(
2413 unsafe { &(*(::std::ptr::null::<kvm_cpuid>())).padding as *const _ as usize },
2414 4usize,
2415 concat!(
2416 "Offset of field: ",
2417 stringify!(kvm_cpuid),
2418 "::",
2419 stringify!(padding)
2420 )
2421 );
2422 assert_eq!(
2423 unsafe { &(*(::std::ptr::null::<kvm_cpuid>())).entries as *const _ as usize },
2424 8usize,
2425 concat!(
2426 "Offset of field: ",
2427 stringify!(kvm_cpuid),
2428 "::",
2429 stringify!(entries)
2430 )
2431 );
2432 }
2433 #[repr(C)]
2434 #[derive(Debug, Default, Copy, Clone)]
2435 pub struct kvm_cpuid_entry2 {
2436 pub function: __u32,
2437 pub index: __u32,
2438 pub flags: __u32,
2439 pub eax: __u32,
2440 pub ebx: __u32,
2441 pub ecx: __u32,
2442 pub edx: __u32,
2443 pub padding: [__u32; 3usize],
2444 }
2445 #[test]
bindgen_test_layout_kvm_cpuid_entry2()2446 fn bindgen_test_layout_kvm_cpuid_entry2() {
2447 assert_eq!(
2448 ::std::mem::size_of::<kvm_cpuid_entry2>(),
2449 40usize,
2450 concat!("Size of: ", stringify!(kvm_cpuid_entry2))
2451 );
2452 assert_eq!(
2453 ::std::mem::align_of::<kvm_cpuid_entry2>(),
2454 4usize,
2455 concat!("Alignment of ", stringify!(kvm_cpuid_entry2))
2456 );
2457 assert_eq!(
2458 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).function as *const _ as usize },
2459 0usize,
2460 concat!(
2461 "Offset of field: ",
2462 stringify!(kvm_cpuid_entry2),
2463 "::",
2464 stringify!(function)
2465 )
2466 );
2467 assert_eq!(
2468 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).index as *const _ as usize },
2469 4usize,
2470 concat!(
2471 "Offset of field: ",
2472 stringify!(kvm_cpuid_entry2),
2473 "::",
2474 stringify!(index)
2475 )
2476 );
2477 assert_eq!(
2478 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).flags as *const _ as usize },
2479 8usize,
2480 concat!(
2481 "Offset of field: ",
2482 stringify!(kvm_cpuid_entry2),
2483 "::",
2484 stringify!(flags)
2485 )
2486 );
2487 assert_eq!(
2488 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).eax as *const _ as usize },
2489 12usize,
2490 concat!(
2491 "Offset of field: ",
2492 stringify!(kvm_cpuid_entry2),
2493 "::",
2494 stringify!(eax)
2495 )
2496 );
2497 assert_eq!(
2498 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).ebx as *const _ as usize },
2499 16usize,
2500 concat!(
2501 "Offset of field: ",
2502 stringify!(kvm_cpuid_entry2),
2503 "::",
2504 stringify!(ebx)
2505 )
2506 );
2507 assert_eq!(
2508 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).ecx as *const _ as usize },
2509 20usize,
2510 concat!(
2511 "Offset of field: ",
2512 stringify!(kvm_cpuid_entry2),
2513 "::",
2514 stringify!(ecx)
2515 )
2516 );
2517 assert_eq!(
2518 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).edx as *const _ as usize },
2519 24usize,
2520 concat!(
2521 "Offset of field: ",
2522 stringify!(kvm_cpuid_entry2),
2523 "::",
2524 stringify!(edx)
2525 )
2526 );
2527 assert_eq!(
2528 unsafe { &(*(::std::ptr::null::<kvm_cpuid_entry2>())).padding as *const _ as usize },
2529 28usize,
2530 concat!(
2531 "Offset of field: ",
2532 stringify!(kvm_cpuid_entry2),
2533 "::",
2534 stringify!(padding)
2535 )
2536 );
2537 }
2538 #[repr(C)]
2539 #[derive(Debug, Default)]
2540 pub struct kvm_cpuid2 {
2541 pub nent: __u32,
2542 pub padding: __u32,
2543 pub entries: __IncompleteArrayField<kvm_cpuid_entry2>,
2544 }
2545 #[test]
bindgen_test_layout_kvm_cpuid2()2546 fn bindgen_test_layout_kvm_cpuid2() {
2547 assert_eq!(
2548 ::std::mem::size_of::<kvm_cpuid2>(),
2549 8usize,
2550 concat!("Size of: ", stringify!(kvm_cpuid2))
2551 );
2552 assert_eq!(
2553 ::std::mem::align_of::<kvm_cpuid2>(),
2554 4usize,
2555 concat!("Alignment of ", stringify!(kvm_cpuid2))
2556 );
2557 assert_eq!(
2558 unsafe { &(*(::std::ptr::null::<kvm_cpuid2>())).nent as *const _ as usize },
2559 0usize,
2560 concat!(
2561 "Offset of field: ",
2562 stringify!(kvm_cpuid2),
2563 "::",
2564 stringify!(nent)
2565 )
2566 );
2567 assert_eq!(
2568 unsafe { &(*(::std::ptr::null::<kvm_cpuid2>())).padding as *const _ as usize },
2569 4usize,
2570 concat!(
2571 "Offset of field: ",
2572 stringify!(kvm_cpuid2),
2573 "::",
2574 stringify!(padding)
2575 )
2576 );
2577 assert_eq!(
2578 unsafe { &(*(::std::ptr::null::<kvm_cpuid2>())).entries as *const _ as usize },
2579 8usize,
2580 concat!(
2581 "Offset of field: ",
2582 stringify!(kvm_cpuid2),
2583 "::",
2584 stringify!(entries)
2585 )
2586 );
2587 }
2588 #[repr(C)]
2589 #[derive(Debug, Default, Copy, Clone)]
2590 pub struct kvm_pit_channel_state {
2591 pub count: __u32,
2592 pub latched_count: __u16,
2593 pub count_latched: __u8,
2594 pub status_latched: __u8,
2595 pub status: __u8,
2596 pub read_state: __u8,
2597 pub write_state: __u8,
2598 pub write_latch: __u8,
2599 pub rw_mode: __u8,
2600 pub mode: __u8,
2601 pub bcd: __u8,
2602 pub gate: __u8,
2603 pub count_load_time: __s64,
2604 }
2605 #[test]
bindgen_test_layout_kvm_pit_channel_state()2606 fn bindgen_test_layout_kvm_pit_channel_state() {
2607 assert_eq!(
2608 ::std::mem::size_of::<kvm_pit_channel_state>(),
2609 24usize,
2610 concat!("Size of: ", stringify!(kvm_pit_channel_state))
2611 );
2612 assert_eq!(
2613 ::std::mem::align_of::<kvm_pit_channel_state>(),
2614 8usize,
2615 concat!("Alignment of ", stringify!(kvm_pit_channel_state))
2616 );
2617 assert_eq!(
2618 unsafe { &(*(::std::ptr::null::<kvm_pit_channel_state>())).count as *const _ as usize },
2619 0usize,
2620 concat!(
2621 "Offset of field: ",
2622 stringify!(kvm_pit_channel_state),
2623 "::",
2624 stringify!(count)
2625 )
2626 );
2627 assert_eq!(
2628 unsafe {
2629 &(*(::std::ptr::null::<kvm_pit_channel_state>())).latched_count as *const _ as usize
2630 },
2631 4usize,
2632 concat!(
2633 "Offset of field: ",
2634 stringify!(kvm_pit_channel_state),
2635 "::",
2636 stringify!(latched_count)
2637 )
2638 );
2639 assert_eq!(
2640 unsafe {
2641 &(*(::std::ptr::null::<kvm_pit_channel_state>())).count_latched as *const _ as usize
2642 },
2643 6usize,
2644 concat!(
2645 "Offset of field: ",
2646 stringify!(kvm_pit_channel_state),
2647 "::",
2648 stringify!(count_latched)
2649 )
2650 );
2651 assert_eq!(
2652 unsafe {
2653 &(*(::std::ptr::null::<kvm_pit_channel_state>())).status_latched as *const _ as usize
2654 },
2655 7usize,
2656 concat!(
2657 "Offset of field: ",
2658 stringify!(kvm_pit_channel_state),
2659 "::",
2660 stringify!(status_latched)
2661 )
2662 );
2663 assert_eq!(
2664 unsafe { &(*(::std::ptr::null::<kvm_pit_channel_state>())).status as *const _ as usize },
2665 8usize,
2666 concat!(
2667 "Offset of field: ",
2668 stringify!(kvm_pit_channel_state),
2669 "::",
2670 stringify!(status)
2671 )
2672 );
2673 assert_eq!(
2674 unsafe {
2675 &(*(::std::ptr::null::<kvm_pit_channel_state>())).read_state as *const _ as usize
2676 },
2677 9usize,
2678 concat!(
2679 "Offset of field: ",
2680 stringify!(kvm_pit_channel_state),
2681 "::",
2682 stringify!(read_state)
2683 )
2684 );
2685 assert_eq!(
2686 unsafe {
2687 &(*(::std::ptr::null::<kvm_pit_channel_state>())).write_state as *const _ as usize
2688 },
2689 10usize,
2690 concat!(
2691 "Offset of field: ",
2692 stringify!(kvm_pit_channel_state),
2693 "::",
2694 stringify!(write_state)
2695 )
2696 );
2697 assert_eq!(
2698 unsafe {
2699 &(*(::std::ptr::null::<kvm_pit_channel_state>())).write_latch as *const _ as usize
2700 },
2701 11usize,
2702 concat!(
2703 "Offset of field: ",
2704 stringify!(kvm_pit_channel_state),
2705 "::",
2706 stringify!(write_latch)
2707 )
2708 );
2709 assert_eq!(
2710 unsafe { &(*(::std::ptr::null::<kvm_pit_channel_state>())).rw_mode as *const _ as usize },
2711 12usize,
2712 concat!(
2713 "Offset of field: ",
2714 stringify!(kvm_pit_channel_state),
2715 "::",
2716 stringify!(rw_mode)
2717 )
2718 );
2719 assert_eq!(
2720 unsafe { &(*(::std::ptr::null::<kvm_pit_channel_state>())).mode as *const _ as usize },
2721 13usize,
2722 concat!(
2723 "Offset of field: ",
2724 stringify!(kvm_pit_channel_state),
2725 "::",
2726 stringify!(mode)
2727 )
2728 );
2729 assert_eq!(
2730 unsafe { &(*(::std::ptr::null::<kvm_pit_channel_state>())).bcd as *const _ as usize },
2731 14usize,
2732 concat!(
2733 "Offset of field: ",
2734 stringify!(kvm_pit_channel_state),
2735 "::",
2736 stringify!(bcd)
2737 )
2738 );
2739 assert_eq!(
2740 unsafe { &(*(::std::ptr::null::<kvm_pit_channel_state>())).gate as *const _ as usize },
2741 15usize,
2742 concat!(
2743 "Offset of field: ",
2744 stringify!(kvm_pit_channel_state),
2745 "::",
2746 stringify!(gate)
2747 )
2748 );
2749 assert_eq!(
2750 unsafe {
2751 &(*(::std::ptr::null::<kvm_pit_channel_state>())).count_load_time as *const _ as usize
2752 },
2753 16usize,
2754 concat!(
2755 "Offset of field: ",
2756 stringify!(kvm_pit_channel_state),
2757 "::",
2758 stringify!(count_load_time)
2759 )
2760 );
2761 }
2762 #[repr(C)]
2763 #[derive(Debug, Default, Copy, Clone)]
2764 pub struct kvm_debug_exit_arch {
2765 pub exception: __u32,
2766 pub pad: __u32,
2767 pub pc: __u64,
2768 pub dr6: __u64,
2769 pub dr7: __u64,
2770 }
2771 #[test]
bindgen_test_layout_kvm_debug_exit_arch()2772 fn bindgen_test_layout_kvm_debug_exit_arch() {
2773 assert_eq!(
2774 ::std::mem::size_of::<kvm_debug_exit_arch>(),
2775 32usize,
2776 concat!("Size of: ", stringify!(kvm_debug_exit_arch))
2777 );
2778 assert_eq!(
2779 ::std::mem::align_of::<kvm_debug_exit_arch>(),
2780 8usize,
2781 concat!("Alignment of ", stringify!(kvm_debug_exit_arch))
2782 );
2783 assert_eq!(
2784 unsafe { &(*(::std::ptr::null::<kvm_debug_exit_arch>())).exception as *const _ as usize },
2785 0usize,
2786 concat!(
2787 "Offset of field: ",
2788 stringify!(kvm_debug_exit_arch),
2789 "::",
2790 stringify!(exception)
2791 )
2792 );
2793 assert_eq!(
2794 unsafe { &(*(::std::ptr::null::<kvm_debug_exit_arch>())).pad as *const _ as usize },
2795 4usize,
2796 concat!(
2797 "Offset of field: ",
2798 stringify!(kvm_debug_exit_arch),
2799 "::",
2800 stringify!(pad)
2801 )
2802 );
2803 assert_eq!(
2804 unsafe { &(*(::std::ptr::null::<kvm_debug_exit_arch>())).pc as *const _ as usize },
2805 8usize,
2806 concat!(
2807 "Offset of field: ",
2808 stringify!(kvm_debug_exit_arch),
2809 "::",
2810 stringify!(pc)
2811 )
2812 );
2813 assert_eq!(
2814 unsafe { &(*(::std::ptr::null::<kvm_debug_exit_arch>())).dr6 as *const _ as usize },
2815 16usize,
2816 concat!(
2817 "Offset of field: ",
2818 stringify!(kvm_debug_exit_arch),
2819 "::",
2820 stringify!(dr6)
2821 )
2822 );
2823 assert_eq!(
2824 unsafe { &(*(::std::ptr::null::<kvm_debug_exit_arch>())).dr7 as *const _ as usize },
2825 24usize,
2826 concat!(
2827 "Offset of field: ",
2828 stringify!(kvm_debug_exit_arch),
2829 "::",
2830 stringify!(dr7)
2831 )
2832 );
2833 }
2834 #[repr(C)]
2835 #[derive(Debug, Default, Copy, Clone)]
2836 pub struct kvm_guest_debug_arch {
2837 pub debugreg: [__u64; 8usize],
2838 }
2839 #[test]
bindgen_test_layout_kvm_guest_debug_arch()2840 fn bindgen_test_layout_kvm_guest_debug_arch() {
2841 assert_eq!(
2842 ::std::mem::size_of::<kvm_guest_debug_arch>(),
2843 64usize,
2844 concat!("Size of: ", stringify!(kvm_guest_debug_arch))
2845 );
2846 assert_eq!(
2847 ::std::mem::align_of::<kvm_guest_debug_arch>(),
2848 8usize,
2849 concat!("Alignment of ", stringify!(kvm_guest_debug_arch))
2850 );
2851 assert_eq!(
2852 unsafe { &(*(::std::ptr::null::<kvm_guest_debug_arch>())).debugreg as *const _ as usize },
2853 0usize,
2854 concat!(
2855 "Offset of field: ",
2856 stringify!(kvm_guest_debug_arch),
2857 "::",
2858 stringify!(debugreg)
2859 )
2860 );
2861 }
2862 #[repr(C)]
2863 #[derive(Debug, Default, Copy, Clone)]
2864 pub struct kvm_pit_state {
2865 pub channels: [kvm_pit_channel_state; 3usize],
2866 }
2867 #[test]
bindgen_test_layout_kvm_pit_state()2868 fn bindgen_test_layout_kvm_pit_state() {
2869 assert_eq!(
2870 ::std::mem::size_of::<kvm_pit_state>(),
2871 72usize,
2872 concat!("Size of: ", stringify!(kvm_pit_state))
2873 );
2874 assert_eq!(
2875 ::std::mem::align_of::<kvm_pit_state>(),
2876 8usize,
2877 concat!("Alignment of ", stringify!(kvm_pit_state))
2878 );
2879 assert_eq!(
2880 unsafe { &(*(::std::ptr::null::<kvm_pit_state>())).channels as *const _ as usize },
2881 0usize,
2882 concat!(
2883 "Offset of field: ",
2884 stringify!(kvm_pit_state),
2885 "::",
2886 stringify!(channels)
2887 )
2888 );
2889 }
2890 #[repr(C)]
2891 #[derive(Debug, Default, Copy, Clone)]
2892 pub struct kvm_pit_state2 {
2893 pub channels: [kvm_pit_channel_state; 3usize],
2894 pub flags: __u32,
2895 pub reserved: [__u32; 9usize],
2896 }
2897 #[test]
bindgen_test_layout_kvm_pit_state2()2898 fn bindgen_test_layout_kvm_pit_state2() {
2899 assert_eq!(
2900 ::std::mem::size_of::<kvm_pit_state2>(),
2901 112usize,
2902 concat!("Size of: ", stringify!(kvm_pit_state2))
2903 );
2904 assert_eq!(
2905 ::std::mem::align_of::<kvm_pit_state2>(),
2906 8usize,
2907 concat!("Alignment of ", stringify!(kvm_pit_state2))
2908 );
2909 assert_eq!(
2910 unsafe { &(*(::std::ptr::null::<kvm_pit_state2>())).channels as *const _ as usize },
2911 0usize,
2912 concat!(
2913 "Offset of field: ",
2914 stringify!(kvm_pit_state2),
2915 "::",
2916 stringify!(channels)
2917 )
2918 );
2919 assert_eq!(
2920 unsafe { &(*(::std::ptr::null::<kvm_pit_state2>())).flags as *const _ as usize },
2921 72usize,
2922 concat!(
2923 "Offset of field: ",
2924 stringify!(kvm_pit_state2),
2925 "::",
2926 stringify!(flags)
2927 )
2928 );
2929 assert_eq!(
2930 unsafe { &(*(::std::ptr::null::<kvm_pit_state2>())).reserved as *const _ as usize },
2931 76usize,
2932 concat!(
2933 "Offset of field: ",
2934 stringify!(kvm_pit_state2),
2935 "::",
2936 stringify!(reserved)
2937 )
2938 );
2939 }
2940 #[repr(C)]
2941 #[derive(Debug, Default, Copy, Clone)]
2942 pub struct kvm_reinject_control {
2943 pub pit_reinject: __u8,
2944 pub reserved: [__u8; 31usize],
2945 }
2946 #[test]
bindgen_test_layout_kvm_reinject_control()2947 fn bindgen_test_layout_kvm_reinject_control() {
2948 assert_eq!(
2949 ::std::mem::size_of::<kvm_reinject_control>(),
2950 32usize,
2951 concat!("Size of: ", stringify!(kvm_reinject_control))
2952 );
2953 assert_eq!(
2954 ::std::mem::align_of::<kvm_reinject_control>(),
2955 1usize,
2956 concat!("Alignment of ", stringify!(kvm_reinject_control))
2957 );
2958 assert_eq!(
2959 unsafe {
2960 &(*(::std::ptr::null::<kvm_reinject_control>())).pit_reinject as *const _ as usize
2961 },
2962 0usize,
2963 concat!(
2964 "Offset of field: ",
2965 stringify!(kvm_reinject_control),
2966 "::",
2967 stringify!(pit_reinject)
2968 )
2969 );
2970 assert_eq!(
2971 unsafe { &(*(::std::ptr::null::<kvm_reinject_control>())).reserved as *const _ as usize },
2972 1usize,
2973 concat!(
2974 "Offset of field: ",
2975 stringify!(kvm_reinject_control),
2976 "::",
2977 stringify!(reserved)
2978 )
2979 );
2980 }
2981 #[repr(C)]
2982 #[derive(Debug, Default, Copy, Clone)]
2983 pub struct kvm_vcpu_events {
2984 pub exception: kvm_vcpu_events__bindgen_ty_1,
2985 pub interrupt: kvm_vcpu_events__bindgen_ty_2,
2986 pub nmi: kvm_vcpu_events__bindgen_ty_3,
2987 pub sipi_vector: __u32,
2988 pub flags: __u32,
2989 pub smi: kvm_vcpu_events__bindgen_ty_4,
2990 pub reserved: [__u8; 27usize],
2991 pub exception_has_payload: __u8,
2992 pub exception_payload: __u64,
2993 }
2994 #[repr(C)]
2995 #[derive(Debug, Default, Copy, Clone)]
2996 pub struct kvm_vcpu_events__bindgen_ty_1 {
2997 pub injected: __u8,
2998 pub nr: __u8,
2999 pub has_error_code: __u8,
3000 pub pending: __u8,
3001 pub error_code: __u32,
3002 }
3003 #[test]
bindgen_test_layout_kvm_vcpu_events__bindgen_ty_1()3004 fn bindgen_test_layout_kvm_vcpu_events__bindgen_ty_1() {
3005 assert_eq!(
3006 ::std::mem::size_of::<kvm_vcpu_events__bindgen_ty_1>(),
3007 8usize,
3008 concat!("Size of: ", stringify!(kvm_vcpu_events__bindgen_ty_1))
3009 );
3010 assert_eq!(
3011 ::std::mem::align_of::<kvm_vcpu_events__bindgen_ty_1>(),
3012 4usize,
3013 concat!("Alignment of ", stringify!(kvm_vcpu_events__bindgen_ty_1))
3014 );
3015 assert_eq!(
3016 unsafe {
3017 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).injected as *const _ as usize
3018 },
3019 0usize,
3020 concat!(
3021 "Offset of field: ",
3022 stringify!(kvm_vcpu_events__bindgen_ty_1),
3023 "::",
3024 stringify!(injected)
3025 )
3026 );
3027 assert_eq!(
3028 unsafe {
3029 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).nr as *const _ as usize
3030 },
3031 1usize,
3032 concat!(
3033 "Offset of field: ",
3034 stringify!(kvm_vcpu_events__bindgen_ty_1),
3035 "::",
3036 stringify!(nr)
3037 )
3038 );
3039 assert_eq!(
3040 unsafe {
3041 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).has_error_code as *const _
3042 as usize
3043 },
3044 2usize,
3045 concat!(
3046 "Offset of field: ",
3047 stringify!(kvm_vcpu_events__bindgen_ty_1),
3048 "::",
3049 stringify!(has_error_code)
3050 )
3051 );
3052 assert_eq!(
3053 unsafe {
3054 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).pending as *const _ as usize
3055 },
3056 3usize,
3057 concat!(
3058 "Offset of field: ",
3059 stringify!(kvm_vcpu_events__bindgen_ty_1),
3060 "::",
3061 stringify!(pending)
3062 )
3063 );
3064 assert_eq!(
3065 unsafe {
3066 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_1>())).error_code as *const _
3067 as usize
3068 },
3069 4usize,
3070 concat!(
3071 "Offset of field: ",
3072 stringify!(kvm_vcpu_events__bindgen_ty_1),
3073 "::",
3074 stringify!(error_code)
3075 )
3076 );
3077 }
3078 #[repr(C)]
3079 #[derive(Debug, Default, Copy, Clone)]
3080 pub struct kvm_vcpu_events__bindgen_ty_2 {
3081 pub injected: __u8,
3082 pub nr: __u8,
3083 pub soft: __u8,
3084 pub shadow: __u8,
3085 }
3086 #[test]
bindgen_test_layout_kvm_vcpu_events__bindgen_ty_2()3087 fn bindgen_test_layout_kvm_vcpu_events__bindgen_ty_2() {
3088 assert_eq!(
3089 ::std::mem::size_of::<kvm_vcpu_events__bindgen_ty_2>(),
3090 4usize,
3091 concat!("Size of: ", stringify!(kvm_vcpu_events__bindgen_ty_2))
3092 );
3093 assert_eq!(
3094 ::std::mem::align_of::<kvm_vcpu_events__bindgen_ty_2>(),
3095 1usize,
3096 concat!("Alignment of ", stringify!(kvm_vcpu_events__bindgen_ty_2))
3097 );
3098 assert_eq!(
3099 unsafe {
3100 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_2>())).injected as *const _ as usize
3101 },
3102 0usize,
3103 concat!(
3104 "Offset of field: ",
3105 stringify!(kvm_vcpu_events__bindgen_ty_2),
3106 "::",
3107 stringify!(injected)
3108 )
3109 );
3110 assert_eq!(
3111 unsafe {
3112 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_2>())).nr as *const _ as usize
3113 },
3114 1usize,
3115 concat!(
3116 "Offset of field: ",
3117 stringify!(kvm_vcpu_events__bindgen_ty_2),
3118 "::",
3119 stringify!(nr)
3120 )
3121 );
3122 assert_eq!(
3123 unsafe {
3124 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_2>())).soft as *const _ as usize
3125 },
3126 2usize,
3127 concat!(
3128 "Offset of field: ",
3129 stringify!(kvm_vcpu_events__bindgen_ty_2),
3130 "::",
3131 stringify!(soft)
3132 )
3133 );
3134 assert_eq!(
3135 unsafe {
3136 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_2>())).shadow as *const _ as usize
3137 },
3138 3usize,
3139 concat!(
3140 "Offset of field: ",
3141 stringify!(kvm_vcpu_events__bindgen_ty_2),
3142 "::",
3143 stringify!(shadow)
3144 )
3145 );
3146 }
3147 #[repr(C)]
3148 #[derive(Debug, Default, Copy, Clone)]
3149 pub struct kvm_vcpu_events__bindgen_ty_3 {
3150 pub injected: __u8,
3151 pub pending: __u8,
3152 pub masked: __u8,
3153 pub pad: __u8,
3154 }
3155 #[test]
bindgen_test_layout_kvm_vcpu_events__bindgen_ty_3()3156 fn bindgen_test_layout_kvm_vcpu_events__bindgen_ty_3() {
3157 assert_eq!(
3158 ::std::mem::size_of::<kvm_vcpu_events__bindgen_ty_3>(),
3159 4usize,
3160 concat!("Size of: ", stringify!(kvm_vcpu_events__bindgen_ty_3))
3161 );
3162 assert_eq!(
3163 ::std::mem::align_of::<kvm_vcpu_events__bindgen_ty_3>(),
3164 1usize,
3165 concat!("Alignment of ", stringify!(kvm_vcpu_events__bindgen_ty_3))
3166 );
3167 assert_eq!(
3168 unsafe {
3169 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_3>())).injected as *const _ as usize
3170 },
3171 0usize,
3172 concat!(
3173 "Offset of field: ",
3174 stringify!(kvm_vcpu_events__bindgen_ty_3),
3175 "::",
3176 stringify!(injected)
3177 )
3178 );
3179 assert_eq!(
3180 unsafe {
3181 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_3>())).pending as *const _ as usize
3182 },
3183 1usize,
3184 concat!(
3185 "Offset of field: ",
3186 stringify!(kvm_vcpu_events__bindgen_ty_3),
3187 "::",
3188 stringify!(pending)
3189 )
3190 );
3191 assert_eq!(
3192 unsafe {
3193 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_3>())).masked as *const _ as usize
3194 },
3195 2usize,
3196 concat!(
3197 "Offset of field: ",
3198 stringify!(kvm_vcpu_events__bindgen_ty_3),
3199 "::",
3200 stringify!(masked)
3201 )
3202 );
3203 assert_eq!(
3204 unsafe {
3205 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_3>())).pad as *const _ as usize
3206 },
3207 3usize,
3208 concat!(
3209 "Offset of field: ",
3210 stringify!(kvm_vcpu_events__bindgen_ty_3),
3211 "::",
3212 stringify!(pad)
3213 )
3214 );
3215 }
3216 #[repr(C)]
3217 #[derive(Debug, Default, Copy, Clone)]
3218 pub struct kvm_vcpu_events__bindgen_ty_4 {
3219 pub smm: __u8,
3220 pub pending: __u8,
3221 pub smm_inside_nmi: __u8,
3222 pub latched_init: __u8,
3223 }
3224 #[test]
bindgen_test_layout_kvm_vcpu_events__bindgen_ty_4()3225 fn bindgen_test_layout_kvm_vcpu_events__bindgen_ty_4() {
3226 assert_eq!(
3227 ::std::mem::size_of::<kvm_vcpu_events__bindgen_ty_4>(),
3228 4usize,
3229 concat!("Size of: ", stringify!(kvm_vcpu_events__bindgen_ty_4))
3230 );
3231 assert_eq!(
3232 ::std::mem::align_of::<kvm_vcpu_events__bindgen_ty_4>(),
3233 1usize,
3234 concat!("Alignment of ", stringify!(kvm_vcpu_events__bindgen_ty_4))
3235 );
3236 assert_eq!(
3237 unsafe {
3238 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_4>())).smm as *const _ as usize
3239 },
3240 0usize,
3241 concat!(
3242 "Offset of field: ",
3243 stringify!(kvm_vcpu_events__bindgen_ty_4),
3244 "::",
3245 stringify!(smm)
3246 )
3247 );
3248 assert_eq!(
3249 unsafe {
3250 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_4>())).pending as *const _ as usize
3251 },
3252 1usize,
3253 concat!(
3254 "Offset of field: ",
3255 stringify!(kvm_vcpu_events__bindgen_ty_4),
3256 "::",
3257 stringify!(pending)
3258 )
3259 );
3260 assert_eq!(
3261 unsafe {
3262 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_4>())).smm_inside_nmi as *const _
3263 as usize
3264 },
3265 2usize,
3266 concat!(
3267 "Offset of field: ",
3268 stringify!(kvm_vcpu_events__bindgen_ty_4),
3269 "::",
3270 stringify!(smm_inside_nmi)
3271 )
3272 );
3273 assert_eq!(
3274 unsafe {
3275 &(*(::std::ptr::null::<kvm_vcpu_events__bindgen_ty_4>())).latched_init as *const _
3276 as usize
3277 },
3278 3usize,
3279 concat!(
3280 "Offset of field: ",
3281 stringify!(kvm_vcpu_events__bindgen_ty_4),
3282 "::",
3283 stringify!(latched_init)
3284 )
3285 );
3286 }
3287 #[test]
bindgen_test_layout_kvm_vcpu_events()3288 fn bindgen_test_layout_kvm_vcpu_events() {
3289 assert_eq!(
3290 ::std::mem::size_of::<kvm_vcpu_events>(),
3291 64usize,
3292 concat!("Size of: ", stringify!(kvm_vcpu_events))
3293 );
3294 assert_eq!(
3295 ::std::mem::align_of::<kvm_vcpu_events>(),
3296 8usize,
3297 concat!("Alignment of ", stringify!(kvm_vcpu_events))
3298 );
3299 assert_eq!(
3300 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).exception as *const _ as usize },
3301 0usize,
3302 concat!(
3303 "Offset of field: ",
3304 stringify!(kvm_vcpu_events),
3305 "::",
3306 stringify!(exception)
3307 )
3308 );
3309 assert_eq!(
3310 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).interrupt as *const _ as usize },
3311 8usize,
3312 concat!(
3313 "Offset of field: ",
3314 stringify!(kvm_vcpu_events),
3315 "::",
3316 stringify!(interrupt)
3317 )
3318 );
3319 assert_eq!(
3320 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).nmi as *const _ as usize },
3321 12usize,
3322 concat!(
3323 "Offset of field: ",
3324 stringify!(kvm_vcpu_events),
3325 "::",
3326 stringify!(nmi)
3327 )
3328 );
3329 assert_eq!(
3330 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).sipi_vector as *const _ as usize },
3331 16usize,
3332 concat!(
3333 "Offset of field: ",
3334 stringify!(kvm_vcpu_events),
3335 "::",
3336 stringify!(sipi_vector)
3337 )
3338 );
3339 assert_eq!(
3340 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).flags as *const _ as usize },
3341 20usize,
3342 concat!(
3343 "Offset of field: ",
3344 stringify!(kvm_vcpu_events),
3345 "::",
3346 stringify!(flags)
3347 )
3348 );
3349 assert_eq!(
3350 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).smi as *const _ as usize },
3351 24usize,
3352 concat!(
3353 "Offset of field: ",
3354 stringify!(kvm_vcpu_events),
3355 "::",
3356 stringify!(smi)
3357 )
3358 );
3359 assert_eq!(
3360 unsafe { &(*(::std::ptr::null::<kvm_vcpu_events>())).reserved as *const _ as usize },
3361 28usize,
3362 concat!(
3363 "Offset of field: ",
3364 stringify!(kvm_vcpu_events),
3365 "::",
3366 stringify!(reserved)
3367 )
3368 );
3369 assert_eq!(
3370 unsafe {
3371 &(*(::std::ptr::null::<kvm_vcpu_events>())).exception_has_payload as *const _ as usize
3372 },
3373 55usize,
3374 concat!(
3375 "Offset of field: ",
3376 stringify!(kvm_vcpu_events),
3377 "::",
3378 stringify!(exception_has_payload)
3379 )
3380 );
3381 assert_eq!(
3382 unsafe {
3383 &(*(::std::ptr::null::<kvm_vcpu_events>())).exception_payload as *const _ as usize
3384 },
3385 56usize,
3386 concat!(
3387 "Offset of field: ",
3388 stringify!(kvm_vcpu_events),
3389 "::",
3390 stringify!(exception_payload)
3391 )
3392 );
3393 }
3394 #[repr(C)]
3395 #[derive(Debug, Default, Copy, Clone)]
3396 pub struct kvm_debugregs {
3397 pub db: [__u64; 4usize],
3398 pub dr6: __u64,
3399 pub dr7: __u64,
3400 pub flags: __u64,
3401 pub reserved: [__u64; 9usize],
3402 }
3403 #[test]
bindgen_test_layout_kvm_debugregs()3404 fn bindgen_test_layout_kvm_debugregs() {
3405 assert_eq!(
3406 ::std::mem::size_of::<kvm_debugregs>(),
3407 128usize,
3408 concat!("Size of: ", stringify!(kvm_debugregs))
3409 );
3410 assert_eq!(
3411 ::std::mem::align_of::<kvm_debugregs>(),
3412 8usize,
3413 concat!("Alignment of ", stringify!(kvm_debugregs))
3414 );
3415 assert_eq!(
3416 unsafe { &(*(::std::ptr::null::<kvm_debugregs>())).db as *const _ as usize },
3417 0usize,
3418 concat!(
3419 "Offset of field: ",
3420 stringify!(kvm_debugregs),
3421 "::",
3422 stringify!(db)
3423 )
3424 );
3425 assert_eq!(
3426 unsafe { &(*(::std::ptr::null::<kvm_debugregs>())).dr6 as *const _ as usize },
3427 32usize,
3428 concat!(
3429 "Offset of field: ",
3430 stringify!(kvm_debugregs),
3431 "::",
3432 stringify!(dr6)
3433 )
3434 );
3435 assert_eq!(
3436 unsafe { &(*(::std::ptr::null::<kvm_debugregs>())).dr7 as *const _ as usize },
3437 40usize,
3438 concat!(
3439 "Offset of field: ",
3440 stringify!(kvm_debugregs),
3441 "::",
3442 stringify!(dr7)
3443 )
3444 );
3445 assert_eq!(
3446 unsafe { &(*(::std::ptr::null::<kvm_debugregs>())).flags as *const _ as usize },
3447 48usize,
3448 concat!(
3449 "Offset of field: ",
3450 stringify!(kvm_debugregs),
3451 "::",
3452 stringify!(flags)
3453 )
3454 );
3455 assert_eq!(
3456 unsafe { &(*(::std::ptr::null::<kvm_debugregs>())).reserved as *const _ as usize },
3457 56usize,
3458 concat!(
3459 "Offset of field: ",
3460 stringify!(kvm_debugregs),
3461 "::",
3462 stringify!(reserved)
3463 )
3464 );
3465 }
3466 #[repr(C)]
3467 #[derive(Copy, Clone)]
3468 pub struct kvm_xsave {
3469 pub region: [__u32; 1024usize],
3470 }
3471 #[test]
bindgen_test_layout_kvm_xsave()3472 fn bindgen_test_layout_kvm_xsave() {
3473 assert_eq!(
3474 ::std::mem::size_of::<kvm_xsave>(),
3475 4096usize,
3476 concat!("Size of: ", stringify!(kvm_xsave))
3477 );
3478 assert_eq!(
3479 ::std::mem::align_of::<kvm_xsave>(),
3480 4usize,
3481 concat!("Alignment of ", stringify!(kvm_xsave))
3482 );
3483 assert_eq!(
3484 unsafe { &(*(::std::ptr::null::<kvm_xsave>())).region as *const _ as usize },
3485 0usize,
3486 concat!(
3487 "Offset of field: ",
3488 stringify!(kvm_xsave),
3489 "::",
3490 stringify!(region)
3491 )
3492 );
3493 }
3494 impl Default for kvm_xsave {
default() -> Self3495 fn default() -> Self {
3496 unsafe { ::std::mem::zeroed() }
3497 }
3498 }
3499 #[repr(C)]
3500 #[derive(Debug, Default, Copy, Clone)]
3501 pub struct kvm_xcr {
3502 pub xcr: __u32,
3503 pub reserved: __u32,
3504 pub value: __u64,
3505 }
3506 #[test]
bindgen_test_layout_kvm_xcr()3507 fn bindgen_test_layout_kvm_xcr() {
3508 assert_eq!(
3509 ::std::mem::size_of::<kvm_xcr>(),
3510 16usize,
3511 concat!("Size of: ", stringify!(kvm_xcr))
3512 );
3513 assert_eq!(
3514 ::std::mem::align_of::<kvm_xcr>(),
3515 8usize,
3516 concat!("Alignment of ", stringify!(kvm_xcr))
3517 );
3518 assert_eq!(
3519 unsafe { &(*(::std::ptr::null::<kvm_xcr>())).xcr as *const _ as usize },
3520 0usize,
3521 concat!(
3522 "Offset of field: ",
3523 stringify!(kvm_xcr),
3524 "::",
3525 stringify!(xcr)
3526 )
3527 );
3528 assert_eq!(
3529 unsafe { &(*(::std::ptr::null::<kvm_xcr>())).reserved as *const _ as usize },
3530 4usize,
3531 concat!(
3532 "Offset of field: ",
3533 stringify!(kvm_xcr),
3534 "::",
3535 stringify!(reserved)
3536 )
3537 );
3538 assert_eq!(
3539 unsafe { &(*(::std::ptr::null::<kvm_xcr>())).value as *const _ as usize },
3540 8usize,
3541 concat!(
3542 "Offset of field: ",
3543 stringify!(kvm_xcr),
3544 "::",
3545 stringify!(value)
3546 )
3547 );
3548 }
3549 #[repr(C)]
3550 #[derive(Debug, Default, Copy, Clone)]
3551 pub struct kvm_xcrs {
3552 pub nr_xcrs: __u32,
3553 pub flags: __u32,
3554 pub xcrs: [kvm_xcr; 16usize],
3555 pub padding: [__u64; 16usize],
3556 }
3557 #[test]
bindgen_test_layout_kvm_xcrs()3558 fn bindgen_test_layout_kvm_xcrs() {
3559 assert_eq!(
3560 ::std::mem::size_of::<kvm_xcrs>(),
3561 392usize,
3562 concat!("Size of: ", stringify!(kvm_xcrs))
3563 );
3564 assert_eq!(
3565 ::std::mem::align_of::<kvm_xcrs>(),
3566 8usize,
3567 concat!("Alignment of ", stringify!(kvm_xcrs))
3568 );
3569 assert_eq!(
3570 unsafe { &(*(::std::ptr::null::<kvm_xcrs>())).nr_xcrs as *const _ as usize },
3571 0usize,
3572 concat!(
3573 "Offset of field: ",
3574 stringify!(kvm_xcrs),
3575 "::",
3576 stringify!(nr_xcrs)
3577 )
3578 );
3579 assert_eq!(
3580 unsafe { &(*(::std::ptr::null::<kvm_xcrs>())).flags as *const _ as usize },
3581 4usize,
3582 concat!(
3583 "Offset of field: ",
3584 stringify!(kvm_xcrs),
3585 "::",
3586 stringify!(flags)
3587 )
3588 );
3589 assert_eq!(
3590 unsafe { &(*(::std::ptr::null::<kvm_xcrs>())).xcrs as *const _ as usize },
3591 8usize,
3592 concat!(
3593 "Offset of field: ",
3594 stringify!(kvm_xcrs),
3595 "::",
3596 stringify!(xcrs)
3597 )
3598 );
3599 assert_eq!(
3600 unsafe { &(*(::std::ptr::null::<kvm_xcrs>())).padding as *const _ as usize },
3601 264usize,
3602 concat!(
3603 "Offset of field: ",
3604 stringify!(kvm_xcrs),
3605 "::",
3606 stringify!(padding)
3607 )
3608 );
3609 }
3610 #[repr(C)]
3611 #[derive(Debug, Default, Copy, Clone)]
3612 pub struct kvm_sync_regs {
3613 pub regs: kvm_regs,
3614 pub sregs: kvm_sregs,
3615 pub events: kvm_vcpu_events,
3616 }
3617 #[test]
bindgen_test_layout_kvm_sync_regs()3618 fn bindgen_test_layout_kvm_sync_regs() {
3619 assert_eq!(
3620 ::std::mem::size_of::<kvm_sync_regs>(),
3621 520usize,
3622 concat!("Size of: ", stringify!(kvm_sync_regs))
3623 );
3624 assert_eq!(
3625 ::std::mem::align_of::<kvm_sync_regs>(),
3626 8usize,
3627 concat!("Alignment of ", stringify!(kvm_sync_regs))
3628 );
3629 assert_eq!(
3630 unsafe { &(*(::std::ptr::null::<kvm_sync_regs>())).regs as *const _ as usize },
3631 0usize,
3632 concat!(
3633 "Offset of field: ",
3634 stringify!(kvm_sync_regs),
3635 "::",
3636 stringify!(regs)
3637 )
3638 );
3639 assert_eq!(
3640 unsafe { &(*(::std::ptr::null::<kvm_sync_regs>())).sregs as *const _ as usize },
3641 144usize,
3642 concat!(
3643 "Offset of field: ",
3644 stringify!(kvm_sync_regs),
3645 "::",
3646 stringify!(sregs)
3647 )
3648 );
3649 assert_eq!(
3650 unsafe { &(*(::std::ptr::null::<kvm_sync_regs>())).events as *const _ as usize },
3651 456usize,
3652 concat!(
3653 "Offset of field: ",
3654 stringify!(kvm_sync_regs),
3655 "::",
3656 stringify!(events)
3657 )
3658 );
3659 }
3660 #[repr(C)]
3661 #[derive(Copy, Clone)]
3662 pub struct kvm_vmx_nested_state_data {
3663 pub vmcs12: [__u8; 4096usize],
3664 pub shadow_vmcs12: [__u8; 4096usize],
3665 }
3666 #[test]
bindgen_test_layout_kvm_vmx_nested_state_data()3667 fn bindgen_test_layout_kvm_vmx_nested_state_data() {
3668 assert_eq!(
3669 ::std::mem::size_of::<kvm_vmx_nested_state_data>(),
3670 8192usize,
3671 concat!("Size of: ", stringify!(kvm_vmx_nested_state_data))
3672 );
3673 assert_eq!(
3674 ::std::mem::align_of::<kvm_vmx_nested_state_data>(),
3675 1usize,
3676 concat!("Alignment of ", stringify!(kvm_vmx_nested_state_data))
3677 );
3678 assert_eq!(
3679 unsafe {
3680 &(*(::std::ptr::null::<kvm_vmx_nested_state_data>())).vmcs12 as *const _ as usize
3681 },
3682 0usize,
3683 concat!(
3684 "Offset of field: ",
3685 stringify!(kvm_vmx_nested_state_data),
3686 "::",
3687 stringify!(vmcs12)
3688 )
3689 );
3690 assert_eq!(
3691 unsafe {
3692 &(*(::std::ptr::null::<kvm_vmx_nested_state_data>())).shadow_vmcs12 as *const _ as usize
3693 },
3694 4096usize,
3695 concat!(
3696 "Offset of field: ",
3697 stringify!(kvm_vmx_nested_state_data),
3698 "::",
3699 stringify!(shadow_vmcs12)
3700 )
3701 );
3702 }
3703 impl Default for kvm_vmx_nested_state_data {
default() -> Self3704 fn default() -> Self {
3705 unsafe { ::std::mem::zeroed() }
3706 }
3707 }
3708 #[repr(C)]
3709 #[derive(Debug, Default, Copy, Clone)]
3710 pub struct kvm_vmx_nested_state_hdr {
3711 pub vmxon_pa: __u64,
3712 pub vmcs12_pa: __u64,
3713 pub smm: kvm_vmx_nested_state_hdr__bindgen_ty_1,
3714 }
3715 #[repr(C)]
3716 #[derive(Debug, Default, Copy, Clone)]
3717 pub struct kvm_vmx_nested_state_hdr__bindgen_ty_1 {
3718 pub flags: __u16,
3719 }
3720 #[test]
bindgen_test_layout_kvm_vmx_nested_state_hdr__bindgen_ty_1()3721 fn bindgen_test_layout_kvm_vmx_nested_state_hdr__bindgen_ty_1() {
3722 assert_eq!(
3723 ::std::mem::size_of::<kvm_vmx_nested_state_hdr__bindgen_ty_1>(),
3724 2usize,
3725 concat!(
3726 "Size of: ",
3727 stringify!(kvm_vmx_nested_state_hdr__bindgen_ty_1)
3728 )
3729 );
3730 assert_eq!(
3731 ::std::mem::align_of::<kvm_vmx_nested_state_hdr__bindgen_ty_1>(),
3732 2usize,
3733 concat!(
3734 "Alignment of ",
3735 stringify!(kvm_vmx_nested_state_hdr__bindgen_ty_1)
3736 )
3737 );
3738 assert_eq!(
3739 unsafe {
3740 &(*(::std::ptr::null::<kvm_vmx_nested_state_hdr__bindgen_ty_1>())).flags as *const _
3741 as usize
3742 },
3743 0usize,
3744 concat!(
3745 "Offset of field: ",
3746 stringify!(kvm_vmx_nested_state_hdr__bindgen_ty_1),
3747 "::",
3748 stringify!(flags)
3749 )
3750 );
3751 }
3752 #[test]
bindgen_test_layout_kvm_vmx_nested_state_hdr()3753 fn bindgen_test_layout_kvm_vmx_nested_state_hdr() {
3754 assert_eq!(
3755 ::std::mem::size_of::<kvm_vmx_nested_state_hdr>(),
3756 24usize,
3757 concat!("Size of: ", stringify!(kvm_vmx_nested_state_hdr))
3758 );
3759 assert_eq!(
3760 ::std::mem::align_of::<kvm_vmx_nested_state_hdr>(),
3761 8usize,
3762 concat!("Alignment of ", stringify!(kvm_vmx_nested_state_hdr))
3763 );
3764 assert_eq!(
3765 unsafe {
3766 &(*(::std::ptr::null::<kvm_vmx_nested_state_hdr>())).vmxon_pa as *const _ as usize
3767 },
3768 0usize,
3769 concat!(
3770 "Offset of field: ",
3771 stringify!(kvm_vmx_nested_state_hdr),
3772 "::",
3773 stringify!(vmxon_pa)
3774 )
3775 );
3776 assert_eq!(
3777 unsafe {
3778 &(*(::std::ptr::null::<kvm_vmx_nested_state_hdr>())).vmcs12_pa as *const _ as usize
3779 },
3780 8usize,
3781 concat!(
3782 "Offset of field: ",
3783 stringify!(kvm_vmx_nested_state_hdr),
3784 "::",
3785 stringify!(vmcs12_pa)
3786 )
3787 );
3788 assert_eq!(
3789 unsafe { &(*(::std::ptr::null::<kvm_vmx_nested_state_hdr>())).smm as *const _ as usize },
3790 16usize,
3791 concat!(
3792 "Offset of field: ",
3793 stringify!(kvm_vmx_nested_state_hdr),
3794 "::",
3795 stringify!(smm)
3796 )
3797 );
3798 }
3799 #[repr(C)]
3800 pub struct kvm_nested_state {
3801 pub flags: __u16,
3802 pub format: __u16,
3803 pub size: __u32,
3804 pub hdr: kvm_nested_state__bindgen_ty_1,
3805 pub data: kvm_nested_state__bindgen_ty_2,
3806 }
3807 #[repr(C)]
3808 #[derive(Copy, Clone)]
3809 pub union kvm_nested_state__bindgen_ty_1 {
3810 pub vmx: kvm_vmx_nested_state_hdr,
3811 pub pad: [__u8; 120usize],
3812 _bindgen_union_align: [u64; 15usize],
3813 }
3814 #[test]
bindgen_test_layout_kvm_nested_state__bindgen_ty_1()3815 fn bindgen_test_layout_kvm_nested_state__bindgen_ty_1() {
3816 assert_eq!(
3817 ::std::mem::size_of::<kvm_nested_state__bindgen_ty_1>(),
3818 120usize,
3819 concat!("Size of: ", stringify!(kvm_nested_state__bindgen_ty_1))
3820 );
3821 assert_eq!(
3822 ::std::mem::align_of::<kvm_nested_state__bindgen_ty_1>(),
3823 8usize,
3824 concat!("Alignment of ", stringify!(kvm_nested_state__bindgen_ty_1))
3825 );
3826 assert_eq!(
3827 unsafe {
3828 &(*(::std::ptr::null::<kvm_nested_state__bindgen_ty_1>())).vmx as *const _ as usize
3829 },
3830 0usize,
3831 concat!(
3832 "Offset of field: ",
3833 stringify!(kvm_nested_state__bindgen_ty_1),
3834 "::",
3835 stringify!(vmx)
3836 )
3837 );
3838 assert_eq!(
3839 unsafe {
3840 &(*(::std::ptr::null::<kvm_nested_state__bindgen_ty_1>())).pad as *const _ as usize
3841 },
3842 0usize,
3843 concat!(
3844 "Offset of field: ",
3845 stringify!(kvm_nested_state__bindgen_ty_1),
3846 "::",
3847 stringify!(pad)
3848 )
3849 );
3850 }
3851 impl Default for kvm_nested_state__bindgen_ty_1 {
default() -> Self3852 fn default() -> Self {
3853 unsafe { ::std::mem::zeroed() }
3854 }
3855 }
3856 #[repr(C)]
3857 pub struct kvm_nested_state__bindgen_ty_2 {
3858 pub vmx: __BindgenUnionField<[kvm_vmx_nested_state_data; 0usize]>,
3859 pub bindgen_union_field: [u8; 0usize],
3860 }
3861 #[test]
bindgen_test_layout_kvm_nested_state__bindgen_ty_2()3862 fn bindgen_test_layout_kvm_nested_state__bindgen_ty_2() {
3863 assert_eq!(
3864 ::std::mem::size_of::<kvm_nested_state__bindgen_ty_2>(),
3865 0usize,
3866 concat!("Size of: ", stringify!(kvm_nested_state__bindgen_ty_2))
3867 );
3868 assert_eq!(
3869 ::std::mem::align_of::<kvm_nested_state__bindgen_ty_2>(),
3870 1usize,
3871 concat!("Alignment of ", stringify!(kvm_nested_state__bindgen_ty_2))
3872 );
3873 assert_eq!(
3874 unsafe {
3875 &(*(::std::ptr::null::<kvm_nested_state__bindgen_ty_2>())).vmx as *const _ as usize
3876 },
3877 0usize,
3878 concat!(
3879 "Offset of field: ",
3880 stringify!(kvm_nested_state__bindgen_ty_2),
3881 "::",
3882 stringify!(vmx)
3883 )
3884 );
3885 }
3886 impl Default for kvm_nested_state__bindgen_ty_2 {
default() -> Self3887 fn default() -> Self {
3888 unsafe { ::std::mem::zeroed() }
3889 }
3890 }
3891 #[test]
bindgen_test_layout_kvm_nested_state()3892 fn bindgen_test_layout_kvm_nested_state() {
3893 assert_eq!(
3894 ::std::mem::size_of::<kvm_nested_state>(),
3895 128usize,
3896 concat!("Size of: ", stringify!(kvm_nested_state))
3897 );
3898 assert_eq!(
3899 ::std::mem::align_of::<kvm_nested_state>(),
3900 8usize,
3901 concat!("Alignment of ", stringify!(kvm_nested_state))
3902 );
3903 assert_eq!(
3904 unsafe { &(*(::std::ptr::null::<kvm_nested_state>())).flags as *const _ as usize },
3905 0usize,
3906 concat!(
3907 "Offset of field: ",
3908 stringify!(kvm_nested_state),
3909 "::",
3910 stringify!(flags)
3911 )
3912 );
3913 assert_eq!(
3914 unsafe { &(*(::std::ptr::null::<kvm_nested_state>())).format as *const _ as usize },
3915 2usize,
3916 concat!(
3917 "Offset of field: ",
3918 stringify!(kvm_nested_state),
3919 "::",
3920 stringify!(format)
3921 )
3922 );
3923 assert_eq!(
3924 unsafe { &(*(::std::ptr::null::<kvm_nested_state>())).size as *const _ as usize },
3925 4usize,
3926 concat!(
3927 "Offset of field: ",
3928 stringify!(kvm_nested_state),
3929 "::",
3930 stringify!(size)
3931 )
3932 );
3933 assert_eq!(
3934 unsafe { &(*(::std::ptr::null::<kvm_nested_state>())).hdr as *const _ as usize },
3935 8usize,
3936 concat!(
3937 "Offset of field: ",
3938 stringify!(kvm_nested_state),
3939 "::",
3940 stringify!(hdr)
3941 )
3942 );
3943 assert_eq!(
3944 unsafe { &(*(::std::ptr::null::<kvm_nested_state>())).data as *const _ as usize },
3945 128usize,
3946 concat!(
3947 "Offset of field: ",
3948 stringify!(kvm_nested_state),
3949 "::",
3950 stringify!(data)
3951 )
3952 );
3953 }
3954 impl Default for kvm_nested_state {
default() -> Self3955 fn default() -> Self {
3956 unsafe { ::std::mem::zeroed() }
3957 }
3958 }
3959 #[repr(C)]
3960 #[derive(Debug, Default)]
3961 pub struct kvm_pmu_event_filter {
3962 pub action: __u32,
3963 pub nevents: __u32,
3964 pub fixed_counter_bitmap: __u32,
3965 pub flags: __u32,
3966 pub pad: [__u32; 4usize],
3967 pub events: __IncompleteArrayField<__u64>,
3968 }
3969 #[test]
bindgen_test_layout_kvm_pmu_event_filter()3970 fn bindgen_test_layout_kvm_pmu_event_filter() {
3971 assert_eq!(
3972 ::std::mem::size_of::<kvm_pmu_event_filter>(),
3973 32usize,
3974 concat!("Size of: ", stringify!(kvm_pmu_event_filter))
3975 );
3976 assert_eq!(
3977 ::std::mem::align_of::<kvm_pmu_event_filter>(),
3978 8usize,
3979 concat!("Alignment of ", stringify!(kvm_pmu_event_filter))
3980 );
3981 assert_eq!(
3982 unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).action as *const _ as usize },
3983 0usize,
3984 concat!(
3985 "Offset of field: ",
3986 stringify!(kvm_pmu_event_filter),
3987 "::",
3988 stringify!(action)
3989 )
3990 );
3991 assert_eq!(
3992 unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).nevents as *const _ as usize },
3993 4usize,
3994 concat!(
3995 "Offset of field: ",
3996 stringify!(kvm_pmu_event_filter),
3997 "::",
3998 stringify!(nevents)
3999 )
4000 );
4001 assert_eq!(
4002 unsafe {
4003 &(*(::std::ptr::null::<kvm_pmu_event_filter>())).fixed_counter_bitmap as *const _
4004 as usize
4005 },
4006 8usize,
4007 concat!(
4008 "Offset of field: ",
4009 stringify!(kvm_pmu_event_filter),
4010 "::",
4011 stringify!(fixed_counter_bitmap)
4012 )
4013 );
4014 assert_eq!(
4015 unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).flags as *const _ as usize },
4016 12usize,
4017 concat!(
4018 "Offset of field: ",
4019 stringify!(kvm_pmu_event_filter),
4020 "::",
4021 stringify!(flags)
4022 )
4023 );
4024 assert_eq!(
4025 unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).pad as *const _ as usize },
4026 16usize,
4027 concat!(
4028 "Offset of field: ",
4029 stringify!(kvm_pmu_event_filter),
4030 "::",
4031 stringify!(pad)
4032 )
4033 );
4034 assert_eq!(
4035 unsafe { &(*(::std::ptr::null::<kvm_pmu_event_filter>())).events as *const _ as usize },
4036 32usize,
4037 concat!(
4038 "Offset of field: ",
4039 stringify!(kvm_pmu_event_filter),
4040 "::",
4041 stringify!(events)
4042 )
4043 );
4044 }
4045 #[repr(C)]
4046 #[derive(Debug, Default, Copy, Clone)]
4047 pub struct kvm_user_trace_setup {
4048 pub buf_size: __u32,
4049 pub buf_nr: __u32,
4050 }
4051 #[test]
bindgen_test_layout_kvm_user_trace_setup()4052 fn bindgen_test_layout_kvm_user_trace_setup() {
4053 assert_eq!(
4054 ::std::mem::size_of::<kvm_user_trace_setup>(),
4055 8usize,
4056 concat!("Size of: ", stringify!(kvm_user_trace_setup))
4057 );
4058 assert_eq!(
4059 ::std::mem::align_of::<kvm_user_trace_setup>(),
4060 4usize,
4061 concat!("Alignment of ", stringify!(kvm_user_trace_setup))
4062 );
4063 assert_eq!(
4064 unsafe { &(*(::std::ptr::null::<kvm_user_trace_setup>())).buf_size as *const _ as usize },
4065 0usize,
4066 concat!(
4067 "Offset of field: ",
4068 stringify!(kvm_user_trace_setup),
4069 "::",
4070 stringify!(buf_size)
4071 )
4072 );
4073 assert_eq!(
4074 unsafe { &(*(::std::ptr::null::<kvm_user_trace_setup>())).buf_nr as *const _ as usize },
4075 4usize,
4076 concat!(
4077 "Offset of field: ",
4078 stringify!(kvm_user_trace_setup),
4079 "::",
4080 stringify!(buf_nr)
4081 )
4082 );
4083 }
4084 #[repr(C)]
4085 #[derive(Debug, Default, Copy, Clone)]
4086 pub struct kvm_breakpoint {
4087 pub enabled: __u32,
4088 pub padding: __u32,
4089 pub address: __u64,
4090 }
4091 #[test]
bindgen_test_layout_kvm_breakpoint()4092 fn bindgen_test_layout_kvm_breakpoint() {
4093 assert_eq!(
4094 ::std::mem::size_of::<kvm_breakpoint>(),
4095 16usize,
4096 concat!("Size of: ", stringify!(kvm_breakpoint))
4097 );
4098 assert_eq!(
4099 ::std::mem::align_of::<kvm_breakpoint>(),
4100 8usize,
4101 concat!("Alignment of ", stringify!(kvm_breakpoint))
4102 );
4103 assert_eq!(
4104 unsafe { &(*(::std::ptr::null::<kvm_breakpoint>())).enabled as *const _ as usize },
4105 0usize,
4106 concat!(
4107 "Offset of field: ",
4108 stringify!(kvm_breakpoint),
4109 "::",
4110 stringify!(enabled)
4111 )
4112 );
4113 assert_eq!(
4114 unsafe { &(*(::std::ptr::null::<kvm_breakpoint>())).padding as *const _ as usize },
4115 4usize,
4116 concat!(
4117 "Offset of field: ",
4118 stringify!(kvm_breakpoint),
4119 "::",
4120 stringify!(padding)
4121 )
4122 );
4123 assert_eq!(
4124 unsafe { &(*(::std::ptr::null::<kvm_breakpoint>())).address as *const _ as usize },
4125 8usize,
4126 concat!(
4127 "Offset of field: ",
4128 stringify!(kvm_breakpoint),
4129 "::",
4130 stringify!(address)
4131 )
4132 );
4133 }
4134 #[repr(C)]
4135 #[derive(Debug, Default, Copy, Clone)]
4136 pub struct kvm_debug_guest {
4137 pub enabled: __u32,
4138 pub pad: __u32,
4139 pub breakpoints: [kvm_breakpoint; 4usize],
4140 pub singlestep: __u32,
4141 }
4142 #[test]
bindgen_test_layout_kvm_debug_guest()4143 fn bindgen_test_layout_kvm_debug_guest() {
4144 assert_eq!(
4145 ::std::mem::size_of::<kvm_debug_guest>(),
4146 80usize,
4147 concat!("Size of: ", stringify!(kvm_debug_guest))
4148 );
4149 assert_eq!(
4150 ::std::mem::align_of::<kvm_debug_guest>(),
4151 8usize,
4152 concat!("Alignment of ", stringify!(kvm_debug_guest))
4153 );
4154 assert_eq!(
4155 unsafe { &(*(::std::ptr::null::<kvm_debug_guest>())).enabled as *const _ as usize },
4156 0usize,
4157 concat!(
4158 "Offset of field: ",
4159 stringify!(kvm_debug_guest),
4160 "::",
4161 stringify!(enabled)
4162 )
4163 );
4164 assert_eq!(
4165 unsafe { &(*(::std::ptr::null::<kvm_debug_guest>())).pad as *const _ as usize },
4166 4usize,
4167 concat!(
4168 "Offset of field: ",
4169 stringify!(kvm_debug_guest),
4170 "::",
4171 stringify!(pad)
4172 )
4173 );
4174 assert_eq!(
4175 unsafe { &(*(::std::ptr::null::<kvm_debug_guest>())).breakpoints as *const _ as usize },
4176 8usize,
4177 concat!(
4178 "Offset of field: ",
4179 stringify!(kvm_debug_guest),
4180 "::",
4181 stringify!(breakpoints)
4182 )
4183 );
4184 assert_eq!(
4185 unsafe { &(*(::std::ptr::null::<kvm_debug_guest>())).singlestep as *const _ as usize },
4186 72usize,
4187 concat!(
4188 "Offset of field: ",
4189 stringify!(kvm_debug_guest),
4190 "::",
4191 stringify!(singlestep)
4192 )
4193 );
4194 }
4195 #[repr(C)]
4196 #[derive(Debug, Default, Copy, Clone)]
4197 pub struct kvm_memory_region {
4198 pub slot: __u32,
4199 pub flags: __u32,
4200 pub guest_phys_addr: __u64,
4201 pub memory_size: __u64,
4202 }
4203 #[test]
bindgen_test_layout_kvm_memory_region()4204 fn bindgen_test_layout_kvm_memory_region() {
4205 assert_eq!(
4206 ::std::mem::size_of::<kvm_memory_region>(),
4207 24usize,
4208 concat!("Size of: ", stringify!(kvm_memory_region))
4209 );
4210 assert_eq!(
4211 ::std::mem::align_of::<kvm_memory_region>(),
4212 8usize,
4213 concat!("Alignment of ", stringify!(kvm_memory_region))
4214 );
4215 assert_eq!(
4216 unsafe { &(*(::std::ptr::null::<kvm_memory_region>())).slot as *const _ as usize },
4217 0usize,
4218 concat!(
4219 "Offset of field: ",
4220 stringify!(kvm_memory_region),
4221 "::",
4222 stringify!(slot)
4223 )
4224 );
4225 assert_eq!(
4226 unsafe { &(*(::std::ptr::null::<kvm_memory_region>())).flags as *const _ as usize },
4227 4usize,
4228 concat!(
4229 "Offset of field: ",
4230 stringify!(kvm_memory_region),
4231 "::",
4232 stringify!(flags)
4233 )
4234 );
4235 assert_eq!(
4236 unsafe {
4237 &(*(::std::ptr::null::<kvm_memory_region>())).guest_phys_addr as *const _ as usize
4238 },
4239 8usize,
4240 concat!(
4241 "Offset of field: ",
4242 stringify!(kvm_memory_region),
4243 "::",
4244 stringify!(guest_phys_addr)
4245 )
4246 );
4247 assert_eq!(
4248 unsafe { &(*(::std::ptr::null::<kvm_memory_region>())).memory_size as *const _ as usize },
4249 16usize,
4250 concat!(
4251 "Offset of field: ",
4252 stringify!(kvm_memory_region),
4253 "::",
4254 stringify!(memory_size)
4255 )
4256 );
4257 }
4258 #[repr(C)]
4259 #[derive(Debug, Default, Copy, Clone)]
4260 pub struct kvm_userspace_memory_region {
4261 pub slot: __u32,
4262 pub flags: __u32,
4263 pub guest_phys_addr: __u64,
4264 pub memory_size: __u64,
4265 pub userspace_addr: __u64,
4266 }
4267 #[test]
bindgen_test_layout_kvm_userspace_memory_region()4268 fn bindgen_test_layout_kvm_userspace_memory_region() {
4269 assert_eq!(
4270 ::std::mem::size_of::<kvm_userspace_memory_region>(),
4271 32usize,
4272 concat!("Size of: ", stringify!(kvm_userspace_memory_region))
4273 );
4274 assert_eq!(
4275 ::std::mem::align_of::<kvm_userspace_memory_region>(),
4276 8usize,
4277 concat!("Alignment of ", stringify!(kvm_userspace_memory_region))
4278 );
4279 assert_eq!(
4280 unsafe {
4281 &(*(::std::ptr::null::<kvm_userspace_memory_region>())).slot as *const _ as usize
4282 },
4283 0usize,
4284 concat!(
4285 "Offset of field: ",
4286 stringify!(kvm_userspace_memory_region),
4287 "::",
4288 stringify!(slot)
4289 )
4290 );
4291 assert_eq!(
4292 unsafe {
4293 &(*(::std::ptr::null::<kvm_userspace_memory_region>())).flags as *const _ as usize
4294 },
4295 4usize,
4296 concat!(
4297 "Offset of field: ",
4298 stringify!(kvm_userspace_memory_region),
4299 "::",
4300 stringify!(flags)
4301 )
4302 );
4303 assert_eq!(
4304 unsafe {
4305 &(*(::std::ptr::null::<kvm_userspace_memory_region>())).guest_phys_addr as *const _
4306 as usize
4307 },
4308 8usize,
4309 concat!(
4310 "Offset of field: ",
4311 stringify!(kvm_userspace_memory_region),
4312 "::",
4313 stringify!(guest_phys_addr)
4314 )
4315 );
4316 assert_eq!(
4317 unsafe {
4318 &(*(::std::ptr::null::<kvm_userspace_memory_region>())).memory_size as *const _ as usize
4319 },
4320 16usize,
4321 concat!(
4322 "Offset of field: ",
4323 stringify!(kvm_userspace_memory_region),
4324 "::",
4325 stringify!(memory_size)
4326 )
4327 );
4328 assert_eq!(
4329 unsafe {
4330 &(*(::std::ptr::null::<kvm_userspace_memory_region>())).userspace_addr as *const _
4331 as usize
4332 },
4333 24usize,
4334 concat!(
4335 "Offset of field: ",
4336 stringify!(kvm_userspace_memory_region),
4337 "::",
4338 stringify!(userspace_addr)
4339 )
4340 );
4341 }
4342 #[repr(C)]
4343 #[derive(Copy, Clone)]
4344 pub struct kvm_irq_level {
4345 pub __bindgen_anon_1: kvm_irq_level__bindgen_ty_1,
4346 pub level: __u32,
4347 }
4348 #[repr(C)]
4349 #[derive(Copy, Clone)]
4350 pub union kvm_irq_level__bindgen_ty_1 {
4351 pub irq: __u32,
4352 pub status: __s32,
4353 _bindgen_union_align: u32,
4354 }
4355 #[test]
bindgen_test_layout_kvm_irq_level__bindgen_ty_1()4356 fn bindgen_test_layout_kvm_irq_level__bindgen_ty_1() {
4357 assert_eq!(
4358 ::std::mem::size_of::<kvm_irq_level__bindgen_ty_1>(),
4359 4usize,
4360 concat!("Size of: ", stringify!(kvm_irq_level__bindgen_ty_1))
4361 );
4362 assert_eq!(
4363 ::std::mem::align_of::<kvm_irq_level__bindgen_ty_1>(),
4364 4usize,
4365 concat!("Alignment of ", stringify!(kvm_irq_level__bindgen_ty_1))
4366 );
4367 assert_eq!(
4368 unsafe { &(*(::std::ptr::null::<kvm_irq_level__bindgen_ty_1>())).irq as *const _ as usize },
4369 0usize,
4370 concat!(
4371 "Offset of field: ",
4372 stringify!(kvm_irq_level__bindgen_ty_1),
4373 "::",
4374 stringify!(irq)
4375 )
4376 );
4377 assert_eq!(
4378 unsafe {
4379 &(*(::std::ptr::null::<kvm_irq_level__bindgen_ty_1>())).status as *const _ as usize
4380 },
4381 0usize,
4382 concat!(
4383 "Offset of field: ",
4384 stringify!(kvm_irq_level__bindgen_ty_1),
4385 "::",
4386 stringify!(status)
4387 )
4388 );
4389 }
4390 impl Default for kvm_irq_level__bindgen_ty_1 {
default() -> Self4391 fn default() -> Self {
4392 unsafe { ::std::mem::zeroed() }
4393 }
4394 }
4395 #[test]
bindgen_test_layout_kvm_irq_level()4396 fn bindgen_test_layout_kvm_irq_level() {
4397 assert_eq!(
4398 ::std::mem::size_of::<kvm_irq_level>(),
4399 8usize,
4400 concat!("Size of: ", stringify!(kvm_irq_level))
4401 );
4402 assert_eq!(
4403 ::std::mem::align_of::<kvm_irq_level>(),
4404 4usize,
4405 concat!("Alignment of ", stringify!(kvm_irq_level))
4406 );
4407 assert_eq!(
4408 unsafe { &(*(::std::ptr::null::<kvm_irq_level>())).level as *const _ as usize },
4409 4usize,
4410 concat!(
4411 "Offset of field: ",
4412 stringify!(kvm_irq_level),
4413 "::",
4414 stringify!(level)
4415 )
4416 );
4417 }
4418 impl Default for kvm_irq_level {
default() -> Self4419 fn default() -> Self {
4420 unsafe { ::std::mem::zeroed() }
4421 }
4422 }
4423 #[repr(C)]
4424 #[derive(Copy, Clone)]
4425 pub struct kvm_irqchip {
4426 pub chip_id: __u32,
4427 pub pad: __u32,
4428 pub chip: kvm_irqchip__bindgen_ty_1,
4429 }
4430 #[repr(C)]
4431 #[derive(Copy, Clone)]
4432 pub union kvm_irqchip__bindgen_ty_1 {
4433 pub dummy: [::std::os::raw::c_char; 512usize],
4434 pub pic: kvm_pic_state,
4435 pub ioapic: kvm_ioapic_state,
4436 _bindgen_union_align: [u64; 64usize],
4437 }
4438 #[test]
bindgen_test_layout_kvm_irqchip__bindgen_ty_1()4439 fn bindgen_test_layout_kvm_irqchip__bindgen_ty_1() {
4440 assert_eq!(
4441 ::std::mem::size_of::<kvm_irqchip__bindgen_ty_1>(),
4442 512usize,
4443 concat!("Size of: ", stringify!(kvm_irqchip__bindgen_ty_1))
4444 );
4445 assert_eq!(
4446 ::std::mem::align_of::<kvm_irqchip__bindgen_ty_1>(),
4447 8usize,
4448 concat!("Alignment of ", stringify!(kvm_irqchip__bindgen_ty_1))
4449 );
4450 assert_eq!(
4451 unsafe { &(*(::std::ptr::null::<kvm_irqchip__bindgen_ty_1>())).dummy as *const _ as usize },
4452 0usize,
4453 concat!(
4454 "Offset of field: ",
4455 stringify!(kvm_irqchip__bindgen_ty_1),
4456 "::",
4457 stringify!(dummy)
4458 )
4459 );
4460 assert_eq!(
4461 unsafe { &(*(::std::ptr::null::<kvm_irqchip__bindgen_ty_1>())).pic as *const _ as usize },
4462 0usize,
4463 concat!(
4464 "Offset of field: ",
4465 stringify!(kvm_irqchip__bindgen_ty_1),
4466 "::",
4467 stringify!(pic)
4468 )
4469 );
4470 assert_eq!(
4471 unsafe {
4472 &(*(::std::ptr::null::<kvm_irqchip__bindgen_ty_1>())).ioapic as *const _ as usize
4473 },
4474 0usize,
4475 concat!(
4476 "Offset of field: ",
4477 stringify!(kvm_irqchip__bindgen_ty_1),
4478 "::",
4479 stringify!(ioapic)
4480 )
4481 );
4482 }
4483 impl Default for kvm_irqchip__bindgen_ty_1 {
default() -> Self4484 fn default() -> Self {
4485 unsafe { ::std::mem::zeroed() }
4486 }
4487 }
4488 #[test]
bindgen_test_layout_kvm_irqchip()4489 fn bindgen_test_layout_kvm_irqchip() {
4490 assert_eq!(
4491 ::std::mem::size_of::<kvm_irqchip>(),
4492 520usize,
4493 concat!("Size of: ", stringify!(kvm_irqchip))
4494 );
4495 assert_eq!(
4496 ::std::mem::align_of::<kvm_irqchip>(),
4497 8usize,
4498 concat!("Alignment of ", stringify!(kvm_irqchip))
4499 );
4500 assert_eq!(
4501 unsafe { &(*(::std::ptr::null::<kvm_irqchip>())).chip_id as *const _ as usize },
4502 0usize,
4503 concat!(
4504 "Offset of field: ",
4505 stringify!(kvm_irqchip),
4506 "::",
4507 stringify!(chip_id)
4508 )
4509 );
4510 assert_eq!(
4511 unsafe { &(*(::std::ptr::null::<kvm_irqchip>())).pad as *const _ as usize },
4512 4usize,
4513 concat!(
4514 "Offset of field: ",
4515 stringify!(kvm_irqchip),
4516 "::",
4517 stringify!(pad)
4518 )
4519 );
4520 assert_eq!(
4521 unsafe { &(*(::std::ptr::null::<kvm_irqchip>())).chip as *const _ as usize },
4522 8usize,
4523 concat!(
4524 "Offset of field: ",
4525 stringify!(kvm_irqchip),
4526 "::",
4527 stringify!(chip)
4528 )
4529 );
4530 }
4531 impl Default for kvm_irqchip {
default() -> Self4532 fn default() -> Self {
4533 unsafe { ::std::mem::zeroed() }
4534 }
4535 }
4536 #[repr(C)]
4537 #[derive(Debug, Default, Copy, Clone)]
4538 pub struct kvm_pit_config {
4539 pub flags: __u32,
4540 pub pad: [__u32; 15usize],
4541 }
4542 #[test]
bindgen_test_layout_kvm_pit_config()4543 fn bindgen_test_layout_kvm_pit_config() {
4544 assert_eq!(
4545 ::std::mem::size_of::<kvm_pit_config>(),
4546 64usize,
4547 concat!("Size of: ", stringify!(kvm_pit_config))
4548 );
4549 assert_eq!(
4550 ::std::mem::align_of::<kvm_pit_config>(),
4551 4usize,
4552 concat!("Alignment of ", stringify!(kvm_pit_config))
4553 );
4554 assert_eq!(
4555 unsafe { &(*(::std::ptr::null::<kvm_pit_config>())).flags as *const _ as usize },
4556 0usize,
4557 concat!(
4558 "Offset of field: ",
4559 stringify!(kvm_pit_config),
4560 "::",
4561 stringify!(flags)
4562 )
4563 );
4564 assert_eq!(
4565 unsafe { &(*(::std::ptr::null::<kvm_pit_config>())).pad as *const _ as usize },
4566 4usize,
4567 concat!(
4568 "Offset of field: ",
4569 stringify!(kvm_pit_config),
4570 "::",
4571 stringify!(pad)
4572 )
4573 );
4574 }
4575 #[repr(C)]
4576 #[derive(Debug, Default, Copy, Clone)]
4577 pub struct kvm_s390_skeys {
4578 pub start_gfn: __u64,
4579 pub count: __u64,
4580 pub skeydata_addr: __u64,
4581 pub flags: __u32,
4582 pub reserved: [__u32; 9usize],
4583 }
4584 #[test]
bindgen_test_layout_kvm_s390_skeys()4585 fn bindgen_test_layout_kvm_s390_skeys() {
4586 assert_eq!(
4587 ::std::mem::size_of::<kvm_s390_skeys>(),
4588 64usize,
4589 concat!("Size of: ", stringify!(kvm_s390_skeys))
4590 );
4591 assert_eq!(
4592 ::std::mem::align_of::<kvm_s390_skeys>(),
4593 8usize,
4594 concat!("Alignment of ", stringify!(kvm_s390_skeys))
4595 );
4596 assert_eq!(
4597 unsafe { &(*(::std::ptr::null::<kvm_s390_skeys>())).start_gfn as *const _ as usize },
4598 0usize,
4599 concat!(
4600 "Offset of field: ",
4601 stringify!(kvm_s390_skeys),
4602 "::",
4603 stringify!(start_gfn)
4604 )
4605 );
4606 assert_eq!(
4607 unsafe { &(*(::std::ptr::null::<kvm_s390_skeys>())).count as *const _ as usize },
4608 8usize,
4609 concat!(
4610 "Offset of field: ",
4611 stringify!(kvm_s390_skeys),
4612 "::",
4613 stringify!(count)
4614 )
4615 );
4616 assert_eq!(
4617 unsafe { &(*(::std::ptr::null::<kvm_s390_skeys>())).skeydata_addr as *const _ as usize },
4618 16usize,
4619 concat!(
4620 "Offset of field: ",
4621 stringify!(kvm_s390_skeys),
4622 "::",
4623 stringify!(skeydata_addr)
4624 )
4625 );
4626 assert_eq!(
4627 unsafe { &(*(::std::ptr::null::<kvm_s390_skeys>())).flags as *const _ as usize },
4628 24usize,
4629 concat!(
4630 "Offset of field: ",
4631 stringify!(kvm_s390_skeys),
4632 "::",
4633 stringify!(flags)
4634 )
4635 );
4636 assert_eq!(
4637 unsafe { &(*(::std::ptr::null::<kvm_s390_skeys>())).reserved as *const _ as usize },
4638 28usize,
4639 concat!(
4640 "Offset of field: ",
4641 stringify!(kvm_s390_skeys),
4642 "::",
4643 stringify!(reserved)
4644 )
4645 );
4646 }
4647 #[doc = " kvm_s390_cmma_log - Used for CMMA migration."]
4648 #[doc = ""]
4649 #[doc = " Used both for input and output."]
4650 #[doc = ""]
4651 #[doc = " @start_gfn: Guest page number to start from."]
4652 #[doc = " @count: Size of the result buffer."]
4653 #[doc = " @flags: Control operation mode via KVM_S390_CMMA_* flags"]
4654 #[doc = " @remaining: Used with KVM_S390_GET_CMMA_BITS. Indicates how many dirty"]
4655 #[doc = " pages are still remaining."]
4656 #[doc = " @mask: Used with KVM_S390_SET_CMMA_BITS. Bitmap of bits to actually set"]
4657 #[doc = " in the PGSTE."]
4658 #[doc = " @values: Pointer to the values buffer."]
4659 #[doc = ""]
4660 #[doc = " Used in KVM_S390_{G,S}ET_CMMA_BITS ioctls."]
4661 #[repr(C)]
4662 #[derive(Copy, Clone)]
4663 pub struct kvm_s390_cmma_log {
4664 pub start_gfn: __u64,
4665 pub count: __u32,
4666 pub flags: __u32,
4667 pub __bindgen_anon_1: kvm_s390_cmma_log__bindgen_ty_1,
4668 pub values: __u64,
4669 }
4670 #[repr(C)]
4671 #[derive(Copy, Clone)]
4672 pub union kvm_s390_cmma_log__bindgen_ty_1 {
4673 pub remaining: __u64,
4674 pub mask: __u64,
4675 _bindgen_union_align: u64,
4676 }
4677 #[test]
bindgen_test_layout_kvm_s390_cmma_log__bindgen_ty_1()4678 fn bindgen_test_layout_kvm_s390_cmma_log__bindgen_ty_1() {
4679 assert_eq!(
4680 ::std::mem::size_of::<kvm_s390_cmma_log__bindgen_ty_1>(),
4681 8usize,
4682 concat!("Size of: ", stringify!(kvm_s390_cmma_log__bindgen_ty_1))
4683 );
4684 assert_eq!(
4685 ::std::mem::align_of::<kvm_s390_cmma_log__bindgen_ty_1>(),
4686 8usize,
4687 concat!("Alignment of ", stringify!(kvm_s390_cmma_log__bindgen_ty_1))
4688 );
4689 assert_eq!(
4690 unsafe {
4691 &(*(::std::ptr::null::<kvm_s390_cmma_log__bindgen_ty_1>())).remaining as *const _
4692 as usize
4693 },
4694 0usize,
4695 concat!(
4696 "Offset of field: ",
4697 stringify!(kvm_s390_cmma_log__bindgen_ty_1),
4698 "::",
4699 stringify!(remaining)
4700 )
4701 );
4702 assert_eq!(
4703 unsafe {
4704 &(*(::std::ptr::null::<kvm_s390_cmma_log__bindgen_ty_1>())).mask as *const _ as usize
4705 },
4706 0usize,
4707 concat!(
4708 "Offset of field: ",
4709 stringify!(kvm_s390_cmma_log__bindgen_ty_1),
4710 "::",
4711 stringify!(mask)
4712 )
4713 );
4714 }
4715 impl Default for kvm_s390_cmma_log__bindgen_ty_1 {
default() -> Self4716 fn default() -> Self {
4717 unsafe { ::std::mem::zeroed() }
4718 }
4719 }
4720 #[test]
bindgen_test_layout_kvm_s390_cmma_log()4721 fn bindgen_test_layout_kvm_s390_cmma_log() {
4722 assert_eq!(
4723 ::std::mem::size_of::<kvm_s390_cmma_log>(),
4724 32usize,
4725 concat!("Size of: ", stringify!(kvm_s390_cmma_log))
4726 );
4727 assert_eq!(
4728 ::std::mem::align_of::<kvm_s390_cmma_log>(),
4729 8usize,
4730 concat!("Alignment of ", stringify!(kvm_s390_cmma_log))
4731 );
4732 assert_eq!(
4733 unsafe { &(*(::std::ptr::null::<kvm_s390_cmma_log>())).start_gfn as *const _ as usize },
4734 0usize,
4735 concat!(
4736 "Offset of field: ",
4737 stringify!(kvm_s390_cmma_log),
4738 "::",
4739 stringify!(start_gfn)
4740 )
4741 );
4742 assert_eq!(
4743 unsafe { &(*(::std::ptr::null::<kvm_s390_cmma_log>())).count as *const _ as usize },
4744 8usize,
4745 concat!(
4746 "Offset of field: ",
4747 stringify!(kvm_s390_cmma_log),
4748 "::",
4749 stringify!(count)
4750 )
4751 );
4752 assert_eq!(
4753 unsafe { &(*(::std::ptr::null::<kvm_s390_cmma_log>())).flags as *const _ as usize },
4754 12usize,
4755 concat!(
4756 "Offset of field: ",
4757 stringify!(kvm_s390_cmma_log),
4758 "::",
4759 stringify!(flags)
4760 )
4761 );
4762 assert_eq!(
4763 unsafe { &(*(::std::ptr::null::<kvm_s390_cmma_log>())).values as *const _ as usize },
4764 24usize,
4765 concat!(
4766 "Offset of field: ",
4767 stringify!(kvm_s390_cmma_log),
4768 "::",
4769 stringify!(values)
4770 )
4771 );
4772 }
4773 impl Default for kvm_s390_cmma_log {
default() -> Self4774 fn default() -> Self {
4775 unsafe { ::std::mem::zeroed() }
4776 }
4777 }
4778 #[repr(C)]
4779 #[derive(Copy, Clone)]
4780 pub struct kvm_hyperv_exit {
4781 pub type_: __u32,
4782 pub pad1: __u32,
4783 pub u: kvm_hyperv_exit__bindgen_ty_1,
4784 }
4785 #[repr(C)]
4786 #[derive(Copy, Clone)]
4787 pub union kvm_hyperv_exit__bindgen_ty_1 {
4788 pub synic: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1,
4789 pub hcall: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2,
4790 _bindgen_union_align: [u64; 4usize],
4791 }
4792 #[repr(C)]
4793 #[derive(Debug, Default, Copy, Clone)]
4794 pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1 {
4795 pub msr: __u32,
4796 pub pad2: __u32,
4797 pub control: __u64,
4798 pub evt_page: __u64,
4799 pub msg_page: __u64,
4800 }
4801 #[test]
bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1()4802 fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1() {
4803 assert_eq!(
4804 ::std::mem::size_of::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>(),
4805 32usize,
4806 concat!(
4807 "Size of: ",
4808 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1)
4809 )
4810 );
4811 assert_eq!(
4812 ::std::mem::align_of::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>(),
4813 8usize,
4814 concat!(
4815 "Alignment of ",
4816 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1)
4817 )
4818 );
4819 assert_eq!(
4820 unsafe {
4821 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>())).msr as *const _
4822 as usize
4823 },
4824 0usize,
4825 concat!(
4826 "Offset of field: ",
4827 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1),
4828 "::",
4829 stringify!(msr)
4830 )
4831 );
4832 assert_eq!(
4833 unsafe {
4834 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>())).pad2 as *const _
4835 as usize
4836 },
4837 4usize,
4838 concat!(
4839 "Offset of field: ",
4840 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1),
4841 "::",
4842 stringify!(pad2)
4843 )
4844 );
4845 assert_eq!(
4846 unsafe {
4847 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>())).control
4848 as *const _ as usize
4849 },
4850 8usize,
4851 concat!(
4852 "Offset of field: ",
4853 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1),
4854 "::",
4855 stringify!(control)
4856 )
4857 );
4858 assert_eq!(
4859 unsafe {
4860 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>())).evt_page
4861 as *const _ as usize
4862 },
4863 16usize,
4864 concat!(
4865 "Offset of field: ",
4866 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1),
4867 "::",
4868 stringify!(evt_page)
4869 )
4870 );
4871 assert_eq!(
4872 unsafe {
4873 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1>())).msg_page
4874 as *const _ as usize
4875 },
4876 24usize,
4877 concat!(
4878 "Offset of field: ",
4879 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1),
4880 "::",
4881 stringify!(msg_page)
4882 )
4883 );
4884 }
4885 #[repr(C)]
4886 #[derive(Debug, Default, Copy, Clone)]
4887 pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2 {
4888 pub input: __u64,
4889 pub result: __u64,
4890 pub params: [__u64; 2usize],
4891 }
4892 #[test]
bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2()4893 fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2() {
4894 assert_eq!(
4895 ::std::mem::size_of::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2>(),
4896 32usize,
4897 concat!(
4898 "Size of: ",
4899 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2)
4900 )
4901 );
4902 assert_eq!(
4903 ::std::mem::align_of::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2>(),
4904 8usize,
4905 concat!(
4906 "Alignment of ",
4907 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2)
4908 )
4909 );
4910 assert_eq!(
4911 unsafe {
4912 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2>())).input
4913 as *const _ as usize
4914 },
4915 0usize,
4916 concat!(
4917 "Offset of field: ",
4918 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2),
4919 "::",
4920 stringify!(input)
4921 )
4922 );
4923 assert_eq!(
4924 unsafe {
4925 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2>())).result
4926 as *const _ as usize
4927 },
4928 8usize,
4929 concat!(
4930 "Offset of field: ",
4931 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2),
4932 "::",
4933 stringify!(result)
4934 )
4935 );
4936 assert_eq!(
4937 unsafe {
4938 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2>())).params
4939 as *const _ as usize
4940 },
4941 16usize,
4942 concat!(
4943 "Offset of field: ",
4944 stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2),
4945 "::",
4946 stringify!(params)
4947 )
4948 );
4949 }
4950 #[test]
bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1()4951 fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1() {
4952 assert_eq!(
4953 ::std::mem::size_of::<kvm_hyperv_exit__bindgen_ty_1>(),
4954 32usize,
4955 concat!("Size of: ", stringify!(kvm_hyperv_exit__bindgen_ty_1))
4956 );
4957 assert_eq!(
4958 ::std::mem::align_of::<kvm_hyperv_exit__bindgen_ty_1>(),
4959 8usize,
4960 concat!("Alignment of ", stringify!(kvm_hyperv_exit__bindgen_ty_1))
4961 );
4962 assert_eq!(
4963 unsafe {
4964 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1>())).synic as *const _ as usize
4965 },
4966 0usize,
4967 concat!(
4968 "Offset of field: ",
4969 stringify!(kvm_hyperv_exit__bindgen_ty_1),
4970 "::",
4971 stringify!(synic)
4972 )
4973 );
4974 assert_eq!(
4975 unsafe {
4976 &(*(::std::ptr::null::<kvm_hyperv_exit__bindgen_ty_1>())).hcall as *const _ as usize
4977 },
4978 0usize,
4979 concat!(
4980 "Offset of field: ",
4981 stringify!(kvm_hyperv_exit__bindgen_ty_1),
4982 "::",
4983 stringify!(hcall)
4984 )
4985 );
4986 }
4987 impl Default for kvm_hyperv_exit__bindgen_ty_1 {
default() -> Self4988 fn default() -> Self {
4989 unsafe { ::std::mem::zeroed() }
4990 }
4991 }
4992 #[test]
bindgen_test_layout_kvm_hyperv_exit()4993 fn bindgen_test_layout_kvm_hyperv_exit() {
4994 assert_eq!(
4995 ::std::mem::size_of::<kvm_hyperv_exit>(),
4996 40usize,
4997 concat!("Size of: ", stringify!(kvm_hyperv_exit))
4998 );
4999 assert_eq!(
5000 ::std::mem::align_of::<kvm_hyperv_exit>(),
5001 8usize,
5002 concat!("Alignment of ", stringify!(kvm_hyperv_exit))
5003 );
5004 assert_eq!(
5005 unsafe { &(*(::std::ptr::null::<kvm_hyperv_exit>())).type_ as *const _ as usize },
5006 0usize,
5007 concat!(
5008 "Offset of field: ",
5009 stringify!(kvm_hyperv_exit),
5010 "::",
5011 stringify!(type_)
5012 )
5013 );
5014 assert_eq!(
5015 unsafe { &(*(::std::ptr::null::<kvm_hyperv_exit>())).pad1 as *const _ as usize },
5016 4usize,
5017 concat!(
5018 "Offset of field: ",
5019 stringify!(kvm_hyperv_exit),
5020 "::",
5021 stringify!(pad1)
5022 )
5023 );
5024 assert_eq!(
5025 unsafe { &(*(::std::ptr::null::<kvm_hyperv_exit>())).u as *const _ as usize },
5026 8usize,
5027 concat!(
5028 "Offset of field: ",
5029 stringify!(kvm_hyperv_exit),
5030 "::",
5031 stringify!(u)
5032 )
5033 );
5034 }
5035 impl Default for kvm_hyperv_exit {
default() -> Self5036 fn default() -> Self {
5037 unsafe { ::std::mem::zeroed() }
5038 }
5039 }
5040 #[repr(C)]
5041 #[derive(Copy, Clone)]
5042 pub struct kvm_run {
5043 pub request_interrupt_window: __u8,
5044 pub immediate_exit: __u8,
5045 pub padding1: [__u8; 6usize],
5046 pub exit_reason: __u32,
5047 pub ready_for_interrupt_injection: __u8,
5048 pub if_flag: __u8,
5049 pub flags: __u16,
5050 pub cr8: __u64,
5051 pub apic_base: __u64,
5052 pub __bindgen_anon_1: kvm_run__bindgen_ty_1,
5053 pub kvm_valid_regs: __u64,
5054 pub kvm_dirty_regs: __u64,
5055 pub s: kvm_run__bindgen_ty_2,
5056 }
5057 #[repr(C)]
5058 #[derive(Copy, Clone)]
5059 pub union kvm_run__bindgen_ty_1 {
5060 pub hw: kvm_run__bindgen_ty_1__bindgen_ty_1,
5061 pub fail_entry: kvm_run__bindgen_ty_1__bindgen_ty_2,
5062 pub ex: kvm_run__bindgen_ty_1__bindgen_ty_3,
5063 pub io: kvm_run__bindgen_ty_1__bindgen_ty_4,
5064 pub debug: kvm_run__bindgen_ty_1__bindgen_ty_5,
5065 pub mmio: kvm_run__bindgen_ty_1__bindgen_ty_6,
5066 pub hypercall: kvm_run__bindgen_ty_1__bindgen_ty_7,
5067 pub tpr_access: kvm_run__bindgen_ty_1__bindgen_ty_8,
5068 pub s390_sieic: kvm_run__bindgen_ty_1__bindgen_ty_9,
5069 pub s390_reset_flags: __u64,
5070 pub s390_ucontrol: kvm_run__bindgen_ty_1__bindgen_ty_10,
5071 pub dcr: kvm_run__bindgen_ty_1__bindgen_ty_11,
5072 pub internal: kvm_run__bindgen_ty_1__bindgen_ty_12,
5073 pub osi: kvm_run__bindgen_ty_1__bindgen_ty_13,
5074 pub papr_hcall: kvm_run__bindgen_ty_1__bindgen_ty_14,
5075 pub s390_tsch: kvm_run__bindgen_ty_1__bindgen_ty_15,
5076 pub epr: kvm_run__bindgen_ty_1__bindgen_ty_16,
5077 pub system_event: kvm_run__bindgen_ty_1__bindgen_ty_17,
5078 pub s390_stsi: kvm_run__bindgen_ty_1__bindgen_ty_18,
5079 pub eoi: kvm_run__bindgen_ty_1__bindgen_ty_19,
5080 pub hyperv: kvm_hyperv_exit,
5081 pub padding: [::std::os::raw::c_char; 256usize],
5082 _bindgen_union_align: [u64; 32usize],
5083 }
5084 #[repr(C)]
5085 #[derive(Debug, Default, Copy, Clone)]
5086 pub struct kvm_run__bindgen_ty_1__bindgen_ty_1 {
5087 pub hardware_exit_reason: __u64,
5088 }
5089 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_1()5090 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_1() {
5091 assert_eq!(
5092 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_1>(),
5093 8usize,
5094 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_1))
5095 );
5096 assert_eq!(
5097 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_1>(),
5098 8usize,
5099 concat!(
5100 "Alignment of ",
5101 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_1)
5102 )
5103 );
5104 assert_eq!(
5105 unsafe {
5106 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_1>())).hardware_exit_reason
5107 as *const _ as usize
5108 },
5109 0usize,
5110 concat!(
5111 "Offset of field: ",
5112 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_1),
5113 "::",
5114 stringify!(hardware_exit_reason)
5115 )
5116 );
5117 }
5118 #[repr(C)]
5119 #[derive(Debug, Default, Copy, Clone)]
5120 pub struct kvm_run__bindgen_ty_1__bindgen_ty_2 {
5121 pub hardware_entry_failure_reason: __u64,
5122 }
5123 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_2()5124 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_2() {
5125 assert_eq!(
5126 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_2>(),
5127 8usize,
5128 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2))
5129 );
5130 assert_eq!(
5131 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_2>(),
5132 8usize,
5133 concat!(
5134 "Alignment of ",
5135 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2)
5136 )
5137 );
5138 assert_eq!(
5139 unsafe {
5140 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_2>()))
5141 .hardware_entry_failure_reason as *const _ as usize
5142 },
5143 0usize,
5144 concat!(
5145 "Offset of field: ",
5146 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2),
5147 "::",
5148 stringify!(hardware_entry_failure_reason)
5149 )
5150 );
5151 }
5152 #[repr(C)]
5153 #[derive(Debug, Default, Copy, Clone)]
5154 pub struct kvm_run__bindgen_ty_1__bindgen_ty_3 {
5155 pub exception: __u32,
5156 pub error_code: __u32,
5157 }
5158 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_3()5159 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_3() {
5160 assert_eq!(
5161 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_3>(),
5162 8usize,
5163 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3))
5164 );
5165 assert_eq!(
5166 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_3>(),
5167 4usize,
5168 concat!(
5169 "Alignment of ",
5170 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3)
5171 )
5172 );
5173 assert_eq!(
5174 unsafe {
5175 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_3>())).exception as *const _
5176 as usize
5177 },
5178 0usize,
5179 concat!(
5180 "Offset of field: ",
5181 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3),
5182 "::",
5183 stringify!(exception)
5184 )
5185 );
5186 assert_eq!(
5187 unsafe {
5188 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_3>())).error_code as *const _
5189 as usize
5190 },
5191 4usize,
5192 concat!(
5193 "Offset of field: ",
5194 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3),
5195 "::",
5196 stringify!(error_code)
5197 )
5198 );
5199 }
5200 #[repr(C)]
5201 #[derive(Debug, Default, Copy, Clone)]
5202 pub struct kvm_run__bindgen_ty_1__bindgen_ty_4 {
5203 pub direction: __u8,
5204 pub size: __u8,
5205 pub port: __u16,
5206 pub count: __u32,
5207 pub data_offset: __u64,
5208 }
5209 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_4()5210 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_4() {
5211 assert_eq!(
5212 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_4>(),
5213 16usize,
5214 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4))
5215 );
5216 assert_eq!(
5217 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_4>(),
5218 8usize,
5219 concat!(
5220 "Alignment of ",
5221 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4)
5222 )
5223 );
5224 assert_eq!(
5225 unsafe {
5226 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_4>())).direction as *const _
5227 as usize
5228 },
5229 0usize,
5230 concat!(
5231 "Offset of field: ",
5232 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4),
5233 "::",
5234 stringify!(direction)
5235 )
5236 );
5237 assert_eq!(
5238 unsafe {
5239 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_4>())).size as *const _
5240 as usize
5241 },
5242 1usize,
5243 concat!(
5244 "Offset of field: ",
5245 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4),
5246 "::",
5247 stringify!(size)
5248 )
5249 );
5250 assert_eq!(
5251 unsafe {
5252 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_4>())).port as *const _
5253 as usize
5254 },
5255 2usize,
5256 concat!(
5257 "Offset of field: ",
5258 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4),
5259 "::",
5260 stringify!(port)
5261 )
5262 );
5263 assert_eq!(
5264 unsafe {
5265 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_4>())).count as *const _
5266 as usize
5267 },
5268 4usize,
5269 concat!(
5270 "Offset of field: ",
5271 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4),
5272 "::",
5273 stringify!(count)
5274 )
5275 );
5276 assert_eq!(
5277 unsafe {
5278 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_4>())).data_offset as *const _
5279 as usize
5280 },
5281 8usize,
5282 concat!(
5283 "Offset of field: ",
5284 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4),
5285 "::",
5286 stringify!(data_offset)
5287 )
5288 );
5289 }
5290 #[repr(C)]
5291 #[derive(Debug, Default, Copy, Clone)]
5292 pub struct kvm_run__bindgen_ty_1__bindgen_ty_5 {
5293 pub arch: kvm_debug_exit_arch,
5294 }
5295 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_5()5296 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_5() {
5297 assert_eq!(
5298 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_5>(),
5299 32usize,
5300 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_5))
5301 );
5302 assert_eq!(
5303 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_5>(),
5304 8usize,
5305 concat!(
5306 "Alignment of ",
5307 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_5)
5308 )
5309 );
5310 assert_eq!(
5311 unsafe {
5312 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_5>())).arch as *const _
5313 as usize
5314 },
5315 0usize,
5316 concat!(
5317 "Offset of field: ",
5318 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_5),
5319 "::",
5320 stringify!(arch)
5321 )
5322 );
5323 }
5324 #[repr(C)]
5325 #[derive(Debug, Default, Copy, Clone)]
5326 pub struct kvm_run__bindgen_ty_1__bindgen_ty_6 {
5327 pub phys_addr: __u64,
5328 pub data: [__u8; 8usize],
5329 pub len: __u32,
5330 pub is_write: __u8,
5331 }
5332 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_6()5333 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_6() {
5334 assert_eq!(
5335 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_6>(),
5336 24usize,
5337 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6))
5338 );
5339 assert_eq!(
5340 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_6>(),
5341 8usize,
5342 concat!(
5343 "Alignment of ",
5344 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6)
5345 )
5346 );
5347 assert_eq!(
5348 unsafe {
5349 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_6>())).phys_addr as *const _
5350 as usize
5351 },
5352 0usize,
5353 concat!(
5354 "Offset of field: ",
5355 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6),
5356 "::",
5357 stringify!(phys_addr)
5358 )
5359 );
5360 assert_eq!(
5361 unsafe {
5362 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_6>())).data as *const _
5363 as usize
5364 },
5365 8usize,
5366 concat!(
5367 "Offset of field: ",
5368 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6),
5369 "::",
5370 stringify!(data)
5371 )
5372 );
5373 assert_eq!(
5374 unsafe {
5375 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_6>())).len as *const _ as usize
5376 },
5377 16usize,
5378 concat!(
5379 "Offset of field: ",
5380 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6),
5381 "::",
5382 stringify!(len)
5383 )
5384 );
5385 assert_eq!(
5386 unsafe {
5387 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_6>())).is_write as *const _
5388 as usize
5389 },
5390 20usize,
5391 concat!(
5392 "Offset of field: ",
5393 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6),
5394 "::",
5395 stringify!(is_write)
5396 )
5397 );
5398 }
5399 #[repr(C)]
5400 #[derive(Debug, Default, Copy, Clone)]
5401 pub struct kvm_run__bindgen_ty_1__bindgen_ty_7 {
5402 pub nr: __u64,
5403 pub args: [__u64; 6usize],
5404 pub ret: __u64,
5405 pub longmode: __u32,
5406 pub pad: __u32,
5407 }
5408 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_7()5409 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_7() {
5410 assert_eq!(
5411 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_7>(),
5412 72usize,
5413 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7))
5414 );
5415 assert_eq!(
5416 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_7>(),
5417 8usize,
5418 concat!(
5419 "Alignment of ",
5420 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7)
5421 )
5422 );
5423 assert_eq!(
5424 unsafe {
5425 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_7>())).nr as *const _ as usize
5426 },
5427 0usize,
5428 concat!(
5429 "Offset of field: ",
5430 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7),
5431 "::",
5432 stringify!(nr)
5433 )
5434 );
5435 assert_eq!(
5436 unsafe {
5437 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_7>())).args as *const _
5438 as usize
5439 },
5440 8usize,
5441 concat!(
5442 "Offset of field: ",
5443 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7),
5444 "::",
5445 stringify!(args)
5446 )
5447 );
5448 assert_eq!(
5449 unsafe {
5450 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_7>())).ret as *const _ as usize
5451 },
5452 56usize,
5453 concat!(
5454 "Offset of field: ",
5455 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7),
5456 "::",
5457 stringify!(ret)
5458 )
5459 );
5460 assert_eq!(
5461 unsafe {
5462 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_7>())).longmode as *const _
5463 as usize
5464 },
5465 64usize,
5466 concat!(
5467 "Offset of field: ",
5468 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7),
5469 "::",
5470 stringify!(longmode)
5471 )
5472 );
5473 assert_eq!(
5474 unsafe {
5475 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_7>())).pad as *const _ as usize
5476 },
5477 68usize,
5478 concat!(
5479 "Offset of field: ",
5480 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7),
5481 "::",
5482 stringify!(pad)
5483 )
5484 );
5485 }
5486 #[repr(C)]
5487 #[derive(Debug, Default, Copy, Clone)]
5488 pub struct kvm_run__bindgen_ty_1__bindgen_ty_8 {
5489 pub rip: __u64,
5490 pub is_write: __u32,
5491 pub pad: __u32,
5492 }
5493 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_8()5494 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_8() {
5495 assert_eq!(
5496 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_8>(),
5497 16usize,
5498 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8))
5499 );
5500 assert_eq!(
5501 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_8>(),
5502 8usize,
5503 concat!(
5504 "Alignment of ",
5505 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8)
5506 )
5507 );
5508 assert_eq!(
5509 unsafe {
5510 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_8>())).rip as *const _ as usize
5511 },
5512 0usize,
5513 concat!(
5514 "Offset of field: ",
5515 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8),
5516 "::",
5517 stringify!(rip)
5518 )
5519 );
5520 assert_eq!(
5521 unsafe {
5522 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_8>())).is_write as *const _
5523 as usize
5524 },
5525 8usize,
5526 concat!(
5527 "Offset of field: ",
5528 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8),
5529 "::",
5530 stringify!(is_write)
5531 )
5532 );
5533 assert_eq!(
5534 unsafe {
5535 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_8>())).pad as *const _ as usize
5536 },
5537 12usize,
5538 concat!(
5539 "Offset of field: ",
5540 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8),
5541 "::",
5542 stringify!(pad)
5543 )
5544 );
5545 }
5546 #[repr(C)]
5547 #[derive(Debug, Default, Copy, Clone)]
5548 pub struct kvm_run__bindgen_ty_1__bindgen_ty_9 {
5549 pub icptcode: __u8,
5550 pub ipa: __u16,
5551 pub ipb: __u32,
5552 }
5553 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_9()5554 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_9() {
5555 assert_eq!(
5556 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_9>(),
5557 8usize,
5558 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9))
5559 );
5560 assert_eq!(
5561 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_9>(),
5562 4usize,
5563 concat!(
5564 "Alignment of ",
5565 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9)
5566 )
5567 );
5568 assert_eq!(
5569 unsafe {
5570 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_9>())).icptcode as *const _
5571 as usize
5572 },
5573 0usize,
5574 concat!(
5575 "Offset of field: ",
5576 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9),
5577 "::",
5578 stringify!(icptcode)
5579 )
5580 );
5581 assert_eq!(
5582 unsafe {
5583 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_9>())).ipa as *const _ as usize
5584 },
5585 2usize,
5586 concat!(
5587 "Offset of field: ",
5588 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9),
5589 "::",
5590 stringify!(ipa)
5591 )
5592 );
5593 assert_eq!(
5594 unsafe {
5595 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_9>())).ipb as *const _ as usize
5596 },
5597 4usize,
5598 concat!(
5599 "Offset of field: ",
5600 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9),
5601 "::",
5602 stringify!(ipb)
5603 )
5604 );
5605 }
5606 #[repr(C)]
5607 #[derive(Debug, Default, Copy, Clone)]
5608 pub struct kvm_run__bindgen_ty_1__bindgen_ty_10 {
5609 pub trans_exc_code: __u64,
5610 pub pgm_code: __u32,
5611 }
5612 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_10()5613 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_10() {
5614 assert_eq!(
5615 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_10>(),
5616 16usize,
5617 concat!(
5618 "Size of: ",
5619 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10)
5620 )
5621 );
5622 assert_eq!(
5623 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_10>(),
5624 8usize,
5625 concat!(
5626 "Alignment of ",
5627 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10)
5628 )
5629 );
5630 assert_eq!(
5631 unsafe {
5632 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_10>())).trans_exc_code
5633 as *const _ as usize
5634 },
5635 0usize,
5636 concat!(
5637 "Offset of field: ",
5638 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10),
5639 "::",
5640 stringify!(trans_exc_code)
5641 )
5642 );
5643 assert_eq!(
5644 unsafe {
5645 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_10>())).pgm_code as *const _
5646 as usize
5647 },
5648 8usize,
5649 concat!(
5650 "Offset of field: ",
5651 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10),
5652 "::",
5653 stringify!(pgm_code)
5654 )
5655 );
5656 }
5657 #[repr(C)]
5658 #[derive(Debug, Default, Copy, Clone)]
5659 pub struct kvm_run__bindgen_ty_1__bindgen_ty_11 {
5660 pub dcrn: __u32,
5661 pub data: __u32,
5662 pub is_write: __u8,
5663 }
5664 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_11()5665 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_11() {
5666 assert_eq!(
5667 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_11>(),
5668 12usize,
5669 concat!(
5670 "Size of: ",
5671 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11)
5672 )
5673 );
5674 assert_eq!(
5675 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_11>(),
5676 4usize,
5677 concat!(
5678 "Alignment of ",
5679 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11)
5680 )
5681 );
5682 assert_eq!(
5683 unsafe {
5684 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_11>())).dcrn as *const _
5685 as usize
5686 },
5687 0usize,
5688 concat!(
5689 "Offset of field: ",
5690 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11),
5691 "::",
5692 stringify!(dcrn)
5693 )
5694 );
5695 assert_eq!(
5696 unsafe {
5697 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_11>())).data as *const _
5698 as usize
5699 },
5700 4usize,
5701 concat!(
5702 "Offset of field: ",
5703 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11),
5704 "::",
5705 stringify!(data)
5706 )
5707 );
5708 assert_eq!(
5709 unsafe {
5710 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_11>())).is_write as *const _
5711 as usize
5712 },
5713 8usize,
5714 concat!(
5715 "Offset of field: ",
5716 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11),
5717 "::",
5718 stringify!(is_write)
5719 )
5720 );
5721 }
5722 #[repr(C)]
5723 #[derive(Debug, Default, Copy, Clone)]
5724 pub struct kvm_run__bindgen_ty_1__bindgen_ty_12 {
5725 pub suberror: __u32,
5726 pub ndata: __u32,
5727 pub data: [__u64; 16usize],
5728 }
5729 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_12()5730 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_12() {
5731 assert_eq!(
5732 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_12>(),
5733 136usize,
5734 concat!(
5735 "Size of: ",
5736 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12)
5737 )
5738 );
5739 assert_eq!(
5740 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_12>(),
5741 8usize,
5742 concat!(
5743 "Alignment of ",
5744 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12)
5745 )
5746 );
5747 assert_eq!(
5748 unsafe {
5749 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_12>())).suberror as *const _
5750 as usize
5751 },
5752 0usize,
5753 concat!(
5754 "Offset of field: ",
5755 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12),
5756 "::",
5757 stringify!(suberror)
5758 )
5759 );
5760 assert_eq!(
5761 unsafe {
5762 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_12>())).ndata as *const _
5763 as usize
5764 },
5765 4usize,
5766 concat!(
5767 "Offset of field: ",
5768 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12),
5769 "::",
5770 stringify!(ndata)
5771 )
5772 );
5773 assert_eq!(
5774 unsafe {
5775 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_12>())).data as *const _
5776 as usize
5777 },
5778 8usize,
5779 concat!(
5780 "Offset of field: ",
5781 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12),
5782 "::",
5783 stringify!(data)
5784 )
5785 );
5786 }
5787 #[repr(C)]
5788 #[derive(Debug, Default, Copy, Clone)]
5789 pub struct kvm_run__bindgen_ty_1__bindgen_ty_13 {
5790 pub gprs: [__u64; 32usize],
5791 }
5792 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_13()5793 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_13() {
5794 assert_eq!(
5795 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_13>(),
5796 256usize,
5797 concat!(
5798 "Size of: ",
5799 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13)
5800 )
5801 );
5802 assert_eq!(
5803 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_13>(),
5804 8usize,
5805 concat!(
5806 "Alignment of ",
5807 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13)
5808 )
5809 );
5810 assert_eq!(
5811 unsafe {
5812 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_13>())).gprs as *const _
5813 as usize
5814 },
5815 0usize,
5816 concat!(
5817 "Offset of field: ",
5818 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13),
5819 "::",
5820 stringify!(gprs)
5821 )
5822 );
5823 }
5824 #[repr(C)]
5825 #[derive(Debug, Default, Copy, Clone)]
5826 pub struct kvm_run__bindgen_ty_1__bindgen_ty_14 {
5827 pub nr: __u64,
5828 pub ret: __u64,
5829 pub args: [__u64; 9usize],
5830 }
5831 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_14()5832 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_14() {
5833 assert_eq!(
5834 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_14>(),
5835 88usize,
5836 concat!(
5837 "Size of: ",
5838 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14)
5839 )
5840 );
5841 assert_eq!(
5842 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_14>(),
5843 8usize,
5844 concat!(
5845 "Alignment of ",
5846 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14)
5847 )
5848 );
5849 assert_eq!(
5850 unsafe {
5851 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_14>())).nr as *const _ as usize
5852 },
5853 0usize,
5854 concat!(
5855 "Offset of field: ",
5856 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14),
5857 "::",
5858 stringify!(nr)
5859 )
5860 );
5861 assert_eq!(
5862 unsafe {
5863 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_14>())).ret as *const _
5864 as usize
5865 },
5866 8usize,
5867 concat!(
5868 "Offset of field: ",
5869 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14),
5870 "::",
5871 stringify!(ret)
5872 )
5873 );
5874 assert_eq!(
5875 unsafe {
5876 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_14>())).args as *const _
5877 as usize
5878 },
5879 16usize,
5880 concat!(
5881 "Offset of field: ",
5882 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14),
5883 "::",
5884 stringify!(args)
5885 )
5886 );
5887 }
5888 #[repr(C)]
5889 #[derive(Debug, Default, Copy, Clone)]
5890 pub struct kvm_run__bindgen_ty_1__bindgen_ty_15 {
5891 pub subchannel_id: __u16,
5892 pub subchannel_nr: __u16,
5893 pub io_int_parm: __u32,
5894 pub io_int_word: __u32,
5895 pub ipb: __u32,
5896 pub dequeued: __u8,
5897 }
5898 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_15()5899 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_15() {
5900 assert_eq!(
5901 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_15>(),
5902 20usize,
5903 concat!(
5904 "Size of: ",
5905 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15)
5906 )
5907 );
5908 assert_eq!(
5909 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_15>(),
5910 4usize,
5911 concat!(
5912 "Alignment of ",
5913 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15)
5914 )
5915 );
5916 assert_eq!(
5917 unsafe {
5918 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_15>())).subchannel_id
5919 as *const _ as usize
5920 },
5921 0usize,
5922 concat!(
5923 "Offset of field: ",
5924 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15),
5925 "::",
5926 stringify!(subchannel_id)
5927 )
5928 );
5929 assert_eq!(
5930 unsafe {
5931 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_15>())).subchannel_nr
5932 as *const _ as usize
5933 },
5934 2usize,
5935 concat!(
5936 "Offset of field: ",
5937 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15),
5938 "::",
5939 stringify!(subchannel_nr)
5940 )
5941 );
5942 assert_eq!(
5943 unsafe {
5944 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_15>())).io_int_parm as *const _
5945 as usize
5946 },
5947 4usize,
5948 concat!(
5949 "Offset of field: ",
5950 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15),
5951 "::",
5952 stringify!(io_int_parm)
5953 )
5954 );
5955 assert_eq!(
5956 unsafe {
5957 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_15>())).io_int_word as *const _
5958 as usize
5959 },
5960 8usize,
5961 concat!(
5962 "Offset of field: ",
5963 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15),
5964 "::",
5965 stringify!(io_int_word)
5966 )
5967 );
5968 assert_eq!(
5969 unsafe {
5970 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_15>())).ipb as *const _
5971 as usize
5972 },
5973 12usize,
5974 concat!(
5975 "Offset of field: ",
5976 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15),
5977 "::",
5978 stringify!(ipb)
5979 )
5980 );
5981 assert_eq!(
5982 unsafe {
5983 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_15>())).dequeued as *const _
5984 as usize
5985 },
5986 16usize,
5987 concat!(
5988 "Offset of field: ",
5989 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15),
5990 "::",
5991 stringify!(dequeued)
5992 )
5993 );
5994 }
5995 #[repr(C)]
5996 #[derive(Debug, Default, Copy, Clone)]
5997 pub struct kvm_run__bindgen_ty_1__bindgen_ty_16 {
5998 pub epr: __u32,
5999 }
6000 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_16()6001 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_16() {
6002 assert_eq!(
6003 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_16>(),
6004 4usize,
6005 concat!(
6006 "Size of: ",
6007 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16)
6008 )
6009 );
6010 assert_eq!(
6011 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_16>(),
6012 4usize,
6013 concat!(
6014 "Alignment of ",
6015 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16)
6016 )
6017 );
6018 assert_eq!(
6019 unsafe {
6020 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_16>())).epr as *const _
6021 as usize
6022 },
6023 0usize,
6024 concat!(
6025 "Offset of field: ",
6026 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16),
6027 "::",
6028 stringify!(epr)
6029 )
6030 );
6031 }
6032 #[repr(C)]
6033 #[derive(Debug, Default, Copy, Clone)]
6034 pub struct kvm_run__bindgen_ty_1__bindgen_ty_17 {
6035 pub type_: __u32,
6036 pub flags: __u64,
6037 }
6038 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_17()6039 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_17() {
6040 assert_eq!(
6041 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_17>(),
6042 16usize,
6043 concat!(
6044 "Size of: ",
6045 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17)
6046 )
6047 );
6048 assert_eq!(
6049 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_17>(),
6050 8usize,
6051 concat!(
6052 "Alignment of ",
6053 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17)
6054 )
6055 );
6056 assert_eq!(
6057 unsafe {
6058 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_17>())).type_ as *const _
6059 as usize
6060 },
6061 0usize,
6062 concat!(
6063 "Offset of field: ",
6064 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17),
6065 "::",
6066 stringify!(type_)
6067 )
6068 );
6069 assert_eq!(
6070 unsafe {
6071 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_17>())).flags as *const _
6072 as usize
6073 },
6074 8usize,
6075 concat!(
6076 "Offset of field: ",
6077 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17),
6078 "::",
6079 stringify!(flags)
6080 )
6081 );
6082 }
6083 #[repr(C)]
6084 #[derive(Debug, Default, Copy, Clone)]
6085 pub struct kvm_run__bindgen_ty_1__bindgen_ty_18 {
6086 pub addr: __u64,
6087 pub ar: __u8,
6088 pub reserved: __u8,
6089 pub fc: __u8,
6090 pub sel1: __u8,
6091 pub sel2: __u16,
6092 }
6093 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_18()6094 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_18() {
6095 assert_eq!(
6096 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_18>(),
6097 16usize,
6098 concat!(
6099 "Size of: ",
6100 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18)
6101 )
6102 );
6103 assert_eq!(
6104 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_18>(),
6105 8usize,
6106 concat!(
6107 "Alignment of ",
6108 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18)
6109 )
6110 );
6111 assert_eq!(
6112 unsafe {
6113 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_18>())).addr as *const _
6114 as usize
6115 },
6116 0usize,
6117 concat!(
6118 "Offset of field: ",
6119 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18),
6120 "::",
6121 stringify!(addr)
6122 )
6123 );
6124 assert_eq!(
6125 unsafe {
6126 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_18>())).ar as *const _ as usize
6127 },
6128 8usize,
6129 concat!(
6130 "Offset of field: ",
6131 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18),
6132 "::",
6133 stringify!(ar)
6134 )
6135 );
6136 assert_eq!(
6137 unsafe {
6138 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_18>())).reserved as *const _
6139 as usize
6140 },
6141 9usize,
6142 concat!(
6143 "Offset of field: ",
6144 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18),
6145 "::",
6146 stringify!(reserved)
6147 )
6148 );
6149 assert_eq!(
6150 unsafe {
6151 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_18>())).fc as *const _ as usize
6152 },
6153 10usize,
6154 concat!(
6155 "Offset of field: ",
6156 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18),
6157 "::",
6158 stringify!(fc)
6159 )
6160 );
6161 assert_eq!(
6162 unsafe {
6163 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_18>())).sel1 as *const _
6164 as usize
6165 },
6166 11usize,
6167 concat!(
6168 "Offset of field: ",
6169 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18),
6170 "::",
6171 stringify!(sel1)
6172 )
6173 );
6174 assert_eq!(
6175 unsafe {
6176 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_18>())).sel2 as *const _
6177 as usize
6178 },
6179 12usize,
6180 concat!(
6181 "Offset of field: ",
6182 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18),
6183 "::",
6184 stringify!(sel2)
6185 )
6186 );
6187 }
6188 #[repr(C)]
6189 #[derive(Debug, Default, Copy, Clone)]
6190 pub struct kvm_run__bindgen_ty_1__bindgen_ty_19 {
6191 pub vector: __u8,
6192 }
6193 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_19()6194 fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_19() {
6195 assert_eq!(
6196 ::std::mem::size_of::<kvm_run__bindgen_ty_1__bindgen_ty_19>(),
6197 1usize,
6198 concat!(
6199 "Size of: ",
6200 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19)
6201 )
6202 );
6203 assert_eq!(
6204 ::std::mem::align_of::<kvm_run__bindgen_ty_1__bindgen_ty_19>(),
6205 1usize,
6206 concat!(
6207 "Alignment of ",
6208 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19)
6209 )
6210 );
6211 assert_eq!(
6212 unsafe {
6213 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1__bindgen_ty_19>())).vector as *const _
6214 as usize
6215 },
6216 0usize,
6217 concat!(
6218 "Offset of field: ",
6219 stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19),
6220 "::",
6221 stringify!(vector)
6222 )
6223 );
6224 }
6225 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_1()6226 fn bindgen_test_layout_kvm_run__bindgen_ty_1() {
6227 assert_eq!(
6228 ::std::mem::size_of::<kvm_run__bindgen_ty_1>(),
6229 256usize,
6230 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1))
6231 );
6232 assert_eq!(
6233 ::std::mem::align_of::<kvm_run__bindgen_ty_1>(),
6234 8usize,
6235 concat!("Alignment of ", stringify!(kvm_run__bindgen_ty_1))
6236 );
6237 assert_eq!(
6238 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).hw as *const _ as usize },
6239 0usize,
6240 concat!(
6241 "Offset of field: ",
6242 stringify!(kvm_run__bindgen_ty_1),
6243 "::",
6244 stringify!(hw)
6245 )
6246 );
6247 assert_eq!(
6248 unsafe {
6249 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).fail_entry as *const _ as usize
6250 },
6251 0usize,
6252 concat!(
6253 "Offset of field: ",
6254 stringify!(kvm_run__bindgen_ty_1),
6255 "::",
6256 stringify!(fail_entry)
6257 )
6258 );
6259 assert_eq!(
6260 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).ex as *const _ as usize },
6261 0usize,
6262 concat!(
6263 "Offset of field: ",
6264 stringify!(kvm_run__bindgen_ty_1),
6265 "::",
6266 stringify!(ex)
6267 )
6268 );
6269 assert_eq!(
6270 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).io as *const _ as usize },
6271 0usize,
6272 concat!(
6273 "Offset of field: ",
6274 stringify!(kvm_run__bindgen_ty_1),
6275 "::",
6276 stringify!(io)
6277 )
6278 );
6279 assert_eq!(
6280 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).debug as *const _ as usize },
6281 0usize,
6282 concat!(
6283 "Offset of field: ",
6284 stringify!(kvm_run__bindgen_ty_1),
6285 "::",
6286 stringify!(debug)
6287 )
6288 );
6289 assert_eq!(
6290 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).mmio as *const _ as usize },
6291 0usize,
6292 concat!(
6293 "Offset of field: ",
6294 stringify!(kvm_run__bindgen_ty_1),
6295 "::",
6296 stringify!(mmio)
6297 )
6298 );
6299 assert_eq!(
6300 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).hypercall as *const _ as usize },
6301 0usize,
6302 concat!(
6303 "Offset of field: ",
6304 stringify!(kvm_run__bindgen_ty_1),
6305 "::",
6306 stringify!(hypercall)
6307 )
6308 );
6309 assert_eq!(
6310 unsafe {
6311 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).tpr_access as *const _ as usize
6312 },
6313 0usize,
6314 concat!(
6315 "Offset of field: ",
6316 stringify!(kvm_run__bindgen_ty_1),
6317 "::",
6318 stringify!(tpr_access)
6319 )
6320 );
6321 assert_eq!(
6322 unsafe {
6323 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).s390_sieic as *const _ as usize
6324 },
6325 0usize,
6326 concat!(
6327 "Offset of field: ",
6328 stringify!(kvm_run__bindgen_ty_1),
6329 "::",
6330 stringify!(s390_sieic)
6331 )
6332 );
6333 assert_eq!(
6334 unsafe {
6335 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).s390_reset_flags as *const _ as usize
6336 },
6337 0usize,
6338 concat!(
6339 "Offset of field: ",
6340 stringify!(kvm_run__bindgen_ty_1),
6341 "::",
6342 stringify!(s390_reset_flags)
6343 )
6344 );
6345 assert_eq!(
6346 unsafe {
6347 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).s390_ucontrol as *const _ as usize
6348 },
6349 0usize,
6350 concat!(
6351 "Offset of field: ",
6352 stringify!(kvm_run__bindgen_ty_1),
6353 "::",
6354 stringify!(s390_ucontrol)
6355 )
6356 );
6357 assert_eq!(
6358 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).dcr as *const _ as usize },
6359 0usize,
6360 concat!(
6361 "Offset of field: ",
6362 stringify!(kvm_run__bindgen_ty_1),
6363 "::",
6364 stringify!(dcr)
6365 )
6366 );
6367 assert_eq!(
6368 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).internal as *const _ as usize },
6369 0usize,
6370 concat!(
6371 "Offset of field: ",
6372 stringify!(kvm_run__bindgen_ty_1),
6373 "::",
6374 stringify!(internal)
6375 )
6376 );
6377 assert_eq!(
6378 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).osi as *const _ as usize },
6379 0usize,
6380 concat!(
6381 "Offset of field: ",
6382 stringify!(kvm_run__bindgen_ty_1),
6383 "::",
6384 stringify!(osi)
6385 )
6386 );
6387 assert_eq!(
6388 unsafe {
6389 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).papr_hcall as *const _ as usize
6390 },
6391 0usize,
6392 concat!(
6393 "Offset of field: ",
6394 stringify!(kvm_run__bindgen_ty_1),
6395 "::",
6396 stringify!(papr_hcall)
6397 )
6398 );
6399 assert_eq!(
6400 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).s390_tsch as *const _ as usize },
6401 0usize,
6402 concat!(
6403 "Offset of field: ",
6404 stringify!(kvm_run__bindgen_ty_1),
6405 "::",
6406 stringify!(s390_tsch)
6407 )
6408 );
6409 assert_eq!(
6410 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).epr as *const _ as usize },
6411 0usize,
6412 concat!(
6413 "Offset of field: ",
6414 stringify!(kvm_run__bindgen_ty_1),
6415 "::",
6416 stringify!(epr)
6417 )
6418 );
6419 assert_eq!(
6420 unsafe {
6421 &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).system_event as *const _ as usize
6422 },
6423 0usize,
6424 concat!(
6425 "Offset of field: ",
6426 stringify!(kvm_run__bindgen_ty_1),
6427 "::",
6428 stringify!(system_event)
6429 )
6430 );
6431 assert_eq!(
6432 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).s390_stsi as *const _ as usize },
6433 0usize,
6434 concat!(
6435 "Offset of field: ",
6436 stringify!(kvm_run__bindgen_ty_1),
6437 "::",
6438 stringify!(s390_stsi)
6439 )
6440 );
6441 assert_eq!(
6442 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).eoi as *const _ as usize },
6443 0usize,
6444 concat!(
6445 "Offset of field: ",
6446 stringify!(kvm_run__bindgen_ty_1),
6447 "::",
6448 stringify!(eoi)
6449 )
6450 );
6451 assert_eq!(
6452 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).hyperv as *const _ as usize },
6453 0usize,
6454 concat!(
6455 "Offset of field: ",
6456 stringify!(kvm_run__bindgen_ty_1),
6457 "::",
6458 stringify!(hyperv)
6459 )
6460 );
6461 assert_eq!(
6462 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_1>())).padding as *const _ as usize },
6463 0usize,
6464 concat!(
6465 "Offset of field: ",
6466 stringify!(kvm_run__bindgen_ty_1),
6467 "::",
6468 stringify!(padding)
6469 )
6470 );
6471 }
6472 impl Default for kvm_run__bindgen_ty_1 {
default() -> Self6473 fn default() -> Self {
6474 unsafe { ::std::mem::zeroed() }
6475 }
6476 }
6477 #[repr(C)]
6478 #[derive(Copy, Clone)]
6479 pub union kvm_run__bindgen_ty_2 {
6480 pub regs: kvm_sync_regs,
6481 pub padding: [::std::os::raw::c_char; 2048usize],
6482 _bindgen_union_align: [u64; 256usize],
6483 }
6484 #[test]
bindgen_test_layout_kvm_run__bindgen_ty_2()6485 fn bindgen_test_layout_kvm_run__bindgen_ty_2() {
6486 assert_eq!(
6487 ::std::mem::size_of::<kvm_run__bindgen_ty_2>(),
6488 2048usize,
6489 concat!("Size of: ", stringify!(kvm_run__bindgen_ty_2))
6490 );
6491 assert_eq!(
6492 ::std::mem::align_of::<kvm_run__bindgen_ty_2>(),
6493 8usize,
6494 concat!("Alignment of ", stringify!(kvm_run__bindgen_ty_2))
6495 );
6496 assert_eq!(
6497 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_2>())).regs as *const _ as usize },
6498 0usize,
6499 concat!(
6500 "Offset of field: ",
6501 stringify!(kvm_run__bindgen_ty_2),
6502 "::",
6503 stringify!(regs)
6504 )
6505 );
6506 assert_eq!(
6507 unsafe { &(*(::std::ptr::null::<kvm_run__bindgen_ty_2>())).padding as *const _ as usize },
6508 0usize,
6509 concat!(
6510 "Offset of field: ",
6511 stringify!(kvm_run__bindgen_ty_2),
6512 "::",
6513 stringify!(padding)
6514 )
6515 );
6516 }
6517 impl Default for kvm_run__bindgen_ty_2 {
default() -> Self6518 fn default() -> Self {
6519 unsafe { ::std::mem::zeroed() }
6520 }
6521 }
6522 #[test]
bindgen_test_layout_kvm_run()6523 fn bindgen_test_layout_kvm_run() {
6524 assert_eq!(
6525 ::std::mem::size_of::<kvm_run>(),
6526 2352usize,
6527 concat!("Size of: ", stringify!(kvm_run))
6528 );
6529 assert_eq!(
6530 ::std::mem::align_of::<kvm_run>(),
6531 8usize,
6532 concat!("Alignment of ", stringify!(kvm_run))
6533 );
6534 assert_eq!(
6535 unsafe {
6536 &(*(::std::ptr::null::<kvm_run>())).request_interrupt_window as *const _ as usize
6537 },
6538 0usize,
6539 concat!(
6540 "Offset of field: ",
6541 stringify!(kvm_run),
6542 "::",
6543 stringify!(request_interrupt_window)
6544 )
6545 );
6546 assert_eq!(
6547 unsafe { &(*(::std::ptr::null::<kvm_run>())).immediate_exit as *const _ as usize },
6548 1usize,
6549 concat!(
6550 "Offset of field: ",
6551 stringify!(kvm_run),
6552 "::",
6553 stringify!(immediate_exit)
6554 )
6555 );
6556 assert_eq!(
6557 unsafe { &(*(::std::ptr::null::<kvm_run>())).padding1 as *const _ as usize },
6558 2usize,
6559 concat!(
6560 "Offset of field: ",
6561 stringify!(kvm_run),
6562 "::",
6563 stringify!(padding1)
6564 )
6565 );
6566 assert_eq!(
6567 unsafe { &(*(::std::ptr::null::<kvm_run>())).exit_reason as *const _ as usize },
6568 8usize,
6569 concat!(
6570 "Offset of field: ",
6571 stringify!(kvm_run),
6572 "::",
6573 stringify!(exit_reason)
6574 )
6575 );
6576 assert_eq!(
6577 unsafe {
6578 &(*(::std::ptr::null::<kvm_run>())).ready_for_interrupt_injection as *const _ as usize
6579 },
6580 12usize,
6581 concat!(
6582 "Offset of field: ",
6583 stringify!(kvm_run),
6584 "::",
6585 stringify!(ready_for_interrupt_injection)
6586 )
6587 );
6588 assert_eq!(
6589 unsafe { &(*(::std::ptr::null::<kvm_run>())).if_flag as *const _ as usize },
6590 13usize,
6591 concat!(
6592 "Offset of field: ",
6593 stringify!(kvm_run),
6594 "::",
6595 stringify!(if_flag)
6596 )
6597 );
6598 assert_eq!(
6599 unsafe { &(*(::std::ptr::null::<kvm_run>())).flags as *const _ as usize },
6600 14usize,
6601 concat!(
6602 "Offset of field: ",
6603 stringify!(kvm_run),
6604 "::",
6605 stringify!(flags)
6606 )
6607 );
6608 assert_eq!(
6609 unsafe { &(*(::std::ptr::null::<kvm_run>())).cr8 as *const _ as usize },
6610 16usize,
6611 concat!(
6612 "Offset of field: ",
6613 stringify!(kvm_run),
6614 "::",
6615 stringify!(cr8)
6616 )
6617 );
6618 assert_eq!(
6619 unsafe { &(*(::std::ptr::null::<kvm_run>())).apic_base as *const _ as usize },
6620 24usize,
6621 concat!(
6622 "Offset of field: ",
6623 stringify!(kvm_run),
6624 "::",
6625 stringify!(apic_base)
6626 )
6627 );
6628 assert_eq!(
6629 unsafe { &(*(::std::ptr::null::<kvm_run>())).kvm_valid_regs as *const _ as usize },
6630 288usize,
6631 concat!(
6632 "Offset of field: ",
6633 stringify!(kvm_run),
6634 "::",
6635 stringify!(kvm_valid_regs)
6636 )
6637 );
6638 assert_eq!(
6639 unsafe { &(*(::std::ptr::null::<kvm_run>())).kvm_dirty_regs as *const _ as usize },
6640 296usize,
6641 concat!(
6642 "Offset of field: ",
6643 stringify!(kvm_run),
6644 "::",
6645 stringify!(kvm_dirty_regs)
6646 )
6647 );
6648 assert_eq!(
6649 unsafe { &(*(::std::ptr::null::<kvm_run>())).s as *const _ as usize },
6650 304usize,
6651 concat!(
6652 "Offset of field: ",
6653 stringify!(kvm_run),
6654 "::",
6655 stringify!(s)
6656 )
6657 );
6658 }
6659 impl Default for kvm_run {
default() -> Self6660 fn default() -> Self {
6661 unsafe { ::std::mem::zeroed() }
6662 }
6663 }
6664 #[repr(C)]
6665 #[derive(Copy, Clone)]
6666 pub struct kvm_coalesced_mmio_zone {
6667 pub addr: __u64,
6668 pub size: __u32,
6669 pub __bindgen_anon_1: kvm_coalesced_mmio_zone__bindgen_ty_1,
6670 }
6671 #[repr(C)]
6672 #[derive(Copy, Clone)]
6673 pub union kvm_coalesced_mmio_zone__bindgen_ty_1 {
6674 pub pad: __u32,
6675 pub pio: __u32,
6676 _bindgen_union_align: u32,
6677 }
6678 #[test]
bindgen_test_layout_kvm_coalesced_mmio_zone__bindgen_ty_1()6679 fn bindgen_test_layout_kvm_coalesced_mmio_zone__bindgen_ty_1() {
6680 assert_eq!(
6681 ::std::mem::size_of::<kvm_coalesced_mmio_zone__bindgen_ty_1>(),
6682 4usize,
6683 concat!(
6684 "Size of: ",
6685 stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1)
6686 )
6687 );
6688 assert_eq!(
6689 ::std::mem::align_of::<kvm_coalesced_mmio_zone__bindgen_ty_1>(),
6690 4usize,
6691 concat!(
6692 "Alignment of ",
6693 stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1)
6694 )
6695 );
6696 assert_eq!(
6697 unsafe {
6698 &(*(::std::ptr::null::<kvm_coalesced_mmio_zone__bindgen_ty_1>())).pad as *const _
6699 as usize
6700 },
6701 0usize,
6702 concat!(
6703 "Offset of field: ",
6704 stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1),
6705 "::",
6706 stringify!(pad)
6707 )
6708 );
6709 assert_eq!(
6710 unsafe {
6711 &(*(::std::ptr::null::<kvm_coalesced_mmio_zone__bindgen_ty_1>())).pio as *const _
6712 as usize
6713 },
6714 0usize,
6715 concat!(
6716 "Offset of field: ",
6717 stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1),
6718 "::",
6719 stringify!(pio)
6720 )
6721 );
6722 }
6723 impl Default for kvm_coalesced_mmio_zone__bindgen_ty_1 {
default() -> Self6724 fn default() -> Self {
6725 unsafe { ::std::mem::zeroed() }
6726 }
6727 }
6728 #[test]
bindgen_test_layout_kvm_coalesced_mmio_zone()6729 fn bindgen_test_layout_kvm_coalesced_mmio_zone() {
6730 assert_eq!(
6731 ::std::mem::size_of::<kvm_coalesced_mmio_zone>(),
6732 16usize,
6733 concat!("Size of: ", stringify!(kvm_coalesced_mmio_zone))
6734 );
6735 assert_eq!(
6736 ::std::mem::align_of::<kvm_coalesced_mmio_zone>(),
6737 8usize,
6738 concat!("Alignment of ", stringify!(kvm_coalesced_mmio_zone))
6739 );
6740 assert_eq!(
6741 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio_zone>())).addr as *const _ as usize },
6742 0usize,
6743 concat!(
6744 "Offset of field: ",
6745 stringify!(kvm_coalesced_mmio_zone),
6746 "::",
6747 stringify!(addr)
6748 )
6749 );
6750 assert_eq!(
6751 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio_zone>())).size as *const _ as usize },
6752 8usize,
6753 concat!(
6754 "Offset of field: ",
6755 stringify!(kvm_coalesced_mmio_zone),
6756 "::",
6757 stringify!(size)
6758 )
6759 );
6760 }
6761 impl Default for kvm_coalesced_mmio_zone {
default() -> Self6762 fn default() -> Self {
6763 unsafe { ::std::mem::zeroed() }
6764 }
6765 }
6766 #[repr(C)]
6767 #[derive(Copy, Clone)]
6768 pub struct kvm_coalesced_mmio {
6769 pub phys_addr: __u64,
6770 pub len: __u32,
6771 pub __bindgen_anon_1: kvm_coalesced_mmio__bindgen_ty_1,
6772 pub data: [__u8; 8usize],
6773 }
6774 #[repr(C)]
6775 #[derive(Copy, Clone)]
6776 pub union kvm_coalesced_mmio__bindgen_ty_1 {
6777 pub pad: __u32,
6778 pub pio: __u32,
6779 _bindgen_union_align: u32,
6780 }
6781 #[test]
bindgen_test_layout_kvm_coalesced_mmio__bindgen_ty_1()6782 fn bindgen_test_layout_kvm_coalesced_mmio__bindgen_ty_1() {
6783 assert_eq!(
6784 ::std::mem::size_of::<kvm_coalesced_mmio__bindgen_ty_1>(),
6785 4usize,
6786 concat!("Size of: ", stringify!(kvm_coalesced_mmio__bindgen_ty_1))
6787 );
6788 assert_eq!(
6789 ::std::mem::align_of::<kvm_coalesced_mmio__bindgen_ty_1>(),
6790 4usize,
6791 concat!(
6792 "Alignment of ",
6793 stringify!(kvm_coalesced_mmio__bindgen_ty_1)
6794 )
6795 );
6796 assert_eq!(
6797 unsafe {
6798 &(*(::std::ptr::null::<kvm_coalesced_mmio__bindgen_ty_1>())).pad as *const _ as usize
6799 },
6800 0usize,
6801 concat!(
6802 "Offset of field: ",
6803 stringify!(kvm_coalesced_mmio__bindgen_ty_1),
6804 "::",
6805 stringify!(pad)
6806 )
6807 );
6808 assert_eq!(
6809 unsafe {
6810 &(*(::std::ptr::null::<kvm_coalesced_mmio__bindgen_ty_1>())).pio as *const _ as usize
6811 },
6812 0usize,
6813 concat!(
6814 "Offset of field: ",
6815 stringify!(kvm_coalesced_mmio__bindgen_ty_1),
6816 "::",
6817 stringify!(pio)
6818 )
6819 );
6820 }
6821 impl Default for kvm_coalesced_mmio__bindgen_ty_1 {
default() -> Self6822 fn default() -> Self {
6823 unsafe { ::std::mem::zeroed() }
6824 }
6825 }
6826 #[test]
bindgen_test_layout_kvm_coalesced_mmio()6827 fn bindgen_test_layout_kvm_coalesced_mmio() {
6828 assert_eq!(
6829 ::std::mem::size_of::<kvm_coalesced_mmio>(),
6830 24usize,
6831 concat!("Size of: ", stringify!(kvm_coalesced_mmio))
6832 );
6833 assert_eq!(
6834 ::std::mem::align_of::<kvm_coalesced_mmio>(),
6835 8usize,
6836 concat!("Alignment of ", stringify!(kvm_coalesced_mmio))
6837 );
6838 assert_eq!(
6839 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio>())).phys_addr as *const _ as usize },
6840 0usize,
6841 concat!(
6842 "Offset of field: ",
6843 stringify!(kvm_coalesced_mmio),
6844 "::",
6845 stringify!(phys_addr)
6846 )
6847 );
6848 assert_eq!(
6849 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio>())).len as *const _ as usize },
6850 8usize,
6851 concat!(
6852 "Offset of field: ",
6853 stringify!(kvm_coalesced_mmio),
6854 "::",
6855 stringify!(len)
6856 )
6857 );
6858 assert_eq!(
6859 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio>())).data as *const _ as usize },
6860 16usize,
6861 concat!(
6862 "Offset of field: ",
6863 stringify!(kvm_coalesced_mmio),
6864 "::",
6865 stringify!(data)
6866 )
6867 );
6868 }
6869 impl Default for kvm_coalesced_mmio {
default() -> Self6870 fn default() -> Self {
6871 unsafe { ::std::mem::zeroed() }
6872 }
6873 }
6874 #[repr(C)]
6875 pub struct kvm_coalesced_mmio_ring {
6876 pub first: __u32,
6877 pub last: __u32,
6878 pub coalesced_mmio: __IncompleteArrayField<kvm_coalesced_mmio>,
6879 }
6880 #[test]
bindgen_test_layout_kvm_coalesced_mmio_ring()6881 fn bindgen_test_layout_kvm_coalesced_mmio_ring() {
6882 assert_eq!(
6883 ::std::mem::size_of::<kvm_coalesced_mmio_ring>(),
6884 8usize,
6885 concat!("Size of: ", stringify!(kvm_coalesced_mmio_ring))
6886 );
6887 assert_eq!(
6888 ::std::mem::align_of::<kvm_coalesced_mmio_ring>(),
6889 8usize,
6890 concat!("Alignment of ", stringify!(kvm_coalesced_mmio_ring))
6891 );
6892 assert_eq!(
6893 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio_ring>())).first as *const _ as usize },
6894 0usize,
6895 concat!(
6896 "Offset of field: ",
6897 stringify!(kvm_coalesced_mmio_ring),
6898 "::",
6899 stringify!(first)
6900 )
6901 );
6902 assert_eq!(
6903 unsafe { &(*(::std::ptr::null::<kvm_coalesced_mmio_ring>())).last as *const _ as usize },
6904 4usize,
6905 concat!(
6906 "Offset of field: ",
6907 stringify!(kvm_coalesced_mmio_ring),
6908 "::",
6909 stringify!(last)
6910 )
6911 );
6912 assert_eq!(
6913 unsafe {
6914 &(*(::std::ptr::null::<kvm_coalesced_mmio_ring>())).coalesced_mmio as *const _ as usize
6915 },
6916 8usize,
6917 concat!(
6918 "Offset of field: ",
6919 stringify!(kvm_coalesced_mmio_ring),
6920 "::",
6921 stringify!(coalesced_mmio)
6922 )
6923 );
6924 }
6925 impl Default for kvm_coalesced_mmio_ring {
default() -> Self6926 fn default() -> Self {
6927 unsafe { ::std::mem::zeroed() }
6928 }
6929 }
6930 #[repr(C)]
6931 #[derive(Debug, Default, Copy, Clone)]
6932 pub struct kvm_translation {
6933 pub linear_address: __u64,
6934 pub physical_address: __u64,
6935 pub valid: __u8,
6936 pub writeable: __u8,
6937 pub usermode: __u8,
6938 pub pad: [__u8; 5usize],
6939 }
6940 #[test]
bindgen_test_layout_kvm_translation()6941 fn bindgen_test_layout_kvm_translation() {
6942 assert_eq!(
6943 ::std::mem::size_of::<kvm_translation>(),
6944 24usize,
6945 concat!("Size of: ", stringify!(kvm_translation))
6946 );
6947 assert_eq!(
6948 ::std::mem::align_of::<kvm_translation>(),
6949 8usize,
6950 concat!("Alignment of ", stringify!(kvm_translation))
6951 );
6952 assert_eq!(
6953 unsafe { &(*(::std::ptr::null::<kvm_translation>())).linear_address as *const _ as usize },
6954 0usize,
6955 concat!(
6956 "Offset of field: ",
6957 stringify!(kvm_translation),
6958 "::",
6959 stringify!(linear_address)
6960 )
6961 );
6962 assert_eq!(
6963 unsafe {
6964 &(*(::std::ptr::null::<kvm_translation>())).physical_address as *const _ as usize
6965 },
6966 8usize,
6967 concat!(
6968 "Offset of field: ",
6969 stringify!(kvm_translation),
6970 "::",
6971 stringify!(physical_address)
6972 )
6973 );
6974 assert_eq!(
6975 unsafe { &(*(::std::ptr::null::<kvm_translation>())).valid as *const _ as usize },
6976 16usize,
6977 concat!(
6978 "Offset of field: ",
6979 stringify!(kvm_translation),
6980 "::",
6981 stringify!(valid)
6982 )
6983 );
6984 assert_eq!(
6985 unsafe { &(*(::std::ptr::null::<kvm_translation>())).writeable as *const _ as usize },
6986 17usize,
6987 concat!(
6988 "Offset of field: ",
6989 stringify!(kvm_translation),
6990 "::",
6991 stringify!(writeable)
6992 )
6993 );
6994 assert_eq!(
6995 unsafe { &(*(::std::ptr::null::<kvm_translation>())).usermode as *const _ as usize },
6996 18usize,
6997 concat!(
6998 "Offset of field: ",
6999 stringify!(kvm_translation),
7000 "::",
7001 stringify!(usermode)
7002 )
7003 );
7004 assert_eq!(
7005 unsafe { &(*(::std::ptr::null::<kvm_translation>())).pad as *const _ as usize },
7006 19usize,
7007 concat!(
7008 "Offset of field: ",
7009 stringify!(kvm_translation),
7010 "::",
7011 stringify!(pad)
7012 )
7013 );
7014 }
7015 #[repr(C)]
7016 #[derive(Debug, Default, Copy, Clone)]
7017 pub struct kvm_s390_mem_op {
7018 pub gaddr: __u64,
7019 pub flags: __u64,
7020 pub size: __u32,
7021 pub op: __u32,
7022 pub buf: __u64,
7023 pub ar: __u8,
7024 pub reserved: [__u8; 31usize],
7025 }
7026 #[test]
bindgen_test_layout_kvm_s390_mem_op()7027 fn bindgen_test_layout_kvm_s390_mem_op() {
7028 assert_eq!(
7029 ::std::mem::size_of::<kvm_s390_mem_op>(),
7030 64usize,
7031 concat!("Size of: ", stringify!(kvm_s390_mem_op))
7032 );
7033 assert_eq!(
7034 ::std::mem::align_of::<kvm_s390_mem_op>(),
7035 8usize,
7036 concat!("Alignment of ", stringify!(kvm_s390_mem_op))
7037 );
7038 assert_eq!(
7039 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).gaddr as *const _ as usize },
7040 0usize,
7041 concat!(
7042 "Offset of field: ",
7043 stringify!(kvm_s390_mem_op),
7044 "::",
7045 stringify!(gaddr)
7046 )
7047 );
7048 assert_eq!(
7049 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).flags as *const _ as usize },
7050 8usize,
7051 concat!(
7052 "Offset of field: ",
7053 stringify!(kvm_s390_mem_op),
7054 "::",
7055 stringify!(flags)
7056 )
7057 );
7058 assert_eq!(
7059 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).size as *const _ as usize },
7060 16usize,
7061 concat!(
7062 "Offset of field: ",
7063 stringify!(kvm_s390_mem_op),
7064 "::",
7065 stringify!(size)
7066 )
7067 );
7068 assert_eq!(
7069 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).op as *const _ as usize },
7070 20usize,
7071 concat!(
7072 "Offset of field: ",
7073 stringify!(kvm_s390_mem_op),
7074 "::",
7075 stringify!(op)
7076 )
7077 );
7078 assert_eq!(
7079 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).buf as *const _ as usize },
7080 24usize,
7081 concat!(
7082 "Offset of field: ",
7083 stringify!(kvm_s390_mem_op),
7084 "::",
7085 stringify!(buf)
7086 )
7087 );
7088 assert_eq!(
7089 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).ar as *const _ as usize },
7090 32usize,
7091 concat!(
7092 "Offset of field: ",
7093 stringify!(kvm_s390_mem_op),
7094 "::",
7095 stringify!(ar)
7096 )
7097 );
7098 assert_eq!(
7099 unsafe { &(*(::std::ptr::null::<kvm_s390_mem_op>())).reserved as *const _ as usize },
7100 33usize,
7101 concat!(
7102 "Offset of field: ",
7103 stringify!(kvm_s390_mem_op),
7104 "::",
7105 stringify!(reserved)
7106 )
7107 );
7108 }
7109 #[repr(C)]
7110 #[derive(Debug, Default, Copy, Clone)]
7111 pub struct kvm_interrupt {
7112 pub irq: __u32,
7113 }
7114 #[test]
bindgen_test_layout_kvm_interrupt()7115 fn bindgen_test_layout_kvm_interrupt() {
7116 assert_eq!(
7117 ::std::mem::size_of::<kvm_interrupt>(),
7118 4usize,
7119 concat!("Size of: ", stringify!(kvm_interrupt))
7120 );
7121 assert_eq!(
7122 ::std::mem::align_of::<kvm_interrupt>(),
7123 4usize,
7124 concat!("Alignment of ", stringify!(kvm_interrupt))
7125 );
7126 assert_eq!(
7127 unsafe { &(*(::std::ptr::null::<kvm_interrupt>())).irq as *const _ as usize },
7128 0usize,
7129 concat!(
7130 "Offset of field: ",
7131 stringify!(kvm_interrupt),
7132 "::",
7133 stringify!(irq)
7134 )
7135 );
7136 }
7137 #[repr(C)]
7138 #[derive(Copy, Clone)]
7139 pub struct kvm_dirty_log {
7140 pub slot: __u32,
7141 pub padding1: __u32,
7142 pub __bindgen_anon_1: kvm_dirty_log__bindgen_ty_1,
7143 }
7144 #[repr(C)]
7145 #[derive(Copy, Clone)]
7146 pub union kvm_dirty_log__bindgen_ty_1 {
7147 pub dirty_bitmap: *mut ::std::os::raw::c_void,
7148 pub padding2: __u64,
7149 _bindgen_union_align: u64,
7150 }
7151 #[test]
bindgen_test_layout_kvm_dirty_log__bindgen_ty_1()7152 fn bindgen_test_layout_kvm_dirty_log__bindgen_ty_1() {
7153 assert_eq!(
7154 ::std::mem::size_of::<kvm_dirty_log__bindgen_ty_1>(),
7155 8usize,
7156 concat!("Size of: ", stringify!(kvm_dirty_log__bindgen_ty_1))
7157 );
7158 assert_eq!(
7159 ::std::mem::align_of::<kvm_dirty_log__bindgen_ty_1>(),
7160 8usize,
7161 concat!("Alignment of ", stringify!(kvm_dirty_log__bindgen_ty_1))
7162 );
7163 assert_eq!(
7164 unsafe {
7165 &(*(::std::ptr::null::<kvm_dirty_log__bindgen_ty_1>())).dirty_bitmap as *const _
7166 as usize
7167 },
7168 0usize,
7169 concat!(
7170 "Offset of field: ",
7171 stringify!(kvm_dirty_log__bindgen_ty_1),
7172 "::",
7173 stringify!(dirty_bitmap)
7174 )
7175 );
7176 assert_eq!(
7177 unsafe {
7178 &(*(::std::ptr::null::<kvm_dirty_log__bindgen_ty_1>())).padding2 as *const _ as usize
7179 },
7180 0usize,
7181 concat!(
7182 "Offset of field: ",
7183 stringify!(kvm_dirty_log__bindgen_ty_1),
7184 "::",
7185 stringify!(padding2)
7186 )
7187 );
7188 }
7189 impl Default for kvm_dirty_log__bindgen_ty_1 {
default() -> Self7190 fn default() -> Self {
7191 unsafe { ::std::mem::zeroed() }
7192 }
7193 }
7194 #[test]
bindgen_test_layout_kvm_dirty_log()7195 fn bindgen_test_layout_kvm_dirty_log() {
7196 assert_eq!(
7197 ::std::mem::size_of::<kvm_dirty_log>(),
7198 16usize,
7199 concat!("Size of: ", stringify!(kvm_dirty_log))
7200 );
7201 assert_eq!(
7202 ::std::mem::align_of::<kvm_dirty_log>(),
7203 8usize,
7204 concat!("Alignment of ", stringify!(kvm_dirty_log))
7205 );
7206 assert_eq!(
7207 unsafe { &(*(::std::ptr::null::<kvm_dirty_log>())).slot as *const _ as usize },
7208 0usize,
7209 concat!(
7210 "Offset of field: ",
7211 stringify!(kvm_dirty_log),
7212 "::",
7213 stringify!(slot)
7214 )
7215 );
7216 assert_eq!(
7217 unsafe { &(*(::std::ptr::null::<kvm_dirty_log>())).padding1 as *const _ as usize },
7218 4usize,
7219 concat!(
7220 "Offset of field: ",
7221 stringify!(kvm_dirty_log),
7222 "::",
7223 stringify!(padding1)
7224 )
7225 );
7226 }
7227 impl Default for kvm_dirty_log {
default() -> Self7228 fn default() -> Self {
7229 unsafe { ::std::mem::zeroed() }
7230 }
7231 }
7232 #[repr(C)]
7233 #[derive(Copy, Clone)]
7234 pub struct kvm_clear_dirty_log {
7235 pub slot: __u32,
7236 pub num_pages: __u32,
7237 pub first_page: __u64,
7238 pub __bindgen_anon_1: kvm_clear_dirty_log__bindgen_ty_1,
7239 }
7240 #[repr(C)]
7241 #[derive(Copy, Clone)]
7242 pub union kvm_clear_dirty_log__bindgen_ty_1 {
7243 pub dirty_bitmap: *mut ::std::os::raw::c_void,
7244 pub padding2: __u64,
7245 _bindgen_union_align: u64,
7246 }
7247 #[test]
bindgen_test_layout_kvm_clear_dirty_log__bindgen_ty_1()7248 fn bindgen_test_layout_kvm_clear_dirty_log__bindgen_ty_1() {
7249 assert_eq!(
7250 ::std::mem::size_of::<kvm_clear_dirty_log__bindgen_ty_1>(),
7251 8usize,
7252 concat!("Size of: ", stringify!(kvm_clear_dirty_log__bindgen_ty_1))
7253 );
7254 assert_eq!(
7255 ::std::mem::align_of::<kvm_clear_dirty_log__bindgen_ty_1>(),
7256 8usize,
7257 concat!(
7258 "Alignment of ",
7259 stringify!(kvm_clear_dirty_log__bindgen_ty_1)
7260 )
7261 );
7262 assert_eq!(
7263 unsafe {
7264 &(*(::std::ptr::null::<kvm_clear_dirty_log__bindgen_ty_1>())).dirty_bitmap as *const _
7265 as usize
7266 },
7267 0usize,
7268 concat!(
7269 "Offset of field: ",
7270 stringify!(kvm_clear_dirty_log__bindgen_ty_1),
7271 "::",
7272 stringify!(dirty_bitmap)
7273 )
7274 );
7275 assert_eq!(
7276 unsafe {
7277 &(*(::std::ptr::null::<kvm_clear_dirty_log__bindgen_ty_1>())).padding2 as *const _
7278 as usize
7279 },
7280 0usize,
7281 concat!(
7282 "Offset of field: ",
7283 stringify!(kvm_clear_dirty_log__bindgen_ty_1),
7284 "::",
7285 stringify!(padding2)
7286 )
7287 );
7288 }
7289 impl Default for kvm_clear_dirty_log__bindgen_ty_1 {
default() -> Self7290 fn default() -> Self {
7291 unsafe { ::std::mem::zeroed() }
7292 }
7293 }
7294 #[test]
bindgen_test_layout_kvm_clear_dirty_log()7295 fn bindgen_test_layout_kvm_clear_dirty_log() {
7296 assert_eq!(
7297 ::std::mem::size_of::<kvm_clear_dirty_log>(),
7298 24usize,
7299 concat!("Size of: ", stringify!(kvm_clear_dirty_log))
7300 );
7301 assert_eq!(
7302 ::std::mem::align_of::<kvm_clear_dirty_log>(),
7303 8usize,
7304 concat!("Alignment of ", stringify!(kvm_clear_dirty_log))
7305 );
7306 assert_eq!(
7307 unsafe { &(*(::std::ptr::null::<kvm_clear_dirty_log>())).slot as *const _ as usize },
7308 0usize,
7309 concat!(
7310 "Offset of field: ",
7311 stringify!(kvm_clear_dirty_log),
7312 "::",
7313 stringify!(slot)
7314 )
7315 );
7316 assert_eq!(
7317 unsafe { &(*(::std::ptr::null::<kvm_clear_dirty_log>())).num_pages as *const _ as usize },
7318 4usize,
7319 concat!(
7320 "Offset of field: ",
7321 stringify!(kvm_clear_dirty_log),
7322 "::",
7323 stringify!(num_pages)
7324 )
7325 );
7326 assert_eq!(
7327 unsafe { &(*(::std::ptr::null::<kvm_clear_dirty_log>())).first_page as *const _ as usize },
7328 8usize,
7329 concat!(
7330 "Offset of field: ",
7331 stringify!(kvm_clear_dirty_log),
7332 "::",
7333 stringify!(first_page)
7334 )
7335 );
7336 }
7337 impl Default for kvm_clear_dirty_log {
default() -> Self7338 fn default() -> Self {
7339 unsafe { ::std::mem::zeroed() }
7340 }
7341 }
7342 #[repr(C)]
7343 #[derive(Debug, Default)]
7344 pub struct kvm_signal_mask {
7345 pub len: __u32,
7346 pub sigset: __IncompleteArrayField<__u8>,
7347 }
7348 #[test]
bindgen_test_layout_kvm_signal_mask()7349 fn bindgen_test_layout_kvm_signal_mask() {
7350 assert_eq!(
7351 ::std::mem::size_of::<kvm_signal_mask>(),
7352 4usize,
7353 concat!("Size of: ", stringify!(kvm_signal_mask))
7354 );
7355 assert_eq!(
7356 ::std::mem::align_of::<kvm_signal_mask>(),
7357 4usize,
7358 concat!("Alignment of ", stringify!(kvm_signal_mask))
7359 );
7360 assert_eq!(
7361 unsafe { &(*(::std::ptr::null::<kvm_signal_mask>())).len as *const _ as usize },
7362 0usize,
7363 concat!(
7364 "Offset of field: ",
7365 stringify!(kvm_signal_mask),
7366 "::",
7367 stringify!(len)
7368 )
7369 );
7370 assert_eq!(
7371 unsafe { &(*(::std::ptr::null::<kvm_signal_mask>())).sigset as *const _ as usize },
7372 4usize,
7373 concat!(
7374 "Offset of field: ",
7375 stringify!(kvm_signal_mask),
7376 "::",
7377 stringify!(sigset)
7378 )
7379 );
7380 }
7381 #[repr(C)]
7382 #[derive(Debug, Default, Copy, Clone)]
7383 pub struct kvm_tpr_access_ctl {
7384 pub enabled: __u32,
7385 pub flags: __u32,
7386 pub reserved: [__u32; 8usize],
7387 }
7388 #[test]
bindgen_test_layout_kvm_tpr_access_ctl()7389 fn bindgen_test_layout_kvm_tpr_access_ctl() {
7390 assert_eq!(
7391 ::std::mem::size_of::<kvm_tpr_access_ctl>(),
7392 40usize,
7393 concat!("Size of: ", stringify!(kvm_tpr_access_ctl))
7394 );
7395 assert_eq!(
7396 ::std::mem::align_of::<kvm_tpr_access_ctl>(),
7397 4usize,
7398 concat!("Alignment of ", stringify!(kvm_tpr_access_ctl))
7399 );
7400 assert_eq!(
7401 unsafe { &(*(::std::ptr::null::<kvm_tpr_access_ctl>())).enabled as *const _ as usize },
7402 0usize,
7403 concat!(
7404 "Offset of field: ",
7405 stringify!(kvm_tpr_access_ctl),
7406 "::",
7407 stringify!(enabled)
7408 )
7409 );
7410 assert_eq!(
7411 unsafe { &(*(::std::ptr::null::<kvm_tpr_access_ctl>())).flags as *const _ as usize },
7412 4usize,
7413 concat!(
7414 "Offset of field: ",
7415 stringify!(kvm_tpr_access_ctl),
7416 "::",
7417 stringify!(flags)
7418 )
7419 );
7420 assert_eq!(
7421 unsafe { &(*(::std::ptr::null::<kvm_tpr_access_ctl>())).reserved as *const _ as usize },
7422 8usize,
7423 concat!(
7424 "Offset of field: ",
7425 stringify!(kvm_tpr_access_ctl),
7426 "::",
7427 stringify!(reserved)
7428 )
7429 );
7430 }
7431 #[repr(C)]
7432 #[derive(Debug, Default, Copy, Clone)]
7433 pub struct kvm_vapic_addr {
7434 pub vapic_addr: __u64,
7435 }
7436 #[test]
bindgen_test_layout_kvm_vapic_addr()7437 fn bindgen_test_layout_kvm_vapic_addr() {
7438 assert_eq!(
7439 ::std::mem::size_of::<kvm_vapic_addr>(),
7440 8usize,
7441 concat!("Size of: ", stringify!(kvm_vapic_addr))
7442 );
7443 assert_eq!(
7444 ::std::mem::align_of::<kvm_vapic_addr>(),
7445 8usize,
7446 concat!("Alignment of ", stringify!(kvm_vapic_addr))
7447 );
7448 assert_eq!(
7449 unsafe { &(*(::std::ptr::null::<kvm_vapic_addr>())).vapic_addr as *const _ as usize },
7450 0usize,
7451 concat!(
7452 "Offset of field: ",
7453 stringify!(kvm_vapic_addr),
7454 "::",
7455 stringify!(vapic_addr)
7456 )
7457 );
7458 }
7459 #[repr(C)]
7460 #[derive(Debug, Default, Copy, Clone)]
7461 pub struct kvm_mp_state {
7462 pub mp_state: __u32,
7463 }
7464 #[test]
bindgen_test_layout_kvm_mp_state()7465 fn bindgen_test_layout_kvm_mp_state() {
7466 assert_eq!(
7467 ::std::mem::size_of::<kvm_mp_state>(),
7468 4usize,
7469 concat!("Size of: ", stringify!(kvm_mp_state))
7470 );
7471 assert_eq!(
7472 ::std::mem::align_of::<kvm_mp_state>(),
7473 4usize,
7474 concat!("Alignment of ", stringify!(kvm_mp_state))
7475 );
7476 assert_eq!(
7477 unsafe { &(*(::std::ptr::null::<kvm_mp_state>())).mp_state as *const _ as usize },
7478 0usize,
7479 concat!(
7480 "Offset of field: ",
7481 stringify!(kvm_mp_state),
7482 "::",
7483 stringify!(mp_state)
7484 )
7485 );
7486 }
7487 #[repr(C)]
7488 #[derive(Debug, Default, Copy, Clone)]
7489 pub struct kvm_s390_psw {
7490 pub mask: __u64,
7491 pub addr: __u64,
7492 }
7493 #[test]
bindgen_test_layout_kvm_s390_psw()7494 fn bindgen_test_layout_kvm_s390_psw() {
7495 assert_eq!(
7496 ::std::mem::size_of::<kvm_s390_psw>(),
7497 16usize,
7498 concat!("Size of: ", stringify!(kvm_s390_psw))
7499 );
7500 assert_eq!(
7501 ::std::mem::align_of::<kvm_s390_psw>(),
7502 8usize,
7503 concat!("Alignment of ", stringify!(kvm_s390_psw))
7504 );
7505 assert_eq!(
7506 unsafe { &(*(::std::ptr::null::<kvm_s390_psw>())).mask as *const _ as usize },
7507 0usize,
7508 concat!(
7509 "Offset of field: ",
7510 stringify!(kvm_s390_psw),
7511 "::",
7512 stringify!(mask)
7513 )
7514 );
7515 assert_eq!(
7516 unsafe { &(*(::std::ptr::null::<kvm_s390_psw>())).addr as *const _ as usize },
7517 8usize,
7518 concat!(
7519 "Offset of field: ",
7520 stringify!(kvm_s390_psw),
7521 "::",
7522 stringify!(addr)
7523 )
7524 );
7525 }
7526 #[repr(C)]
7527 #[derive(Debug, Default, Copy, Clone)]
7528 pub struct kvm_s390_interrupt {
7529 pub type_: __u32,
7530 pub parm: __u32,
7531 pub parm64: __u64,
7532 }
7533 #[test]
bindgen_test_layout_kvm_s390_interrupt()7534 fn bindgen_test_layout_kvm_s390_interrupt() {
7535 assert_eq!(
7536 ::std::mem::size_of::<kvm_s390_interrupt>(),
7537 16usize,
7538 concat!("Size of: ", stringify!(kvm_s390_interrupt))
7539 );
7540 assert_eq!(
7541 ::std::mem::align_of::<kvm_s390_interrupt>(),
7542 8usize,
7543 concat!("Alignment of ", stringify!(kvm_s390_interrupt))
7544 );
7545 assert_eq!(
7546 unsafe { &(*(::std::ptr::null::<kvm_s390_interrupt>())).type_ as *const _ as usize },
7547 0usize,
7548 concat!(
7549 "Offset of field: ",
7550 stringify!(kvm_s390_interrupt),
7551 "::",
7552 stringify!(type_)
7553 )
7554 );
7555 assert_eq!(
7556 unsafe { &(*(::std::ptr::null::<kvm_s390_interrupt>())).parm as *const _ as usize },
7557 4usize,
7558 concat!(
7559 "Offset of field: ",
7560 stringify!(kvm_s390_interrupt),
7561 "::",
7562 stringify!(parm)
7563 )
7564 );
7565 assert_eq!(
7566 unsafe { &(*(::std::ptr::null::<kvm_s390_interrupt>())).parm64 as *const _ as usize },
7567 8usize,
7568 concat!(
7569 "Offset of field: ",
7570 stringify!(kvm_s390_interrupt),
7571 "::",
7572 stringify!(parm64)
7573 )
7574 );
7575 }
7576 #[repr(C)]
7577 #[derive(Debug, Default, Copy, Clone)]
7578 pub struct kvm_s390_io_info {
7579 pub subchannel_id: __u16,
7580 pub subchannel_nr: __u16,
7581 pub io_int_parm: __u32,
7582 pub io_int_word: __u32,
7583 }
7584 #[test]
bindgen_test_layout_kvm_s390_io_info()7585 fn bindgen_test_layout_kvm_s390_io_info() {
7586 assert_eq!(
7587 ::std::mem::size_of::<kvm_s390_io_info>(),
7588 12usize,
7589 concat!("Size of: ", stringify!(kvm_s390_io_info))
7590 );
7591 assert_eq!(
7592 ::std::mem::align_of::<kvm_s390_io_info>(),
7593 4usize,
7594 concat!("Alignment of ", stringify!(kvm_s390_io_info))
7595 );
7596 assert_eq!(
7597 unsafe { &(*(::std::ptr::null::<kvm_s390_io_info>())).subchannel_id as *const _ as usize },
7598 0usize,
7599 concat!(
7600 "Offset of field: ",
7601 stringify!(kvm_s390_io_info),
7602 "::",
7603 stringify!(subchannel_id)
7604 )
7605 );
7606 assert_eq!(
7607 unsafe { &(*(::std::ptr::null::<kvm_s390_io_info>())).subchannel_nr as *const _ as usize },
7608 2usize,
7609 concat!(
7610 "Offset of field: ",
7611 stringify!(kvm_s390_io_info),
7612 "::",
7613 stringify!(subchannel_nr)
7614 )
7615 );
7616 assert_eq!(
7617 unsafe { &(*(::std::ptr::null::<kvm_s390_io_info>())).io_int_parm as *const _ as usize },
7618 4usize,
7619 concat!(
7620 "Offset of field: ",
7621 stringify!(kvm_s390_io_info),
7622 "::",
7623 stringify!(io_int_parm)
7624 )
7625 );
7626 assert_eq!(
7627 unsafe { &(*(::std::ptr::null::<kvm_s390_io_info>())).io_int_word as *const _ as usize },
7628 8usize,
7629 concat!(
7630 "Offset of field: ",
7631 stringify!(kvm_s390_io_info),
7632 "::",
7633 stringify!(io_int_word)
7634 )
7635 );
7636 }
7637 #[repr(C)]
7638 #[derive(Debug, Default, Copy, Clone)]
7639 pub struct kvm_s390_ext_info {
7640 pub ext_params: __u32,
7641 pub pad: __u32,
7642 pub ext_params2: __u64,
7643 }
7644 #[test]
bindgen_test_layout_kvm_s390_ext_info()7645 fn bindgen_test_layout_kvm_s390_ext_info() {
7646 assert_eq!(
7647 ::std::mem::size_of::<kvm_s390_ext_info>(),
7648 16usize,
7649 concat!("Size of: ", stringify!(kvm_s390_ext_info))
7650 );
7651 assert_eq!(
7652 ::std::mem::align_of::<kvm_s390_ext_info>(),
7653 8usize,
7654 concat!("Alignment of ", stringify!(kvm_s390_ext_info))
7655 );
7656 assert_eq!(
7657 unsafe { &(*(::std::ptr::null::<kvm_s390_ext_info>())).ext_params as *const _ as usize },
7658 0usize,
7659 concat!(
7660 "Offset of field: ",
7661 stringify!(kvm_s390_ext_info),
7662 "::",
7663 stringify!(ext_params)
7664 )
7665 );
7666 assert_eq!(
7667 unsafe { &(*(::std::ptr::null::<kvm_s390_ext_info>())).pad as *const _ as usize },
7668 4usize,
7669 concat!(
7670 "Offset of field: ",
7671 stringify!(kvm_s390_ext_info),
7672 "::",
7673 stringify!(pad)
7674 )
7675 );
7676 assert_eq!(
7677 unsafe { &(*(::std::ptr::null::<kvm_s390_ext_info>())).ext_params2 as *const _ as usize },
7678 8usize,
7679 concat!(
7680 "Offset of field: ",
7681 stringify!(kvm_s390_ext_info),
7682 "::",
7683 stringify!(ext_params2)
7684 )
7685 );
7686 }
7687 #[repr(C)]
7688 #[derive(Debug, Default, Copy, Clone)]
7689 pub struct kvm_s390_pgm_info {
7690 pub trans_exc_code: __u64,
7691 pub mon_code: __u64,
7692 pub per_address: __u64,
7693 pub data_exc_code: __u32,
7694 pub code: __u16,
7695 pub mon_class_nr: __u16,
7696 pub per_code: __u8,
7697 pub per_atmid: __u8,
7698 pub exc_access_id: __u8,
7699 pub per_access_id: __u8,
7700 pub op_access_id: __u8,
7701 pub flags: __u8,
7702 pub pad: [__u8; 2usize],
7703 }
7704 #[test]
bindgen_test_layout_kvm_s390_pgm_info()7705 fn bindgen_test_layout_kvm_s390_pgm_info() {
7706 assert_eq!(
7707 ::std::mem::size_of::<kvm_s390_pgm_info>(),
7708 40usize,
7709 concat!("Size of: ", stringify!(kvm_s390_pgm_info))
7710 );
7711 assert_eq!(
7712 ::std::mem::align_of::<kvm_s390_pgm_info>(),
7713 8usize,
7714 concat!("Alignment of ", stringify!(kvm_s390_pgm_info))
7715 );
7716 assert_eq!(
7717 unsafe {
7718 &(*(::std::ptr::null::<kvm_s390_pgm_info>())).trans_exc_code as *const _ as usize
7719 },
7720 0usize,
7721 concat!(
7722 "Offset of field: ",
7723 stringify!(kvm_s390_pgm_info),
7724 "::",
7725 stringify!(trans_exc_code)
7726 )
7727 );
7728 assert_eq!(
7729 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).mon_code as *const _ as usize },
7730 8usize,
7731 concat!(
7732 "Offset of field: ",
7733 stringify!(kvm_s390_pgm_info),
7734 "::",
7735 stringify!(mon_code)
7736 )
7737 );
7738 assert_eq!(
7739 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).per_address as *const _ as usize },
7740 16usize,
7741 concat!(
7742 "Offset of field: ",
7743 stringify!(kvm_s390_pgm_info),
7744 "::",
7745 stringify!(per_address)
7746 )
7747 );
7748 assert_eq!(
7749 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).data_exc_code as *const _ as usize },
7750 24usize,
7751 concat!(
7752 "Offset of field: ",
7753 stringify!(kvm_s390_pgm_info),
7754 "::",
7755 stringify!(data_exc_code)
7756 )
7757 );
7758 assert_eq!(
7759 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).code as *const _ as usize },
7760 28usize,
7761 concat!(
7762 "Offset of field: ",
7763 stringify!(kvm_s390_pgm_info),
7764 "::",
7765 stringify!(code)
7766 )
7767 );
7768 assert_eq!(
7769 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).mon_class_nr as *const _ as usize },
7770 30usize,
7771 concat!(
7772 "Offset of field: ",
7773 stringify!(kvm_s390_pgm_info),
7774 "::",
7775 stringify!(mon_class_nr)
7776 )
7777 );
7778 assert_eq!(
7779 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).per_code as *const _ as usize },
7780 32usize,
7781 concat!(
7782 "Offset of field: ",
7783 stringify!(kvm_s390_pgm_info),
7784 "::",
7785 stringify!(per_code)
7786 )
7787 );
7788 assert_eq!(
7789 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).per_atmid as *const _ as usize },
7790 33usize,
7791 concat!(
7792 "Offset of field: ",
7793 stringify!(kvm_s390_pgm_info),
7794 "::",
7795 stringify!(per_atmid)
7796 )
7797 );
7798 assert_eq!(
7799 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).exc_access_id as *const _ as usize },
7800 34usize,
7801 concat!(
7802 "Offset of field: ",
7803 stringify!(kvm_s390_pgm_info),
7804 "::",
7805 stringify!(exc_access_id)
7806 )
7807 );
7808 assert_eq!(
7809 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).per_access_id as *const _ as usize },
7810 35usize,
7811 concat!(
7812 "Offset of field: ",
7813 stringify!(kvm_s390_pgm_info),
7814 "::",
7815 stringify!(per_access_id)
7816 )
7817 );
7818 assert_eq!(
7819 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).op_access_id as *const _ as usize },
7820 36usize,
7821 concat!(
7822 "Offset of field: ",
7823 stringify!(kvm_s390_pgm_info),
7824 "::",
7825 stringify!(op_access_id)
7826 )
7827 );
7828 assert_eq!(
7829 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).flags as *const _ as usize },
7830 37usize,
7831 concat!(
7832 "Offset of field: ",
7833 stringify!(kvm_s390_pgm_info),
7834 "::",
7835 stringify!(flags)
7836 )
7837 );
7838 assert_eq!(
7839 unsafe { &(*(::std::ptr::null::<kvm_s390_pgm_info>())).pad as *const _ as usize },
7840 38usize,
7841 concat!(
7842 "Offset of field: ",
7843 stringify!(kvm_s390_pgm_info),
7844 "::",
7845 stringify!(pad)
7846 )
7847 );
7848 }
7849 #[repr(C)]
7850 #[derive(Debug, Default, Copy, Clone)]
7851 pub struct kvm_s390_prefix_info {
7852 pub address: __u32,
7853 }
7854 #[test]
bindgen_test_layout_kvm_s390_prefix_info()7855 fn bindgen_test_layout_kvm_s390_prefix_info() {
7856 assert_eq!(
7857 ::std::mem::size_of::<kvm_s390_prefix_info>(),
7858 4usize,
7859 concat!("Size of: ", stringify!(kvm_s390_prefix_info))
7860 );
7861 assert_eq!(
7862 ::std::mem::align_of::<kvm_s390_prefix_info>(),
7863 4usize,
7864 concat!("Alignment of ", stringify!(kvm_s390_prefix_info))
7865 );
7866 assert_eq!(
7867 unsafe { &(*(::std::ptr::null::<kvm_s390_prefix_info>())).address as *const _ as usize },
7868 0usize,
7869 concat!(
7870 "Offset of field: ",
7871 stringify!(kvm_s390_prefix_info),
7872 "::",
7873 stringify!(address)
7874 )
7875 );
7876 }
7877 #[repr(C)]
7878 #[derive(Debug, Default, Copy, Clone)]
7879 pub struct kvm_s390_extcall_info {
7880 pub code: __u16,
7881 }
7882 #[test]
bindgen_test_layout_kvm_s390_extcall_info()7883 fn bindgen_test_layout_kvm_s390_extcall_info() {
7884 assert_eq!(
7885 ::std::mem::size_of::<kvm_s390_extcall_info>(),
7886 2usize,
7887 concat!("Size of: ", stringify!(kvm_s390_extcall_info))
7888 );
7889 assert_eq!(
7890 ::std::mem::align_of::<kvm_s390_extcall_info>(),
7891 2usize,
7892 concat!("Alignment of ", stringify!(kvm_s390_extcall_info))
7893 );
7894 assert_eq!(
7895 unsafe { &(*(::std::ptr::null::<kvm_s390_extcall_info>())).code as *const _ as usize },
7896 0usize,
7897 concat!(
7898 "Offset of field: ",
7899 stringify!(kvm_s390_extcall_info),
7900 "::",
7901 stringify!(code)
7902 )
7903 );
7904 }
7905 #[repr(C)]
7906 #[derive(Debug, Default, Copy, Clone)]
7907 pub struct kvm_s390_emerg_info {
7908 pub code: __u16,
7909 }
7910 #[test]
bindgen_test_layout_kvm_s390_emerg_info()7911 fn bindgen_test_layout_kvm_s390_emerg_info() {
7912 assert_eq!(
7913 ::std::mem::size_of::<kvm_s390_emerg_info>(),
7914 2usize,
7915 concat!("Size of: ", stringify!(kvm_s390_emerg_info))
7916 );
7917 assert_eq!(
7918 ::std::mem::align_of::<kvm_s390_emerg_info>(),
7919 2usize,
7920 concat!("Alignment of ", stringify!(kvm_s390_emerg_info))
7921 );
7922 assert_eq!(
7923 unsafe { &(*(::std::ptr::null::<kvm_s390_emerg_info>())).code as *const _ as usize },
7924 0usize,
7925 concat!(
7926 "Offset of field: ",
7927 stringify!(kvm_s390_emerg_info),
7928 "::",
7929 stringify!(code)
7930 )
7931 );
7932 }
7933 #[repr(C)]
7934 #[derive(Debug, Default, Copy, Clone)]
7935 pub struct kvm_s390_stop_info {
7936 pub flags: __u32,
7937 }
7938 #[test]
bindgen_test_layout_kvm_s390_stop_info()7939 fn bindgen_test_layout_kvm_s390_stop_info() {
7940 assert_eq!(
7941 ::std::mem::size_of::<kvm_s390_stop_info>(),
7942 4usize,
7943 concat!("Size of: ", stringify!(kvm_s390_stop_info))
7944 );
7945 assert_eq!(
7946 ::std::mem::align_of::<kvm_s390_stop_info>(),
7947 4usize,
7948 concat!("Alignment of ", stringify!(kvm_s390_stop_info))
7949 );
7950 assert_eq!(
7951 unsafe { &(*(::std::ptr::null::<kvm_s390_stop_info>())).flags as *const _ as usize },
7952 0usize,
7953 concat!(
7954 "Offset of field: ",
7955 stringify!(kvm_s390_stop_info),
7956 "::",
7957 stringify!(flags)
7958 )
7959 );
7960 }
7961 #[repr(C)]
7962 #[derive(Debug, Default, Copy, Clone)]
7963 pub struct kvm_s390_mchk_info {
7964 pub cr14: __u64,
7965 pub mcic: __u64,
7966 pub failing_storage_address: __u64,
7967 pub ext_damage_code: __u32,
7968 pub pad: __u32,
7969 pub fixed_logout: [__u8; 16usize],
7970 }
7971 #[test]
bindgen_test_layout_kvm_s390_mchk_info()7972 fn bindgen_test_layout_kvm_s390_mchk_info() {
7973 assert_eq!(
7974 ::std::mem::size_of::<kvm_s390_mchk_info>(),
7975 48usize,
7976 concat!("Size of: ", stringify!(kvm_s390_mchk_info))
7977 );
7978 assert_eq!(
7979 ::std::mem::align_of::<kvm_s390_mchk_info>(),
7980 8usize,
7981 concat!("Alignment of ", stringify!(kvm_s390_mchk_info))
7982 );
7983 assert_eq!(
7984 unsafe { &(*(::std::ptr::null::<kvm_s390_mchk_info>())).cr14 as *const _ as usize },
7985 0usize,
7986 concat!(
7987 "Offset of field: ",
7988 stringify!(kvm_s390_mchk_info),
7989 "::",
7990 stringify!(cr14)
7991 )
7992 );
7993 assert_eq!(
7994 unsafe { &(*(::std::ptr::null::<kvm_s390_mchk_info>())).mcic as *const _ as usize },
7995 8usize,
7996 concat!(
7997 "Offset of field: ",
7998 stringify!(kvm_s390_mchk_info),
7999 "::",
8000 stringify!(mcic)
8001 )
8002 );
8003 assert_eq!(
8004 unsafe {
8005 &(*(::std::ptr::null::<kvm_s390_mchk_info>())).failing_storage_address as *const _
8006 as usize
8007 },
8008 16usize,
8009 concat!(
8010 "Offset of field: ",
8011 stringify!(kvm_s390_mchk_info),
8012 "::",
8013 stringify!(failing_storage_address)
8014 )
8015 );
8016 assert_eq!(
8017 unsafe {
8018 &(*(::std::ptr::null::<kvm_s390_mchk_info>())).ext_damage_code as *const _ as usize
8019 },
8020 24usize,
8021 concat!(
8022 "Offset of field: ",
8023 stringify!(kvm_s390_mchk_info),
8024 "::",
8025 stringify!(ext_damage_code)
8026 )
8027 );
8028 assert_eq!(
8029 unsafe { &(*(::std::ptr::null::<kvm_s390_mchk_info>())).pad as *const _ as usize },
8030 28usize,
8031 concat!(
8032 "Offset of field: ",
8033 stringify!(kvm_s390_mchk_info),
8034 "::",
8035 stringify!(pad)
8036 )
8037 );
8038 assert_eq!(
8039 unsafe { &(*(::std::ptr::null::<kvm_s390_mchk_info>())).fixed_logout as *const _ as usize },
8040 32usize,
8041 concat!(
8042 "Offset of field: ",
8043 stringify!(kvm_s390_mchk_info),
8044 "::",
8045 stringify!(fixed_logout)
8046 )
8047 );
8048 }
8049 #[repr(C)]
8050 #[derive(Copy, Clone)]
8051 pub struct kvm_s390_irq {
8052 pub type_: __u64,
8053 pub u: kvm_s390_irq__bindgen_ty_1,
8054 }
8055 #[repr(C)]
8056 #[derive(Copy, Clone)]
8057 pub union kvm_s390_irq__bindgen_ty_1 {
8058 pub io: kvm_s390_io_info,
8059 pub ext: kvm_s390_ext_info,
8060 pub pgm: kvm_s390_pgm_info,
8061 pub emerg: kvm_s390_emerg_info,
8062 pub extcall: kvm_s390_extcall_info,
8063 pub prefix: kvm_s390_prefix_info,
8064 pub stop: kvm_s390_stop_info,
8065 pub mchk: kvm_s390_mchk_info,
8066 pub reserved: [::std::os::raw::c_char; 64usize],
8067 _bindgen_union_align: [u64; 8usize],
8068 }
8069 #[test]
bindgen_test_layout_kvm_s390_irq__bindgen_ty_1()8070 fn bindgen_test_layout_kvm_s390_irq__bindgen_ty_1() {
8071 assert_eq!(
8072 ::std::mem::size_of::<kvm_s390_irq__bindgen_ty_1>(),
8073 64usize,
8074 concat!("Size of: ", stringify!(kvm_s390_irq__bindgen_ty_1))
8075 );
8076 assert_eq!(
8077 ::std::mem::align_of::<kvm_s390_irq__bindgen_ty_1>(),
8078 8usize,
8079 concat!("Alignment of ", stringify!(kvm_s390_irq__bindgen_ty_1))
8080 );
8081 assert_eq!(
8082 unsafe { &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).io as *const _ as usize },
8083 0usize,
8084 concat!(
8085 "Offset of field: ",
8086 stringify!(kvm_s390_irq__bindgen_ty_1),
8087 "::",
8088 stringify!(io)
8089 )
8090 );
8091 assert_eq!(
8092 unsafe { &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).ext as *const _ as usize },
8093 0usize,
8094 concat!(
8095 "Offset of field: ",
8096 stringify!(kvm_s390_irq__bindgen_ty_1),
8097 "::",
8098 stringify!(ext)
8099 )
8100 );
8101 assert_eq!(
8102 unsafe { &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).pgm as *const _ as usize },
8103 0usize,
8104 concat!(
8105 "Offset of field: ",
8106 stringify!(kvm_s390_irq__bindgen_ty_1),
8107 "::",
8108 stringify!(pgm)
8109 )
8110 );
8111 assert_eq!(
8112 unsafe {
8113 &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).emerg as *const _ as usize
8114 },
8115 0usize,
8116 concat!(
8117 "Offset of field: ",
8118 stringify!(kvm_s390_irq__bindgen_ty_1),
8119 "::",
8120 stringify!(emerg)
8121 )
8122 );
8123 assert_eq!(
8124 unsafe {
8125 &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).extcall as *const _ as usize
8126 },
8127 0usize,
8128 concat!(
8129 "Offset of field: ",
8130 stringify!(kvm_s390_irq__bindgen_ty_1),
8131 "::",
8132 stringify!(extcall)
8133 )
8134 );
8135 assert_eq!(
8136 unsafe {
8137 &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).prefix as *const _ as usize
8138 },
8139 0usize,
8140 concat!(
8141 "Offset of field: ",
8142 stringify!(kvm_s390_irq__bindgen_ty_1),
8143 "::",
8144 stringify!(prefix)
8145 )
8146 );
8147 assert_eq!(
8148 unsafe { &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).stop as *const _ as usize },
8149 0usize,
8150 concat!(
8151 "Offset of field: ",
8152 stringify!(kvm_s390_irq__bindgen_ty_1),
8153 "::",
8154 stringify!(stop)
8155 )
8156 );
8157 assert_eq!(
8158 unsafe { &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).mchk as *const _ as usize },
8159 0usize,
8160 concat!(
8161 "Offset of field: ",
8162 stringify!(kvm_s390_irq__bindgen_ty_1),
8163 "::",
8164 stringify!(mchk)
8165 )
8166 );
8167 assert_eq!(
8168 unsafe {
8169 &(*(::std::ptr::null::<kvm_s390_irq__bindgen_ty_1>())).reserved as *const _ as usize
8170 },
8171 0usize,
8172 concat!(
8173 "Offset of field: ",
8174 stringify!(kvm_s390_irq__bindgen_ty_1),
8175 "::",
8176 stringify!(reserved)
8177 )
8178 );
8179 }
8180 impl Default for kvm_s390_irq__bindgen_ty_1 {
default() -> Self8181 fn default() -> Self {
8182 unsafe { ::std::mem::zeroed() }
8183 }
8184 }
8185 #[test]
bindgen_test_layout_kvm_s390_irq()8186 fn bindgen_test_layout_kvm_s390_irq() {
8187 assert_eq!(
8188 ::std::mem::size_of::<kvm_s390_irq>(),
8189 72usize,
8190 concat!("Size of: ", stringify!(kvm_s390_irq))
8191 );
8192 assert_eq!(
8193 ::std::mem::align_of::<kvm_s390_irq>(),
8194 8usize,
8195 concat!("Alignment of ", stringify!(kvm_s390_irq))
8196 );
8197 assert_eq!(
8198 unsafe { &(*(::std::ptr::null::<kvm_s390_irq>())).type_ as *const _ as usize },
8199 0usize,
8200 concat!(
8201 "Offset of field: ",
8202 stringify!(kvm_s390_irq),
8203 "::",
8204 stringify!(type_)
8205 )
8206 );
8207 assert_eq!(
8208 unsafe { &(*(::std::ptr::null::<kvm_s390_irq>())).u as *const _ as usize },
8209 8usize,
8210 concat!(
8211 "Offset of field: ",
8212 stringify!(kvm_s390_irq),
8213 "::",
8214 stringify!(u)
8215 )
8216 );
8217 }
8218 impl Default for kvm_s390_irq {
default() -> Self8219 fn default() -> Self {
8220 unsafe { ::std::mem::zeroed() }
8221 }
8222 }
8223 #[repr(C)]
8224 #[derive(Debug, Default, Copy, Clone)]
8225 pub struct kvm_s390_irq_state {
8226 pub buf: __u64,
8227 pub flags: __u32,
8228 pub len: __u32,
8229 pub reserved: [__u32; 4usize],
8230 }
8231 #[test]
bindgen_test_layout_kvm_s390_irq_state()8232 fn bindgen_test_layout_kvm_s390_irq_state() {
8233 assert_eq!(
8234 ::std::mem::size_of::<kvm_s390_irq_state>(),
8235 32usize,
8236 concat!("Size of: ", stringify!(kvm_s390_irq_state))
8237 );
8238 assert_eq!(
8239 ::std::mem::align_of::<kvm_s390_irq_state>(),
8240 8usize,
8241 concat!("Alignment of ", stringify!(kvm_s390_irq_state))
8242 );
8243 assert_eq!(
8244 unsafe { &(*(::std::ptr::null::<kvm_s390_irq_state>())).buf as *const _ as usize },
8245 0usize,
8246 concat!(
8247 "Offset of field: ",
8248 stringify!(kvm_s390_irq_state),
8249 "::",
8250 stringify!(buf)
8251 )
8252 );
8253 assert_eq!(
8254 unsafe { &(*(::std::ptr::null::<kvm_s390_irq_state>())).flags as *const _ as usize },
8255 8usize,
8256 concat!(
8257 "Offset of field: ",
8258 stringify!(kvm_s390_irq_state),
8259 "::",
8260 stringify!(flags)
8261 )
8262 );
8263 assert_eq!(
8264 unsafe { &(*(::std::ptr::null::<kvm_s390_irq_state>())).len as *const _ as usize },
8265 12usize,
8266 concat!(
8267 "Offset of field: ",
8268 stringify!(kvm_s390_irq_state),
8269 "::",
8270 stringify!(len)
8271 )
8272 );
8273 assert_eq!(
8274 unsafe { &(*(::std::ptr::null::<kvm_s390_irq_state>())).reserved as *const _ as usize },
8275 16usize,
8276 concat!(
8277 "Offset of field: ",
8278 stringify!(kvm_s390_irq_state),
8279 "::",
8280 stringify!(reserved)
8281 )
8282 );
8283 }
8284 #[repr(C)]
8285 #[derive(Debug, Default, Copy, Clone)]
8286 pub struct kvm_guest_debug {
8287 pub control: __u32,
8288 pub pad: __u32,
8289 pub arch: kvm_guest_debug_arch,
8290 }
8291 #[test]
bindgen_test_layout_kvm_guest_debug()8292 fn bindgen_test_layout_kvm_guest_debug() {
8293 assert_eq!(
8294 ::std::mem::size_of::<kvm_guest_debug>(),
8295 72usize,
8296 concat!("Size of: ", stringify!(kvm_guest_debug))
8297 );
8298 assert_eq!(
8299 ::std::mem::align_of::<kvm_guest_debug>(),
8300 8usize,
8301 concat!("Alignment of ", stringify!(kvm_guest_debug))
8302 );
8303 assert_eq!(
8304 unsafe { &(*(::std::ptr::null::<kvm_guest_debug>())).control as *const _ as usize },
8305 0usize,
8306 concat!(
8307 "Offset of field: ",
8308 stringify!(kvm_guest_debug),
8309 "::",
8310 stringify!(control)
8311 )
8312 );
8313 assert_eq!(
8314 unsafe { &(*(::std::ptr::null::<kvm_guest_debug>())).pad as *const _ as usize },
8315 4usize,
8316 concat!(
8317 "Offset of field: ",
8318 stringify!(kvm_guest_debug),
8319 "::",
8320 stringify!(pad)
8321 )
8322 );
8323 assert_eq!(
8324 unsafe { &(*(::std::ptr::null::<kvm_guest_debug>())).arch as *const _ as usize },
8325 8usize,
8326 concat!(
8327 "Offset of field: ",
8328 stringify!(kvm_guest_debug),
8329 "::",
8330 stringify!(arch)
8331 )
8332 );
8333 }
8334 pub const kvm_ioeventfd_flag_nr_datamatch: _bindgen_ty_1 = 0;
8335 pub const kvm_ioeventfd_flag_nr_pio: _bindgen_ty_1 = 1;
8336 pub const kvm_ioeventfd_flag_nr_deassign: _bindgen_ty_1 = 2;
8337 pub const kvm_ioeventfd_flag_nr_virtio_ccw_notify: _bindgen_ty_1 = 3;
8338 pub const kvm_ioeventfd_flag_nr_fast_mmio: _bindgen_ty_1 = 4;
8339 pub const kvm_ioeventfd_flag_nr_max: _bindgen_ty_1 = 5;
8340 pub type _bindgen_ty_1 = u32;
8341 #[repr(C)]
8342 #[derive(Copy, Clone)]
8343 pub struct kvm_ioeventfd {
8344 pub datamatch: __u64,
8345 pub addr: __u64,
8346 pub len: __u32,
8347 pub fd: __s32,
8348 pub flags: __u32,
8349 pub pad: [__u8; 36usize],
8350 }
8351 #[test]
bindgen_test_layout_kvm_ioeventfd()8352 fn bindgen_test_layout_kvm_ioeventfd() {
8353 assert_eq!(
8354 ::std::mem::size_of::<kvm_ioeventfd>(),
8355 64usize,
8356 concat!("Size of: ", stringify!(kvm_ioeventfd))
8357 );
8358 assert_eq!(
8359 ::std::mem::align_of::<kvm_ioeventfd>(),
8360 8usize,
8361 concat!("Alignment of ", stringify!(kvm_ioeventfd))
8362 );
8363 assert_eq!(
8364 unsafe { &(*(::std::ptr::null::<kvm_ioeventfd>())).datamatch as *const _ as usize },
8365 0usize,
8366 concat!(
8367 "Offset of field: ",
8368 stringify!(kvm_ioeventfd),
8369 "::",
8370 stringify!(datamatch)
8371 )
8372 );
8373 assert_eq!(
8374 unsafe { &(*(::std::ptr::null::<kvm_ioeventfd>())).addr as *const _ as usize },
8375 8usize,
8376 concat!(
8377 "Offset of field: ",
8378 stringify!(kvm_ioeventfd),
8379 "::",
8380 stringify!(addr)
8381 )
8382 );
8383 assert_eq!(
8384 unsafe { &(*(::std::ptr::null::<kvm_ioeventfd>())).len as *const _ as usize },
8385 16usize,
8386 concat!(
8387 "Offset of field: ",
8388 stringify!(kvm_ioeventfd),
8389 "::",
8390 stringify!(len)
8391 )
8392 );
8393 assert_eq!(
8394 unsafe { &(*(::std::ptr::null::<kvm_ioeventfd>())).fd as *const _ as usize },
8395 20usize,
8396 concat!(
8397 "Offset of field: ",
8398 stringify!(kvm_ioeventfd),
8399 "::",
8400 stringify!(fd)
8401 )
8402 );
8403 assert_eq!(
8404 unsafe { &(*(::std::ptr::null::<kvm_ioeventfd>())).flags as *const _ as usize },
8405 24usize,
8406 concat!(
8407 "Offset of field: ",
8408 stringify!(kvm_ioeventfd),
8409 "::",
8410 stringify!(flags)
8411 )
8412 );
8413 assert_eq!(
8414 unsafe { &(*(::std::ptr::null::<kvm_ioeventfd>())).pad as *const _ as usize },
8415 28usize,
8416 concat!(
8417 "Offset of field: ",
8418 stringify!(kvm_ioeventfd),
8419 "::",
8420 stringify!(pad)
8421 )
8422 );
8423 }
8424 impl Default for kvm_ioeventfd {
default() -> Self8425 fn default() -> Self {
8426 unsafe { ::std::mem::zeroed() }
8427 }
8428 }
8429 #[repr(C)]
8430 #[derive(Copy, Clone)]
8431 pub struct kvm_enable_cap {
8432 pub cap: __u32,
8433 pub flags: __u32,
8434 pub args: [__u64; 4usize],
8435 pub pad: [__u8; 64usize],
8436 }
8437 #[test]
bindgen_test_layout_kvm_enable_cap()8438 fn bindgen_test_layout_kvm_enable_cap() {
8439 assert_eq!(
8440 ::std::mem::size_of::<kvm_enable_cap>(),
8441 104usize,
8442 concat!("Size of: ", stringify!(kvm_enable_cap))
8443 );
8444 assert_eq!(
8445 ::std::mem::align_of::<kvm_enable_cap>(),
8446 8usize,
8447 concat!("Alignment of ", stringify!(kvm_enable_cap))
8448 );
8449 assert_eq!(
8450 unsafe { &(*(::std::ptr::null::<kvm_enable_cap>())).cap as *const _ as usize },
8451 0usize,
8452 concat!(
8453 "Offset of field: ",
8454 stringify!(kvm_enable_cap),
8455 "::",
8456 stringify!(cap)
8457 )
8458 );
8459 assert_eq!(
8460 unsafe { &(*(::std::ptr::null::<kvm_enable_cap>())).flags as *const _ as usize },
8461 4usize,
8462 concat!(
8463 "Offset of field: ",
8464 stringify!(kvm_enable_cap),
8465 "::",
8466 stringify!(flags)
8467 )
8468 );
8469 assert_eq!(
8470 unsafe { &(*(::std::ptr::null::<kvm_enable_cap>())).args as *const _ as usize },
8471 8usize,
8472 concat!(
8473 "Offset of field: ",
8474 stringify!(kvm_enable_cap),
8475 "::",
8476 stringify!(args)
8477 )
8478 );
8479 assert_eq!(
8480 unsafe { &(*(::std::ptr::null::<kvm_enable_cap>())).pad as *const _ as usize },
8481 40usize,
8482 concat!(
8483 "Offset of field: ",
8484 stringify!(kvm_enable_cap),
8485 "::",
8486 stringify!(pad)
8487 )
8488 );
8489 }
8490 impl Default for kvm_enable_cap {
default() -> Self8491 fn default() -> Self {
8492 unsafe { ::std::mem::zeroed() }
8493 }
8494 }
8495 #[repr(C)]
8496 #[derive(Copy, Clone)]
8497 pub struct kvm_ppc_pvinfo {
8498 pub flags: __u32,
8499 pub hcall: [__u32; 4usize],
8500 pub pad: [__u8; 108usize],
8501 }
8502 #[test]
bindgen_test_layout_kvm_ppc_pvinfo()8503 fn bindgen_test_layout_kvm_ppc_pvinfo() {
8504 assert_eq!(
8505 ::std::mem::size_of::<kvm_ppc_pvinfo>(),
8506 128usize,
8507 concat!("Size of: ", stringify!(kvm_ppc_pvinfo))
8508 );
8509 assert_eq!(
8510 ::std::mem::align_of::<kvm_ppc_pvinfo>(),
8511 4usize,
8512 concat!("Alignment of ", stringify!(kvm_ppc_pvinfo))
8513 );
8514 assert_eq!(
8515 unsafe { &(*(::std::ptr::null::<kvm_ppc_pvinfo>())).flags as *const _ as usize },
8516 0usize,
8517 concat!(
8518 "Offset of field: ",
8519 stringify!(kvm_ppc_pvinfo),
8520 "::",
8521 stringify!(flags)
8522 )
8523 );
8524 assert_eq!(
8525 unsafe { &(*(::std::ptr::null::<kvm_ppc_pvinfo>())).hcall as *const _ as usize },
8526 4usize,
8527 concat!(
8528 "Offset of field: ",
8529 stringify!(kvm_ppc_pvinfo),
8530 "::",
8531 stringify!(hcall)
8532 )
8533 );
8534 assert_eq!(
8535 unsafe { &(*(::std::ptr::null::<kvm_ppc_pvinfo>())).pad as *const _ as usize },
8536 20usize,
8537 concat!(
8538 "Offset of field: ",
8539 stringify!(kvm_ppc_pvinfo),
8540 "::",
8541 stringify!(pad)
8542 )
8543 );
8544 }
8545 impl Default for kvm_ppc_pvinfo {
default() -> Self8546 fn default() -> Self {
8547 unsafe { ::std::mem::zeroed() }
8548 }
8549 }
8550 #[repr(C)]
8551 #[derive(Debug, Default, Copy, Clone)]
8552 pub struct kvm_ppc_one_page_size {
8553 pub page_shift: __u32,
8554 pub pte_enc: __u32,
8555 }
8556 #[test]
bindgen_test_layout_kvm_ppc_one_page_size()8557 fn bindgen_test_layout_kvm_ppc_one_page_size() {
8558 assert_eq!(
8559 ::std::mem::size_of::<kvm_ppc_one_page_size>(),
8560 8usize,
8561 concat!("Size of: ", stringify!(kvm_ppc_one_page_size))
8562 );
8563 assert_eq!(
8564 ::std::mem::align_of::<kvm_ppc_one_page_size>(),
8565 4usize,
8566 concat!("Alignment of ", stringify!(kvm_ppc_one_page_size))
8567 );
8568 assert_eq!(
8569 unsafe {
8570 &(*(::std::ptr::null::<kvm_ppc_one_page_size>())).page_shift as *const _ as usize
8571 },
8572 0usize,
8573 concat!(
8574 "Offset of field: ",
8575 stringify!(kvm_ppc_one_page_size),
8576 "::",
8577 stringify!(page_shift)
8578 )
8579 );
8580 assert_eq!(
8581 unsafe { &(*(::std::ptr::null::<kvm_ppc_one_page_size>())).pte_enc as *const _ as usize },
8582 4usize,
8583 concat!(
8584 "Offset of field: ",
8585 stringify!(kvm_ppc_one_page_size),
8586 "::",
8587 stringify!(pte_enc)
8588 )
8589 );
8590 }
8591 #[repr(C)]
8592 #[derive(Debug, Default, Copy, Clone)]
8593 pub struct kvm_ppc_one_seg_page_size {
8594 pub page_shift: __u32,
8595 pub slb_enc: __u32,
8596 pub enc: [kvm_ppc_one_page_size; 8usize],
8597 }
8598 #[test]
bindgen_test_layout_kvm_ppc_one_seg_page_size()8599 fn bindgen_test_layout_kvm_ppc_one_seg_page_size() {
8600 assert_eq!(
8601 ::std::mem::size_of::<kvm_ppc_one_seg_page_size>(),
8602 72usize,
8603 concat!("Size of: ", stringify!(kvm_ppc_one_seg_page_size))
8604 );
8605 assert_eq!(
8606 ::std::mem::align_of::<kvm_ppc_one_seg_page_size>(),
8607 4usize,
8608 concat!("Alignment of ", stringify!(kvm_ppc_one_seg_page_size))
8609 );
8610 assert_eq!(
8611 unsafe {
8612 &(*(::std::ptr::null::<kvm_ppc_one_seg_page_size>())).page_shift as *const _ as usize
8613 },
8614 0usize,
8615 concat!(
8616 "Offset of field: ",
8617 stringify!(kvm_ppc_one_seg_page_size),
8618 "::",
8619 stringify!(page_shift)
8620 )
8621 );
8622 assert_eq!(
8623 unsafe {
8624 &(*(::std::ptr::null::<kvm_ppc_one_seg_page_size>())).slb_enc as *const _ as usize
8625 },
8626 4usize,
8627 concat!(
8628 "Offset of field: ",
8629 stringify!(kvm_ppc_one_seg_page_size),
8630 "::",
8631 stringify!(slb_enc)
8632 )
8633 );
8634 assert_eq!(
8635 unsafe { &(*(::std::ptr::null::<kvm_ppc_one_seg_page_size>())).enc as *const _ as usize },
8636 8usize,
8637 concat!(
8638 "Offset of field: ",
8639 stringify!(kvm_ppc_one_seg_page_size),
8640 "::",
8641 stringify!(enc)
8642 )
8643 );
8644 }
8645 #[repr(C)]
8646 #[derive(Debug, Default, Copy, Clone)]
8647 pub struct kvm_ppc_smmu_info {
8648 pub flags: __u64,
8649 pub slb_size: __u32,
8650 pub data_keys: __u16,
8651 pub instr_keys: __u16,
8652 pub sps: [kvm_ppc_one_seg_page_size; 8usize],
8653 }
8654 #[test]
bindgen_test_layout_kvm_ppc_smmu_info()8655 fn bindgen_test_layout_kvm_ppc_smmu_info() {
8656 assert_eq!(
8657 ::std::mem::size_of::<kvm_ppc_smmu_info>(),
8658 592usize,
8659 concat!("Size of: ", stringify!(kvm_ppc_smmu_info))
8660 );
8661 assert_eq!(
8662 ::std::mem::align_of::<kvm_ppc_smmu_info>(),
8663 8usize,
8664 concat!("Alignment of ", stringify!(kvm_ppc_smmu_info))
8665 );
8666 assert_eq!(
8667 unsafe { &(*(::std::ptr::null::<kvm_ppc_smmu_info>())).flags as *const _ as usize },
8668 0usize,
8669 concat!(
8670 "Offset of field: ",
8671 stringify!(kvm_ppc_smmu_info),
8672 "::",
8673 stringify!(flags)
8674 )
8675 );
8676 assert_eq!(
8677 unsafe { &(*(::std::ptr::null::<kvm_ppc_smmu_info>())).slb_size as *const _ as usize },
8678 8usize,
8679 concat!(
8680 "Offset of field: ",
8681 stringify!(kvm_ppc_smmu_info),
8682 "::",
8683 stringify!(slb_size)
8684 )
8685 );
8686 assert_eq!(
8687 unsafe { &(*(::std::ptr::null::<kvm_ppc_smmu_info>())).data_keys as *const _ as usize },
8688 12usize,
8689 concat!(
8690 "Offset of field: ",
8691 stringify!(kvm_ppc_smmu_info),
8692 "::",
8693 stringify!(data_keys)
8694 )
8695 );
8696 assert_eq!(
8697 unsafe { &(*(::std::ptr::null::<kvm_ppc_smmu_info>())).instr_keys as *const _ as usize },
8698 14usize,
8699 concat!(
8700 "Offset of field: ",
8701 stringify!(kvm_ppc_smmu_info),
8702 "::",
8703 stringify!(instr_keys)
8704 )
8705 );
8706 assert_eq!(
8707 unsafe { &(*(::std::ptr::null::<kvm_ppc_smmu_info>())).sps as *const _ as usize },
8708 16usize,
8709 concat!(
8710 "Offset of field: ",
8711 stringify!(kvm_ppc_smmu_info),
8712 "::",
8713 stringify!(sps)
8714 )
8715 );
8716 }
8717 #[repr(C)]
8718 #[derive(Debug, Default, Copy, Clone)]
8719 pub struct kvm_ppc_resize_hpt {
8720 pub flags: __u64,
8721 pub shift: __u32,
8722 pub pad: __u32,
8723 }
8724 #[test]
bindgen_test_layout_kvm_ppc_resize_hpt()8725 fn bindgen_test_layout_kvm_ppc_resize_hpt() {
8726 assert_eq!(
8727 ::std::mem::size_of::<kvm_ppc_resize_hpt>(),
8728 16usize,
8729 concat!("Size of: ", stringify!(kvm_ppc_resize_hpt))
8730 );
8731 assert_eq!(
8732 ::std::mem::align_of::<kvm_ppc_resize_hpt>(),
8733 8usize,
8734 concat!("Alignment of ", stringify!(kvm_ppc_resize_hpt))
8735 );
8736 assert_eq!(
8737 unsafe { &(*(::std::ptr::null::<kvm_ppc_resize_hpt>())).flags as *const _ as usize },
8738 0usize,
8739 concat!(
8740 "Offset of field: ",
8741 stringify!(kvm_ppc_resize_hpt),
8742 "::",
8743 stringify!(flags)
8744 )
8745 );
8746 assert_eq!(
8747 unsafe { &(*(::std::ptr::null::<kvm_ppc_resize_hpt>())).shift as *const _ as usize },
8748 8usize,
8749 concat!(
8750 "Offset of field: ",
8751 stringify!(kvm_ppc_resize_hpt),
8752 "::",
8753 stringify!(shift)
8754 )
8755 );
8756 assert_eq!(
8757 unsafe { &(*(::std::ptr::null::<kvm_ppc_resize_hpt>())).pad as *const _ as usize },
8758 12usize,
8759 concat!(
8760 "Offset of field: ",
8761 stringify!(kvm_ppc_resize_hpt),
8762 "::",
8763 stringify!(pad)
8764 )
8765 );
8766 }
8767 #[repr(C)]
8768 #[derive(Debug, Default, Copy, Clone)]
8769 pub struct kvm_irq_routing_irqchip {
8770 pub irqchip: __u32,
8771 pub pin: __u32,
8772 }
8773 #[test]
bindgen_test_layout_kvm_irq_routing_irqchip()8774 fn bindgen_test_layout_kvm_irq_routing_irqchip() {
8775 assert_eq!(
8776 ::std::mem::size_of::<kvm_irq_routing_irqchip>(),
8777 8usize,
8778 concat!("Size of: ", stringify!(kvm_irq_routing_irqchip))
8779 );
8780 assert_eq!(
8781 ::std::mem::align_of::<kvm_irq_routing_irqchip>(),
8782 4usize,
8783 concat!("Alignment of ", stringify!(kvm_irq_routing_irqchip))
8784 );
8785 assert_eq!(
8786 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_irqchip>())).irqchip as *const _ as usize },
8787 0usize,
8788 concat!(
8789 "Offset of field: ",
8790 stringify!(kvm_irq_routing_irqchip),
8791 "::",
8792 stringify!(irqchip)
8793 )
8794 );
8795 assert_eq!(
8796 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_irqchip>())).pin as *const _ as usize },
8797 4usize,
8798 concat!(
8799 "Offset of field: ",
8800 stringify!(kvm_irq_routing_irqchip),
8801 "::",
8802 stringify!(pin)
8803 )
8804 );
8805 }
8806 #[repr(C)]
8807 #[derive(Copy, Clone)]
8808 pub struct kvm_irq_routing_msi {
8809 pub address_lo: __u32,
8810 pub address_hi: __u32,
8811 pub data: __u32,
8812 pub __bindgen_anon_1: kvm_irq_routing_msi__bindgen_ty_1,
8813 }
8814 #[repr(C)]
8815 #[derive(Copy, Clone)]
8816 pub union kvm_irq_routing_msi__bindgen_ty_1 {
8817 pub pad: __u32,
8818 pub devid: __u32,
8819 _bindgen_union_align: u32,
8820 }
8821 #[test]
bindgen_test_layout_kvm_irq_routing_msi__bindgen_ty_1()8822 fn bindgen_test_layout_kvm_irq_routing_msi__bindgen_ty_1() {
8823 assert_eq!(
8824 ::std::mem::size_of::<kvm_irq_routing_msi__bindgen_ty_1>(),
8825 4usize,
8826 concat!("Size of: ", stringify!(kvm_irq_routing_msi__bindgen_ty_1))
8827 );
8828 assert_eq!(
8829 ::std::mem::align_of::<kvm_irq_routing_msi__bindgen_ty_1>(),
8830 4usize,
8831 concat!(
8832 "Alignment of ",
8833 stringify!(kvm_irq_routing_msi__bindgen_ty_1)
8834 )
8835 );
8836 assert_eq!(
8837 unsafe {
8838 &(*(::std::ptr::null::<kvm_irq_routing_msi__bindgen_ty_1>())).pad as *const _ as usize
8839 },
8840 0usize,
8841 concat!(
8842 "Offset of field: ",
8843 stringify!(kvm_irq_routing_msi__bindgen_ty_1),
8844 "::",
8845 stringify!(pad)
8846 )
8847 );
8848 assert_eq!(
8849 unsafe {
8850 &(*(::std::ptr::null::<kvm_irq_routing_msi__bindgen_ty_1>())).devid as *const _ as usize
8851 },
8852 0usize,
8853 concat!(
8854 "Offset of field: ",
8855 stringify!(kvm_irq_routing_msi__bindgen_ty_1),
8856 "::",
8857 stringify!(devid)
8858 )
8859 );
8860 }
8861 impl Default for kvm_irq_routing_msi__bindgen_ty_1 {
default() -> Self8862 fn default() -> Self {
8863 unsafe { ::std::mem::zeroed() }
8864 }
8865 }
8866 #[test]
bindgen_test_layout_kvm_irq_routing_msi()8867 fn bindgen_test_layout_kvm_irq_routing_msi() {
8868 assert_eq!(
8869 ::std::mem::size_of::<kvm_irq_routing_msi>(),
8870 16usize,
8871 concat!("Size of: ", stringify!(kvm_irq_routing_msi))
8872 );
8873 assert_eq!(
8874 ::std::mem::align_of::<kvm_irq_routing_msi>(),
8875 4usize,
8876 concat!("Alignment of ", stringify!(kvm_irq_routing_msi))
8877 );
8878 assert_eq!(
8879 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_msi>())).address_lo as *const _ as usize },
8880 0usize,
8881 concat!(
8882 "Offset of field: ",
8883 stringify!(kvm_irq_routing_msi),
8884 "::",
8885 stringify!(address_lo)
8886 )
8887 );
8888 assert_eq!(
8889 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_msi>())).address_hi as *const _ as usize },
8890 4usize,
8891 concat!(
8892 "Offset of field: ",
8893 stringify!(kvm_irq_routing_msi),
8894 "::",
8895 stringify!(address_hi)
8896 )
8897 );
8898 assert_eq!(
8899 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_msi>())).data as *const _ as usize },
8900 8usize,
8901 concat!(
8902 "Offset of field: ",
8903 stringify!(kvm_irq_routing_msi),
8904 "::",
8905 stringify!(data)
8906 )
8907 );
8908 }
8909 impl Default for kvm_irq_routing_msi {
default() -> Self8910 fn default() -> Self {
8911 unsafe { ::std::mem::zeroed() }
8912 }
8913 }
8914 #[repr(C)]
8915 #[derive(Debug, Default, Copy, Clone)]
8916 pub struct kvm_irq_routing_s390_adapter {
8917 pub ind_addr: __u64,
8918 pub summary_addr: __u64,
8919 pub ind_offset: __u64,
8920 pub summary_offset: __u32,
8921 pub adapter_id: __u32,
8922 }
8923 #[test]
bindgen_test_layout_kvm_irq_routing_s390_adapter()8924 fn bindgen_test_layout_kvm_irq_routing_s390_adapter() {
8925 assert_eq!(
8926 ::std::mem::size_of::<kvm_irq_routing_s390_adapter>(),
8927 32usize,
8928 concat!("Size of: ", stringify!(kvm_irq_routing_s390_adapter))
8929 );
8930 assert_eq!(
8931 ::std::mem::align_of::<kvm_irq_routing_s390_adapter>(),
8932 8usize,
8933 concat!("Alignment of ", stringify!(kvm_irq_routing_s390_adapter))
8934 );
8935 assert_eq!(
8936 unsafe {
8937 &(*(::std::ptr::null::<kvm_irq_routing_s390_adapter>())).ind_addr as *const _ as usize
8938 },
8939 0usize,
8940 concat!(
8941 "Offset of field: ",
8942 stringify!(kvm_irq_routing_s390_adapter),
8943 "::",
8944 stringify!(ind_addr)
8945 )
8946 );
8947 assert_eq!(
8948 unsafe {
8949 &(*(::std::ptr::null::<kvm_irq_routing_s390_adapter>())).summary_addr as *const _
8950 as usize
8951 },
8952 8usize,
8953 concat!(
8954 "Offset of field: ",
8955 stringify!(kvm_irq_routing_s390_adapter),
8956 "::",
8957 stringify!(summary_addr)
8958 )
8959 );
8960 assert_eq!(
8961 unsafe {
8962 &(*(::std::ptr::null::<kvm_irq_routing_s390_adapter>())).ind_offset as *const _ as usize
8963 },
8964 16usize,
8965 concat!(
8966 "Offset of field: ",
8967 stringify!(kvm_irq_routing_s390_adapter),
8968 "::",
8969 stringify!(ind_offset)
8970 )
8971 );
8972 assert_eq!(
8973 unsafe {
8974 &(*(::std::ptr::null::<kvm_irq_routing_s390_adapter>())).summary_offset as *const _
8975 as usize
8976 },
8977 24usize,
8978 concat!(
8979 "Offset of field: ",
8980 stringify!(kvm_irq_routing_s390_adapter),
8981 "::",
8982 stringify!(summary_offset)
8983 )
8984 );
8985 assert_eq!(
8986 unsafe {
8987 &(*(::std::ptr::null::<kvm_irq_routing_s390_adapter>())).adapter_id as *const _ as usize
8988 },
8989 28usize,
8990 concat!(
8991 "Offset of field: ",
8992 stringify!(kvm_irq_routing_s390_adapter),
8993 "::",
8994 stringify!(adapter_id)
8995 )
8996 );
8997 }
8998 #[repr(C)]
8999 #[derive(Debug, Default, Copy, Clone)]
9000 pub struct kvm_irq_routing_hv_sint {
9001 pub vcpu: __u32,
9002 pub sint: __u32,
9003 }
9004 #[test]
bindgen_test_layout_kvm_irq_routing_hv_sint()9005 fn bindgen_test_layout_kvm_irq_routing_hv_sint() {
9006 assert_eq!(
9007 ::std::mem::size_of::<kvm_irq_routing_hv_sint>(),
9008 8usize,
9009 concat!("Size of: ", stringify!(kvm_irq_routing_hv_sint))
9010 );
9011 assert_eq!(
9012 ::std::mem::align_of::<kvm_irq_routing_hv_sint>(),
9013 4usize,
9014 concat!("Alignment of ", stringify!(kvm_irq_routing_hv_sint))
9015 );
9016 assert_eq!(
9017 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_hv_sint>())).vcpu as *const _ as usize },
9018 0usize,
9019 concat!(
9020 "Offset of field: ",
9021 stringify!(kvm_irq_routing_hv_sint),
9022 "::",
9023 stringify!(vcpu)
9024 )
9025 );
9026 assert_eq!(
9027 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_hv_sint>())).sint as *const _ as usize },
9028 4usize,
9029 concat!(
9030 "Offset of field: ",
9031 stringify!(kvm_irq_routing_hv_sint),
9032 "::",
9033 stringify!(sint)
9034 )
9035 );
9036 }
9037 #[repr(C)]
9038 #[derive(Copy, Clone)]
9039 pub struct kvm_irq_routing_entry {
9040 pub gsi: __u32,
9041 pub type_: __u32,
9042 pub flags: __u32,
9043 pub pad: __u32,
9044 pub u: kvm_irq_routing_entry__bindgen_ty_1,
9045 }
9046 #[repr(C)]
9047 #[derive(Copy, Clone)]
9048 pub union kvm_irq_routing_entry__bindgen_ty_1 {
9049 pub irqchip: kvm_irq_routing_irqchip,
9050 pub msi: kvm_irq_routing_msi,
9051 pub adapter: kvm_irq_routing_s390_adapter,
9052 pub hv_sint: kvm_irq_routing_hv_sint,
9053 pub pad: [__u32; 8usize],
9054 _bindgen_union_align: [u64; 4usize],
9055 }
9056 #[test]
bindgen_test_layout_kvm_irq_routing_entry__bindgen_ty_1()9057 fn bindgen_test_layout_kvm_irq_routing_entry__bindgen_ty_1() {
9058 assert_eq!(
9059 ::std::mem::size_of::<kvm_irq_routing_entry__bindgen_ty_1>(),
9060 32usize,
9061 concat!("Size of: ", stringify!(kvm_irq_routing_entry__bindgen_ty_1))
9062 );
9063 assert_eq!(
9064 ::std::mem::align_of::<kvm_irq_routing_entry__bindgen_ty_1>(),
9065 8usize,
9066 concat!(
9067 "Alignment of ",
9068 stringify!(kvm_irq_routing_entry__bindgen_ty_1)
9069 )
9070 );
9071 assert_eq!(
9072 unsafe {
9073 &(*(::std::ptr::null::<kvm_irq_routing_entry__bindgen_ty_1>())).irqchip as *const _
9074 as usize
9075 },
9076 0usize,
9077 concat!(
9078 "Offset of field: ",
9079 stringify!(kvm_irq_routing_entry__bindgen_ty_1),
9080 "::",
9081 stringify!(irqchip)
9082 )
9083 );
9084 assert_eq!(
9085 unsafe {
9086 &(*(::std::ptr::null::<kvm_irq_routing_entry__bindgen_ty_1>())).msi as *const _ as usize
9087 },
9088 0usize,
9089 concat!(
9090 "Offset of field: ",
9091 stringify!(kvm_irq_routing_entry__bindgen_ty_1),
9092 "::",
9093 stringify!(msi)
9094 )
9095 );
9096 assert_eq!(
9097 unsafe {
9098 &(*(::std::ptr::null::<kvm_irq_routing_entry__bindgen_ty_1>())).adapter as *const _
9099 as usize
9100 },
9101 0usize,
9102 concat!(
9103 "Offset of field: ",
9104 stringify!(kvm_irq_routing_entry__bindgen_ty_1),
9105 "::",
9106 stringify!(adapter)
9107 )
9108 );
9109 assert_eq!(
9110 unsafe {
9111 &(*(::std::ptr::null::<kvm_irq_routing_entry__bindgen_ty_1>())).hv_sint as *const _
9112 as usize
9113 },
9114 0usize,
9115 concat!(
9116 "Offset of field: ",
9117 stringify!(kvm_irq_routing_entry__bindgen_ty_1),
9118 "::",
9119 stringify!(hv_sint)
9120 )
9121 );
9122 assert_eq!(
9123 unsafe {
9124 &(*(::std::ptr::null::<kvm_irq_routing_entry__bindgen_ty_1>())).pad as *const _ as usize
9125 },
9126 0usize,
9127 concat!(
9128 "Offset of field: ",
9129 stringify!(kvm_irq_routing_entry__bindgen_ty_1),
9130 "::",
9131 stringify!(pad)
9132 )
9133 );
9134 }
9135 impl Default for kvm_irq_routing_entry__bindgen_ty_1 {
default() -> Self9136 fn default() -> Self {
9137 unsafe { ::std::mem::zeroed() }
9138 }
9139 }
9140 #[test]
bindgen_test_layout_kvm_irq_routing_entry()9141 fn bindgen_test_layout_kvm_irq_routing_entry() {
9142 assert_eq!(
9143 ::std::mem::size_of::<kvm_irq_routing_entry>(),
9144 48usize,
9145 concat!("Size of: ", stringify!(kvm_irq_routing_entry))
9146 );
9147 assert_eq!(
9148 ::std::mem::align_of::<kvm_irq_routing_entry>(),
9149 8usize,
9150 concat!("Alignment of ", stringify!(kvm_irq_routing_entry))
9151 );
9152 assert_eq!(
9153 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_entry>())).gsi as *const _ as usize },
9154 0usize,
9155 concat!(
9156 "Offset of field: ",
9157 stringify!(kvm_irq_routing_entry),
9158 "::",
9159 stringify!(gsi)
9160 )
9161 );
9162 assert_eq!(
9163 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_entry>())).type_ as *const _ as usize },
9164 4usize,
9165 concat!(
9166 "Offset of field: ",
9167 stringify!(kvm_irq_routing_entry),
9168 "::",
9169 stringify!(type_)
9170 )
9171 );
9172 assert_eq!(
9173 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_entry>())).flags as *const _ as usize },
9174 8usize,
9175 concat!(
9176 "Offset of field: ",
9177 stringify!(kvm_irq_routing_entry),
9178 "::",
9179 stringify!(flags)
9180 )
9181 );
9182 assert_eq!(
9183 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_entry>())).pad as *const _ as usize },
9184 12usize,
9185 concat!(
9186 "Offset of field: ",
9187 stringify!(kvm_irq_routing_entry),
9188 "::",
9189 stringify!(pad)
9190 )
9191 );
9192 assert_eq!(
9193 unsafe { &(*(::std::ptr::null::<kvm_irq_routing_entry>())).u as *const _ as usize },
9194 16usize,
9195 concat!(
9196 "Offset of field: ",
9197 stringify!(kvm_irq_routing_entry),
9198 "::",
9199 stringify!(u)
9200 )
9201 );
9202 }
9203 impl Default for kvm_irq_routing_entry {
default() -> Self9204 fn default() -> Self {
9205 unsafe { ::std::mem::zeroed() }
9206 }
9207 }
9208 #[repr(C)]
9209 pub struct kvm_irq_routing {
9210 pub nr: __u32,
9211 pub flags: __u32,
9212 pub entries: __IncompleteArrayField<kvm_irq_routing_entry>,
9213 }
9214 #[test]
bindgen_test_layout_kvm_irq_routing()9215 fn bindgen_test_layout_kvm_irq_routing() {
9216 assert_eq!(
9217 ::std::mem::size_of::<kvm_irq_routing>(),
9218 8usize,
9219 concat!("Size of: ", stringify!(kvm_irq_routing))
9220 );
9221 assert_eq!(
9222 ::std::mem::align_of::<kvm_irq_routing>(),
9223 8usize,
9224 concat!("Alignment of ", stringify!(kvm_irq_routing))
9225 );
9226 assert_eq!(
9227 unsafe { &(*(::std::ptr::null::<kvm_irq_routing>())).nr as *const _ as usize },
9228 0usize,
9229 concat!(
9230 "Offset of field: ",
9231 stringify!(kvm_irq_routing),
9232 "::",
9233 stringify!(nr)
9234 )
9235 );
9236 assert_eq!(
9237 unsafe { &(*(::std::ptr::null::<kvm_irq_routing>())).flags as *const _ as usize },
9238 4usize,
9239 concat!(
9240 "Offset of field: ",
9241 stringify!(kvm_irq_routing),
9242 "::",
9243 stringify!(flags)
9244 )
9245 );
9246 assert_eq!(
9247 unsafe { &(*(::std::ptr::null::<kvm_irq_routing>())).entries as *const _ as usize },
9248 8usize,
9249 concat!(
9250 "Offset of field: ",
9251 stringify!(kvm_irq_routing),
9252 "::",
9253 stringify!(entries)
9254 )
9255 );
9256 }
9257 impl Default for kvm_irq_routing {
default() -> Self9258 fn default() -> Self {
9259 unsafe { ::std::mem::zeroed() }
9260 }
9261 }
9262 #[repr(C)]
9263 #[derive(Debug, Default, Copy, Clone)]
9264 pub struct kvm_x86_mce {
9265 pub status: __u64,
9266 pub addr: __u64,
9267 pub misc: __u64,
9268 pub mcg_status: __u64,
9269 pub bank: __u8,
9270 pub pad1: [__u8; 7usize],
9271 pub pad2: [__u64; 3usize],
9272 }
9273 #[test]
bindgen_test_layout_kvm_x86_mce()9274 fn bindgen_test_layout_kvm_x86_mce() {
9275 assert_eq!(
9276 ::std::mem::size_of::<kvm_x86_mce>(),
9277 64usize,
9278 concat!("Size of: ", stringify!(kvm_x86_mce))
9279 );
9280 assert_eq!(
9281 ::std::mem::align_of::<kvm_x86_mce>(),
9282 8usize,
9283 concat!("Alignment of ", stringify!(kvm_x86_mce))
9284 );
9285 assert_eq!(
9286 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).status as *const _ as usize },
9287 0usize,
9288 concat!(
9289 "Offset of field: ",
9290 stringify!(kvm_x86_mce),
9291 "::",
9292 stringify!(status)
9293 )
9294 );
9295 assert_eq!(
9296 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).addr as *const _ as usize },
9297 8usize,
9298 concat!(
9299 "Offset of field: ",
9300 stringify!(kvm_x86_mce),
9301 "::",
9302 stringify!(addr)
9303 )
9304 );
9305 assert_eq!(
9306 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).misc as *const _ as usize },
9307 16usize,
9308 concat!(
9309 "Offset of field: ",
9310 stringify!(kvm_x86_mce),
9311 "::",
9312 stringify!(misc)
9313 )
9314 );
9315 assert_eq!(
9316 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).mcg_status as *const _ as usize },
9317 24usize,
9318 concat!(
9319 "Offset of field: ",
9320 stringify!(kvm_x86_mce),
9321 "::",
9322 stringify!(mcg_status)
9323 )
9324 );
9325 assert_eq!(
9326 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).bank as *const _ as usize },
9327 32usize,
9328 concat!(
9329 "Offset of field: ",
9330 stringify!(kvm_x86_mce),
9331 "::",
9332 stringify!(bank)
9333 )
9334 );
9335 assert_eq!(
9336 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).pad1 as *const _ as usize },
9337 33usize,
9338 concat!(
9339 "Offset of field: ",
9340 stringify!(kvm_x86_mce),
9341 "::",
9342 stringify!(pad1)
9343 )
9344 );
9345 assert_eq!(
9346 unsafe { &(*(::std::ptr::null::<kvm_x86_mce>())).pad2 as *const _ as usize },
9347 40usize,
9348 concat!(
9349 "Offset of field: ",
9350 stringify!(kvm_x86_mce),
9351 "::",
9352 stringify!(pad2)
9353 )
9354 );
9355 }
9356 #[repr(C)]
9357 #[derive(Debug, Default, Copy, Clone)]
9358 pub struct kvm_xen_hvm_config {
9359 pub flags: __u32,
9360 pub msr: __u32,
9361 pub blob_addr_32: __u64,
9362 pub blob_addr_64: __u64,
9363 pub blob_size_32: __u8,
9364 pub blob_size_64: __u8,
9365 pub pad2: [__u8; 30usize],
9366 }
9367 #[test]
bindgen_test_layout_kvm_xen_hvm_config()9368 fn bindgen_test_layout_kvm_xen_hvm_config() {
9369 assert_eq!(
9370 ::std::mem::size_of::<kvm_xen_hvm_config>(),
9371 56usize,
9372 concat!("Size of: ", stringify!(kvm_xen_hvm_config))
9373 );
9374 assert_eq!(
9375 ::std::mem::align_of::<kvm_xen_hvm_config>(),
9376 8usize,
9377 concat!("Alignment of ", stringify!(kvm_xen_hvm_config))
9378 );
9379 assert_eq!(
9380 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).flags as *const _ as usize },
9381 0usize,
9382 concat!(
9383 "Offset of field: ",
9384 stringify!(kvm_xen_hvm_config),
9385 "::",
9386 stringify!(flags)
9387 )
9388 );
9389 assert_eq!(
9390 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).msr as *const _ as usize },
9391 4usize,
9392 concat!(
9393 "Offset of field: ",
9394 stringify!(kvm_xen_hvm_config),
9395 "::",
9396 stringify!(msr)
9397 )
9398 );
9399 assert_eq!(
9400 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).blob_addr_32 as *const _ as usize },
9401 8usize,
9402 concat!(
9403 "Offset of field: ",
9404 stringify!(kvm_xen_hvm_config),
9405 "::",
9406 stringify!(blob_addr_32)
9407 )
9408 );
9409 assert_eq!(
9410 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).blob_addr_64 as *const _ as usize },
9411 16usize,
9412 concat!(
9413 "Offset of field: ",
9414 stringify!(kvm_xen_hvm_config),
9415 "::",
9416 stringify!(blob_addr_64)
9417 )
9418 );
9419 assert_eq!(
9420 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).blob_size_32 as *const _ as usize },
9421 24usize,
9422 concat!(
9423 "Offset of field: ",
9424 stringify!(kvm_xen_hvm_config),
9425 "::",
9426 stringify!(blob_size_32)
9427 )
9428 );
9429 assert_eq!(
9430 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).blob_size_64 as *const _ as usize },
9431 25usize,
9432 concat!(
9433 "Offset of field: ",
9434 stringify!(kvm_xen_hvm_config),
9435 "::",
9436 stringify!(blob_size_64)
9437 )
9438 );
9439 assert_eq!(
9440 unsafe { &(*(::std::ptr::null::<kvm_xen_hvm_config>())).pad2 as *const _ as usize },
9441 26usize,
9442 concat!(
9443 "Offset of field: ",
9444 stringify!(kvm_xen_hvm_config),
9445 "::",
9446 stringify!(pad2)
9447 )
9448 );
9449 }
9450 #[repr(C)]
9451 #[derive(Debug, Default, Copy, Clone)]
9452 pub struct kvm_irqfd {
9453 pub fd: __u32,
9454 pub gsi: __u32,
9455 pub flags: __u32,
9456 pub resamplefd: __u32,
9457 pub pad: [__u8; 16usize],
9458 }
9459 #[test]
bindgen_test_layout_kvm_irqfd()9460 fn bindgen_test_layout_kvm_irqfd() {
9461 assert_eq!(
9462 ::std::mem::size_of::<kvm_irqfd>(),
9463 32usize,
9464 concat!("Size of: ", stringify!(kvm_irqfd))
9465 );
9466 assert_eq!(
9467 ::std::mem::align_of::<kvm_irqfd>(),
9468 4usize,
9469 concat!("Alignment of ", stringify!(kvm_irqfd))
9470 );
9471 assert_eq!(
9472 unsafe { &(*(::std::ptr::null::<kvm_irqfd>())).fd as *const _ as usize },
9473 0usize,
9474 concat!(
9475 "Offset of field: ",
9476 stringify!(kvm_irqfd),
9477 "::",
9478 stringify!(fd)
9479 )
9480 );
9481 assert_eq!(
9482 unsafe { &(*(::std::ptr::null::<kvm_irqfd>())).gsi as *const _ as usize },
9483 4usize,
9484 concat!(
9485 "Offset of field: ",
9486 stringify!(kvm_irqfd),
9487 "::",
9488 stringify!(gsi)
9489 )
9490 );
9491 assert_eq!(
9492 unsafe { &(*(::std::ptr::null::<kvm_irqfd>())).flags as *const _ as usize },
9493 8usize,
9494 concat!(
9495 "Offset of field: ",
9496 stringify!(kvm_irqfd),
9497 "::",
9498 stringify!(flags)
9499 )
9500 );
9501 assert_eq!(
9502 unsafe { &(*(::std::ptr::null::<kvm_irqfd>())).resamplefd as *const _ as usize },
9503 12usize,
9504 concat!(
9505 "Offset of field: ",
9506 stringify!(kvm_irqfd),
9507 "::",
9508 stringify!(resamplefd)
9509 )
9510 );
9511 assert_eq!(
9512 unsafe { &(*(::std::ptr::null::<kvm_irqfd>())).pad as *const _ as usize },
9513 16usize,
9514 concat!(
9515 "Offset of field: ",
9516 stringify!(kvm_irqfd),
9517 "::",
9518 stringify!(pad)
9519 )
9520 );
9521 }
9522 #[repr(C)]
9523 #[derive(Debug, Default, Copy, Clone)]
9524 pub struct kvm_clock_data {
9525 pub clock: __u64,
9526 pub flags: __u32,
9527 pub pad: [__u32; 9usize],
9528 }
9529 #[test]
bindgen_test_layout_kvm_clock_data()9530 fn bindgen_test_layout_kvm_clock_data() {
9531 assert_eq!(
9532 ::std::mem::size_of::<kvm_clock_data>(),
9533 48usize,
9534 concat!("Size of: ", stringify!(kvm_clock_data))
9535 );
9536 assert_eq!(
9537 ::std::mem::align_of::<kvm_clock_data>(),
9538 8usize,
9539 concat!("Alignment of ", stringify!(kvm_clock_data))
9540 );
9541 assert_eq!(
9542 unsafe { &(*(::std::ptr::null::<kvm_clock_data>())).clock as *const _ as usize },
9543 0usize,
9544 concat!(
9545 "Offset of field: ",
9546 stringify!(kvm_clock_data),
9547 "::",
9548 stringify!(clock)
9549 )
9550 );
9551 assert_eq!(
9552 unsafe { &(*(::std::ptr::null::<kvm_clock_data>())).flags as *const _ as usize },
9553 8usize,
9554 concat!(
9555 "Offset of field: ",
9556 stringify!(kvm_clock_data),
9557 "::",
9558 stringify!(flags)
9559 )
9560 );
9561 assert_eq!(
9562 unsafe { &(*(::std::ptr::null::<kvm_clock_data>())).pad as *const _ as usize },
9563 12usize,
9564 concat!(
9565 "Offset of field: ",
9566 stringify!(kvm_clock_data),
9567 "::",
9568 stringify!(pad)
9569 )
9570 );
9571 }
9572 #[repr(C)]
9573 #[derive(Debug, Default, Copy, Clone)]
9574 pub struct kvm_config_tlb {
9575 pub params: __u64,
9576 pub array: __u64,
9577 pub mmu_type: __u32,
9578 pub array_len: __u32,
9579 }
9580 #[test]
bindgen_test_layout_kvm_config_tlb()9581 fn bindgen_test_layout_kvm_config_tlb() {
9582 assert_eq!(
9583 ::std::mem::size_of::<kvm_config_tlb>(),
9584 24usize,
9585 concat!("Size of: ", stringify!(kvm_config_tlb))
9586 );
9587 assert_eq!(
9588 ::std::mem::align_of::<kvm_config_tlb>(),
9589 8usize,
9590 concat!("Alignment of ", stringify!(kvm_config_tlb))
9591 );
9592 assert_eq!(
9593 unsafe { &(*(::std::ptr::null::<kvm_config_tlb>())).params as *const _ as usize },
9594 0usize,
9595 concat!(
9596 "Offset of field: ",
9597 stringify!(kvm_config_tlb),
9598 "::",
9599 stringify!(params)
9600 )
9601 );
9602 assert_eq!(
9603 unsafe { &(*(::std::ptr::null::<kvm_config_tlb>())).array as *const _ as usize },
9604 8usize,
9605 concat!(
9606 "Offset of field: ",
9607 stringify!(kvm_config_tlb),
9608 "::",
9609 stringify!(array)
9610 )
9611 );
9612 assert_eq!(
9613 unsafe { &(*(::std::ptr::null::<kvm_config_tlb>())).mmu_type as *const _ as usize },
9614 16usize,
9615 concat!(
9616 "Offset of field: ",
9617 stringify!(kvm_config_tlb),
9618 "::",
9619 stringify!(mmu_type)
9620 )
9621 );
9622 assert_eq!(
9623 unsafe { &(*(::std::ptr::null::<kvm_config_tlb>())).array_len as *const _ as usize },
9624 20usize,
9625 concat!(
9626 "Offset of field: ",
9627 stringify!(kvm_config_tlb),
9628 "::",
9629 stringify!(array_len)
9630 )
9631 );
9632 }
9633 #[repr(C)]
9634 #[derive(Debug, Default, Copy, Clone)]
9635 pub struct kvm_dirty_tlb {
9636 pub bitmap: __u64,
9637 pub num_dirty: __u32,
9638 }
9639 #[test]
bindgen_test_layout_kvm_dirty_tlb()9640 fn bindgen_test_layout_kvm_dirty_tlb() {
9641 assert_eq!(
9642 ::std::mem::size_of::<kvm_dirty_tlb>(),
9643 16usize,
9644 concat!("Size of: ", stringify!(kvm_dirty_tlb))
9645 );
9646 assert_eq!(
9647 ::std::mem::align_of::<kvm_dirty_tlb>(),
9648 8usize,
9649 concat!("Alignment of ", stringify!(kvm_dirty_tlb))
9650 );
9651 assert_eq!(
9652 unsafe { &(*(::std::ptr::null::<kvm_dirty_tlb>())).bitmap as *const _ as usize },
9653 0usize,
9654 concat!(
9655 "Offset of field: ",
9656 stringify!(kvm_dirty_tlb),
9657 "::",
9658 stringify!(bitmap)
9659 )
9660 );
9661 assert_eq!(
9662 unsafe { &(*(::std::ptr::null::<kvm_dirty_tlb>())).num_dirty as *const _ as usize },
9663 8usize,
9664 concat!(
9665 "Offset of field: ",
9666 stringify!(kvm_dirty_tlb),
9667 "::",
9668 stringify!(num_dirty)
9669 )
9670 );
9671 }
9672 #[repr(C)]
9673 #[derive(Debug, Default)]
9674 pub struct kvm_reg_list {
9675 pub n: __u64,
9676 pub reg: __IncompleteArrayField<__u64>,
9677 }
9678 #[test]
bindgen_test_layout_kvm_reg_list()9679 fn bindgen_test_layout_kvm_reg_list() {
9680 assert_eq!(
9681 ::std::mem::size_of::<kvm_reg_list>(),
9682 8usize,
9683 concat!("Size of: ", stringify!(kvm_reg_list))
9684 );
9685 assert_eq!(
9686 ::std::mem::align_of::<kvm_reg_list>(),
9687 8usize,
9688 concat!("Alignment of ", stringify!(kvm_reg_list))
9689 );
9690 assert_eq!(
9691 unsafe { &(*(::std::ptr::null::<kvm_reg_list>())).n as *const _ as usize },
9692 0usize,
9693 concat!(
9694 "Offset of field: ",
9695 stringify!(kvm_reg_list),
9696 "::",
9697 stringify!(n)
9698 )
9699 );
9700 assert_eq!(
9701 unsafe { &(*(::std::ptr::null::<kvm_reg_list>())).reg as *const _ as usize },
9702 8usize,
9703 concat!(
9704 "Offset of field: ",
9705 stringify!(kvm_reg_list),
9706 "::",
9707 stringify!(reg)
9708 )
9709 );
9710 }
9711 #[repr(C)]
9712 #[derive(Debug, Default, Copy, Clone)]
9713 pub struct kvm_one_reg {
9714 pub id: __u64,
9715 pub addr: __u64,
9716 }
9717 #[test]
bindgen_test_layout_kvm_one_reg()9718 fn bindgen_test_layout_kvm_one_reg() {
9719 assert_eq!(
9720 ::std::mem::size_of::<kvm_one_reg>(),
9721 16usize,
9722 concat!("Size of: ", stringify!(kvm_one_reg))
9723 );
9724 assert_eq!(
9725 ::std::mem::align_of::<kvm_one_reg>(),
9726 8usize,
9727 concat!("Alignment of ", stringify!(kvm_one_reg))
9728 );
9729 assert_eq!(
9730 unsafe { &(*(::std::ptr::null::<kvm_one_reg>())).id as *const _ as usize },
9731 0usize,
9732 concat!(
9733 "Offset of field: ",
9734 stringify!(kvm_one_reg),
9735 "::",
9736 stringify!(id)
9737 )
9738 );
9739 assert_eq!(
9740 unsafe { &(*(::std::ptr::null::<kvm_one_reg>())).addr as *const _ as usize },
9741 8usize,
9742 concat!(
9743 "Offset of field: ",
9744 stringify!(kvm_one_reg),
9745 "::",
9746 stringify!(addr)
9747 )
9748 );
9749 }
9750 #[repr(C)]
9751 #[derive(Debug, Default, Copy, Clone)]
9752 pub struct kvm_msi {
9753 pub address_lo: __u32,
9754 pub address_hi: __u32,
9755 pub data: __u32,
9756 pub flags: __u32,
9757 pub devid: __u32,
9758 pub pad: [__u8; 12usize],
9759 }
9760 #[test]
bindgen_test_layout_kvm_msi()9761 fn bindgen_test_layout_kvm_msi() {
9762 assert_eq!(
9763 ::std::mem::size_of::<kvm_msi>(),
9764 32usize,
9765 concat!("Size of: ", stringify!(kvm_msi))
9766 );
9767 assert_eq!(
9768 ::std::mem::align_of::<kvm_msi>(),
9769 4usize,
9770 concat!("Alignment of ", stringify!(kvm_msi))
9771 );
9772 assert_eq!(
9773 unsafe { &(*(::std::ptr::null::<kvm_msi>())).address_lo as *const _ as usize },
9774 0usize,
9775 concat!(
9776 "Offset of field: ",
9777 stringify!(kvm_msi),
9778 "::",
9779 stringify!(address_lo)
9780 )
9781 );
9782 assert_eq!(
9783 unsafe { &(*(::std::ptr::null::<kvm_msi>())).address_hi as *const _ as usize },
9784 4usize,
9785 concat!(
9786 "Offset of field: ",
9787 stringify!(kvm_msi),
9788 "::",
9789 stringify!(address_hi)
9790 )
9791 );
9792 assert_eq!(
9793 unsafe { &(*(::std::ptr::null::<kvm_msi>())).data as *const _ as usize },
9794 8usize,
9795 concat!(
9796 "Offset of field: ",
9797 stringify!(kvm_msi),
9798 "::",
9799 stringify!(data)
9800 )
9801 );
9802 assert_eq!(
9803 unsafe { &(*(::std::ptr::null::<kvm_msi>())).flags as *const _ as usize },
9804 12usize,
9805 concat!(
9806 "Offset of field: ",
9807 stringify!(kvm_msi),
9808 "::",
9809 stringify!(flags)
9810 )
9811 );
9812 assert_eq!(
9813 unsafe { &(*(::std::ptr::null::<kvm_msi>())).devid as *const _ as usize },
9814 16usize,
9815 concat!(
9816 "Offset of field: ",
9817 stringify!(kvm_msi),
9818 "::",
9819 stringify!(devid)
9820 )
9821 );
9822 assert_eq!(
9823 unsafe { &(*(::std::ptr::null::<kvm_msi>())).pad as *const _ as usize },
9824 20usize,
9825 concat!(
9826 "Offset of field: ",
9827 stringify!(kvm_msi),
9828 "::",
9829 stringify!(pad)
9830 )
9831 );
9832 }
9833 #[repr(C)]
9834 #[derive(Debug, Default, Copy, Clone)]
9835 pub struct kvm_arm_device_addr {
9836 pub id: __u64,
9837 pub addr: __u64,
9838 }
9839 #[test]
bindgen_test_layout_kvm_arm_device_addr()9840 fn bindgen_test_layout_kvm_arm_device_addr() {
9841 assert_eq!(
9842 ::std::mem::size_of::<kvm_arm_device_addr>(),
9843 16usize,
9844 concat!("Size of: ", stringify!(kvm_arm_device_addr))
9845 );
9846 assert_eq!(
9847 ::std::mem::align_of::<kvm_arm_device_addr>(),
9848 8usize,
9849 concat!("Alignment of ", stringify!(kvm_arm_device_addr))
9850 );
9851 assert_eq!(
9852 unsafe { &(*(::std::ptr::null::<kvm_arm_device_addr>())).id as *const _ as usize },
9853 0usize,
9854 concat!(
9855 "Offset of field: ",
9856 stringify!(kvm_arm_device_addr),
9857 "::",
9858 stringify!(id)
9859 )
9860 );
9861 assert_eq!(
9862 unsafe { &(*(::std::ptr::null::<kvm_arm_device_addr>())).addr as *const _ as usize },
9863 8usize,
9864 concat!(
9865 "Offset of field: ",
9866 stringify!(kvm_arm_device_addr),
9867 "::",
9868 stringify!(addr)
9869 )
9870 );
9871 }
9872 #[repr(C)]
9873 #[derive(Debug, Default, Copy, Clone)]
9874 pub struct kvm_create_device {
9875 pub type_: __u32,
9876 pub fd: __u32,
9877 pub flags: __u32,
9878 }
9879 #[test]
bindgen_test_layout_kvm_create_device()9880 fn bindgen_test_layout_kvm_create_device() {
9881 assert_eq!(
9882 ::std::mem::size_of::<kvm_create_device>(),
9883 12usize,
9884 concat!("Size of: ", stringify!(kvm_create_device))
9885 );
9886 assert_eq!(
9887 ::std::mem::align_of::<kvm_create_device>(),
9888 4usize,
9889 concat!("Alignment of ", stringify!(kvm_create_device))
9890 );
9891 assert_eq!(
9892 unsafe { &(*(::std::ptr::null::<kvm_create_device>())).type_ as *const _ as usize },
9893 0usize,
9894 concat!(
9895 "Offset of field: ",
9896 stringify!(kvm_create_device),
9897 "::",
9898 stringify!(type_)
9899 )
9900 );
9901 assert_eq!(
9902 unsafe { &(*(::std::ptr::null::<kvm_create_device>())).fd as *const _ as usize },
9903 4usize,
9904 concat!(
9905 "Offset of field: ",
9906 stringify!(kvm_create_device),
9907 "::",
9908 stringify!(fd)
9909 )
9910 );
9911 assert_eq!(
9912 unsafe { &(*(::std::ptr::null::<kvm_create_device>())).flags as *const _ as usize },
9913 8usize,
9914 concat!(
9915 "Offset of field: ",
9916 stringify!(kvm_create_device),
9917 "::",
9918 stringify!(flags)
9919 )
9920 );
9921 }
9922 #[repr(C)]
9923 #[derive(Debug, Default, Copy, Clone)]
9924 pub struct kvm_device_attr {
9925 pub flags: __u32,
9926 pub group: __u32,
9927 pub attr: __u64,
9928 pub addr: __u64,
9929 }
9930 #[test]
bindgen_test_layout_kvm_device_attr()9931 fn bindgen_test_layout_kvm_device_attr() {
9932 assert_eq!(
9933 ::std::mem::size_of::<kvm_device_attr>(),
9934 24usize,
9935 concat!("Size of: ", stringify!(kvm_device_attr))
9936 );
9937 assert_eq!(
9938 ::std::mem::align_of::<kvm_device_attr>(),
9939 8usize,
9940 concat!("Alignment of ", stringify!(kvm_device_attr))
9941 );
9942 assert_eq!(
9943 unsafe { &(*(::std::ptr::null::<kvm_device_attr>())).flags as *const _ as usize },
9944 0usize,
9945 concat!(
9946 "Offset of field: ",
9947 stringify!(kvm_device_attr),
9948 "::",
9949 stringify!(flags)
9950 )
9951 );
9952 assert_eq!(
9953 unsafe { &(*(::std::ptr::null::<kvm_device_attr>())).group as *const _ as usize },
9954 4usize,
9955 concat!(
9956 "Offset of field: ",
9957 stringify!(kvm_device_attr),
9958 "::",
9959 stringify!(group)
9960 )
9961 );
9962 assert_eq!(
9963 unsafe { &(*(::std::ptr::null::<kvm_device_attr>())).attr as *const _ as usize },
9964 8usize,
9965 concat!(
9966 "Offset of field: ",
9967 stringify!(kvm_device_attr),
9968 "::",
9969 stringify!(attr)
9970 )
9971 );
9972 assert_eq!(
9973 unsafe { &(*(::std::ptr::null::<kvm_device_attr>())).addr as *const _ as usize },
9974 16usize,
9975 concat!(
9976 "Offset of field: ",
9977 stringify!(kvm_device_attr),
9978 "::",
9979 stringify!(addr)
9980 )
9981 );
9982 }
9983 pub const kvm_device_type_KVM_DEV_TYPE_FSL_MPIC_20: kvm_device_type = 1;
9984 pub const kvm_device_type_KVM_DEV_TYPE_FSL_MPIC_42: kvm_device_type = 2;
9985 pub const kvm_device_type_KVM_DEV_TYPE_XICS: kvm_device_type = 3;
9986 pub const kvm_device_type_KVM_DEV_TYPE_VFIO: kvm_device_type = 4;
9987 pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V2: kvm_device_type = 5;
9988 pub const kvm_device_type_KVM_DEV_TYPE_FLIC: kvm_device_type = 6;
9989 pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V3: kvm_device_type = 7;
9990 pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_ITS: kvm_device_type = 8;
9991 pub const kvm_device_type_KVM_DEV_TYPE_XIVE: kvm_device_type = 9;
9992 pub const kvm_device_type_KVM_DEV_TYPE_MAX: kvm_device_type = 10;
9993 pub type kvm_device_type = u32;
9994 #[repr(C)]
9995 #[derive(Debug, Default, Copy, Clone)]
9996 pub struct kvm_vfio_spapr_tce {
9997 pub groupfd: __s32,
9998 pub tablefd: __s32,
9999 }
10000 #[test]
bindgen_test_layout_kvm_vfio_spapr_tce()10001 fn bindgen_test_layout_kvm_vfio_spapr_tce() {
10002 assert_eq!(
10003 ::std::mem::size_of::<kvm_vfio_spapr_tce>(),
10004 8usize,
10005 concat!("Size of: ", stringify!(kvm_vfio_spapr_tce))
10006 );
10007 assert_eq!(
10008 ::std::mem::align_of::<kvm_vfio_spapr_tce>(),
10009 4usize,
10010 concat!("Alignment of ", stringify!(kvm_vfio_spapr_tce))
10011 );
10012 assert_eq!(
10013 unsafe { &(*(::std::ptr::null::<kvm_vfio_spapr_tce>())).groupfd as *const _ as usize },
10014 0usize,
10015 concat!(
10016 "Offset of field: ",
10017 stringify!(kvm_vfio_spapr_tce),
10018 "::",
10019 stringify!(groupfd)
10020 )
10021 );
10022 assert_eq!(
10023 unsafe { &(*(::std::ptr::null::<kvm_vfio_spapr_tce>())).tablefd as *const _ as usize },
10024 4usize,
10025 concat!(
10026 "Offset of field: ",
10027 stringify!(kvm_vfio_spapr_tce),
10028 "::",
10029 stringify!(tablefd)
10030 )
10031 );
10032 }
10033 #[repr(C)]
10034 #[derive(Debug, Default, Copy, Clone)]
10035 pub struct kvm_s390_ucas_mapping {
10036 pub user_addr: __u64,
10037 pub vcpu_addr: __u64,
10038 pub length: __u64,
10039 }
10040 #[test]
bindgen_test_layout_kvm_s390_ucas_mapping()10041 fn bindgen_test_layout_kvm_s390_ucas_mapping() {
10042 assert_eq!(
10043 ::std::mem::size_of::<kvm_s390_ucas_mapping>(),
10044 24usize,
10045 concat!("Size of: ", stringify!(kvm_s390_ucas_mapping))
10046 );
10047 assert_eq!(
10048 ::std::mem::align_of::<kvm_s390_ucas_mapping>(),
10049 8usize,
10050 concat!("Alignment of ", stringify!(kvm_s390_ucas_mapping))
10051 );
10052 assert_eq!(
10053 unsafe { &(*(::std::ptr::null::<kvm_s390_ucas_mapping>())).user_addr as *const _ as usize },
10054 0usize,
10055 concat!(
10056 "Offset of field: ",
10057 stringify!(kvm_s390_ucas_mapping),
10058 "::",
10059 stringify!(user_addr)
10060 )
10061 );
10062 assert_eq!(
10063 unsafe { &(*(::std::ptr::null::<kvm_s390_ucas_mapping>())).vcpu_addr as *const _ as usize },
10064 8usize,
10065 concat!(
10066 "Offset of field: ",
10067 stringify!(kvm_s390_ucas_mapping),
10068 "::",
10069 stringify!(vcpu_addr)
10070 )
10071 );
10072 assert_eq!(
10073 unsafe { &(*(::std::ptr::null::<kvm_s390_ucas_mapping>())).length as *const _ as usize },
10074 16usize,
10075 concat!(
10076 "Offset of field: ",
10077 stringify!(kvm_s390_ucas_mapping),
10078 "::",
10079 stringify!(length)
10080 )
10081 );
10082 }
10083 #[repr(C)]
10084 #[derive(Debug, Default, Copy, Clone)]
10085 pub struct kvm_enc_region {
10086 pub addr: __u64,
10087 pub size: __u64,
10088 }
10089 #[test]
bindgen_test_layout_kvm_enc_region()10090 fn bindgen_test_layout_kvm_enc_region() {
10091 assert_eq!(
10092 ::std::mem::size_of::<kvm_enc_region>(),
10093 16usize,
10094 concat!("Size of: ", stringify!(kvm_enc_region))
10095 );
10096 assert_eq!(
10097 ::std::mem::align_of::<kvm_enc_region>(),
10098 8usize,
10099 concat!("Alignment of ", stringify!(kvm_enc_region))
10100 );
10101 assert_eq!(
10102 unsafe { &(*(::std::ptr::null::<kvm_enc_region>())).addr as *const _ as usize },
10103 0usize,
10104 concat!(
10105 "Offset of field: ",
10106 stringify!(kvm_enc_region),
10107 "::",
10108 stringify!(addr)
10109 )
10110 );
10111 assert_eq!(
10112 unsafe { &(*(::std::ptr::null::<kvm_enc_region>())).size as *const _ as usize },
10113 8usize,
10114 concat!(
10115 "Offset of field: ",
10116 stringify!(kvm_enc_region),
10117 "::",
10118 stringify!(size)
10119 )
10120 );
10121 }
10122 pub const sev_cmd_id_KVM_SEV_INIT: sev_cmd_id = 0;
10123 pub const sev_cmd_id_KVM_SEV_ES_INIT: sev_cmd_id = 1;
10124 pub const sev_cmd_id_KVM_SEV_LAUNCH_START: sev_cmd_id = 2;
10125 pub const sev_cmd_id_KVM_SEV_LAUNCH_UPDATE_DATA: sev_cmd_id = 3;
10126 pub const sev_cmd_id_KVM_SEV_LAUNCH_UPDATE_VMSA: sev_cmd_id = 4;
10127 pub const sev_cmd_id_KVM_SEV_LAUNCH_SECRET: sev_cmd_id = 5;
10128 pub const sev_cmd_id_KVM_SEV_LAUNCH_MEASURE: sev_cmd_id = 6;
10129 pub const sev_cmd_id_KVM_SEV_LAUNCH_FINISH: sev_cmd_id = 7;
10130 pub const sev_cmd_id_KVM_SEV_SEND_START: sev_cmd_id = 8;
10131 pub const sev_cmd_id_KVM_SEV_SEND_UPDATE_DATA: sev_cmd_id = 9;
10132 pub const sev_cmd_id_KVM_SEV_SEND_UPDATE_VMSA: sev_cmd_id = 10;
10133 pub const sev_cmd_id_KVM_SEV_SEND_FINISH: sev_cmd_id = 11;
10134 pub const sev_cmd_id_KVM_SEV_RECEIVE_START: sev_cmd_id = 12;
10135 pub const sev_cmd_id_KVM_SEV_RECEIVE_UPDATE_DATA: sev_cmd_id = 13;
10136 pub const sev_cmd_id_KVM_SEV_RECEIVE_UPDATE_VMSA: sev_cmd_id = 14;
10137 pub const sev_cmd_id_KVM_SEV_RECEIVE_FINISH: sev_cmd_id = 15;
10138 pub const sev_cmd_id_KVM_SEV_GUEST_STATUS: sev_cmd_id = 16;
10139 pub const sev_cmd_id_KVM_SEV_DBG_DECRYPT: sev_cmd_id = 17;
10140 pub const sev_cmd_id_KVM_SEV_DBG_ENCRYPT: sev_cmd_id = 18;
10141 pub const sev_cmd_id_KVM_SEV_CERT_EXPORT: sev_cmd_id = 19;
10142 pub const sev_cmd_id_KVM_SEV_NR_MAX: sev_cmd_id = 20;
10143 pub type sev_cmd_id = u32;
10144 #[repr(C)]
10145 #[derive(Debug, Default, Copy, Clone)]
10146 pub struct kvm_sev_cmd {
10147 pub id: __u32,
10148 pub data: __u64,
10149 pub error: __u32,
10150 pub sev_fd: __u32,
10151 }
10152 #[test]
bindgen_test_layout_kvm_sev_cmd()10153 fn bindgen_test_layout_kvm_sev_cmd() {
10154 assert_eq!(
10155 ::std::mem::size_of::<kvm_sev_cmd>(),
10156 24usize,
10157 concat!("Size of: ", stringify!(kvm_sev_cmd))
10158 );
10159 assert_eq!(
10160 ::std::mem::align_of::<kvm_sev_cmd>(),
10161 8usize,
10162 concat!("Alignment of ", stringify!(kvm_sev_cmd))
10163 );
10164 assert_eq!(
10165 unsafe { &(*(::std::ptr::null::<kvm_sev_cmd>())).id as *const _ as usize },
10166 0usize,
10167 concat!(
10168 "Offset of field: ",
10169 stringify!(kvm_sev_cmd),
10170 "::",
10171 stringify!(id)
10172 )
10173 );
10174 assert_eq!(
10175 unsafe { &(*(::std::ptr::null::<kvm_sev_cmd>())).data as *const _ as usize },
10176 8usize,
10177 concat!(
10178 "Offset of field: ",
10179 stringify!(kvm_sev_cmd),
10180 "::",
10181 stringify!(data)
10182 )
10183 );
10184 assert_eq!(
10185 unsafe { &(*(::std::ptr::null::<kvm_sev_cmd>())).error as *const _ as usize },
10186 16usize,
10187 concat!(
10188 "Offset of field: ",
10189 stringify!(kvm_sev_cmd),
10190 "::",
10191 stringify!(error)
10192 )
10193 );
10194 assert_eq!(
10195 unsafe { &(*(::std::ptr::null::<kvm_sev_cmd>())).sev_fd as *const _ as usize },
10196 20usize,
10197 concat!(
10198 "Offset of field: ",
10199 stringify!(kvm_sev_cmd),
10200 "::",
10201 stringify!(sev_fd)
10202 )
10203 );
10204 }
10205 #[repr(C)]
10206 #[derive(Debug, Default, Copy, Clone)]
10207 pub struct kvm_sev_launch_start {
10208 pub handle: __u32,
10209 pub policy: __u32,
10210 pub dh_uaddr: __u64,
10211 pub dh_len: __u32,
10212 pub session_uaddr: __u64,
10213 pub session_len: __u32,
10214 }
10215 #[test]
bindgen_test_layout_kvm_sev_launch_start()10216 fn bindgen_test_layout_kvm_sev_launch_start() {
10217 assert_eq!(
10218 ::std::mem::size_of::<kvm_sev_launch_start>(),
10219 40usize,
10220 concat!("Size of: ", stringify!(kvm_sev_launch_start))
10221 );
10222 assert_eq!(
10223 ::std::mem::align_of::<kvm_sev_launch_start>(),
10224 8usize,
10225 concat!("Alignment of ", stringify!(kvm_sev_launch_start))
10226 );
10227 assert_eq!(
10228 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_start>())).handle as *const _ as usize },
10229 0usize,
10230 concat!(
10231 "Offset of field: ",
10232 stringify!(kvm_sev_launch_start),
10233 "::",
10234 stringify!(handle)
10235 )
10236 );
10237 assert_eq!(
10238 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_start>())).policy as *const _ as usize },
10239 4usize,
10240 concat!(
10241 "Offset of field: ",
10242 stringify!(kvm_sev_launch_start),
10243 "::",
10244 stringify!(policy)
10245 )
10246 );
10247 assert_eq!(
10248 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_start>())).dh_uaddr as *const _ as usize },
10249 8usize,
10250 concat!(
10251 "Offset of field: ",
10252 stringify!(kvm_sev_launch_start),
10253 "::",
10254 stringify!(dh_uaddr)
10255 )
10256 );
10257 assert_eq!(
10258 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_start>())).dh_len as *const _ as usize },
10259 16usize,
10260 concat!(
10261 "Offset of field: ",
10262 stringify!(kvm_sev_launch_start),
10263 "::",
10264 stringify!(dh_len)
10265 )
10266 );
10267 assert_eq!(
10268 unsafe {
10269 &(*(::std::ptr::null::<kvm_sev_launch_start>())).session_uaddr as *const _ as usize
10270 },
10271 24usize,
10272 concat!(
10273 "Offset of field: ",
10274 stringify!(kvm_sev_launch_start),
10275 "::",
10276 stringify!(session_uaddr)
10277 )
10278 );
10279 assert_eq!(
10280 unsafe {
10281 &(*(::std::ptr::null::<kvm_sev_launch_start>())).session_len as *const _ as usize
10282 },
10283 32usize,
10284 concat!(
10285 "Offset of field: ",
10286 stringify!(kvm_sev_launch_start),
10287 "::",
10288 stringify!(session_len)
10289 )
10290 );
10291 }
10292 #[repr(C)]
10293 #[derive(Debug, Default, Copy, Clone)]
10294 pub struct kvm_sev_launch_update_data {
10295 pub uaddr: __u64,
10296 pub len: __u32,
10297 }
10298 #[test]
bindgen_test_layout_kvm_sev_launch_update_data()10299 fn bindgen_test_layout_kvm_sev_launch_update_data() {
10300 assert_eq!(
10301 ::std::mem::size_of::<kvm_sev_launch_update_data>(),
10302 16usize,
10303 concat!("Size of: ", stringify!(kvm_sev_launch_update_data))
10304 );
10305 assert_eq!(
10306 ::std::mem::align_of::<kvm_sev_launch_update_data>(),
10307 8usize,
10308 concat!("Alignment of ", stringify!(kvm_sev_launch_update_data))
10309 );
10310 assert_eq!(
10311 unsafe {
10312 &(*(::std::ptr::null::<kvm_sev_launch_update_data>())).uaddr as *const _ as usize
10313 },
10314 0usize,
10315 concat!(
10316 "Offset of field: ",
10317 stringify!(kvm_sev_launch_update_data),
10318 "::",
10319 stringify!(uaddr)
10320 )
10321 );
10322 assert_eq!(
10323 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_update_data>())).len as *const _ as usize },
10324 8usize,
10325 concat!(
10326 "Offset of field: ",
10327 stringify!(kvm_sev_launch_update_data),
10328 "::",
10329 stringify!(len)
10330 )
10331 );
10332 }
10333 #[repr(C)]
10334 #[derive(Debug, Default, Copy, Clone)]
10335 pub struct kvm_sev_launch_secret {
10336 pub hdr_uaddr: __u64,
10337 pub hdr_len: __u32,
10338 pub guest_uaddr: __u64,
10339 pub guest_len: __u32,
10340 pub trans_uaddr: __u64,
10341 pub trans_len: __u32,
10342 }
10343 #[test]
bindgen_test_layout_kvm_sev_launch_secret()10344 fn bindgen_test_layout_kvm_sev_launch_secret() {
10345 assert_eq!(
10346 ::std::mem::size_of::<kvm_sev_launch_secret>(),
10347 48usize,
10348 concat!("Size of: ", stringify!(kvm_sev_launch_secret))
10349 );
10350 assert_eq!(
10351 ::std::mem::align_of::<kvm_sev_launch_secret>(),
10352 8usize,
10353 concat!("Alignment of ", stringify!(kvm_sev_launch_secret))
10354 );
10355 assert_eq!(
10356 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_secret>())).hdr_uaddr as *const _ as usize },
10357 0usize,
10358 concat!(
10359 "Offset of field: ",
10360 stringify!(kvm_sev_launch_secret),
10361 "::",
10362 stringify!(hdr_uaddr)
10363 )
10364 );
10365 assert_eq!(
10366 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_secret>())).hdr_len as *const _ as usize },
10367 8usize,
10368 concat!(
10369 "Offset of field: ",
10370 stringify!(kvm_sev_launch_secret),
10371 "::",
10372 stringify!(hdr_len)
10373 )
10374 );
10375 assert_eq!(
10376 unsafe {
10377 &(*(::std::ptr::null::<kvm_sev_launch_secret>())).guest_uaddr as *const _ as usize
10378 },
10379 16usize,
10380 concat!(
10381 "Offset of field: ",
10382 stringify!(kvm_sev_launch_secret),
10383 "::",
10384 stringify!(guest_uaddr)
10385 )
10386 );
10387 assert_eq!(
10388 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_secret>())).guest_len as *const _ as usize },
10389 24usize,
10390 concat!(
10391 "Offset of field: ",
10392 stringify!(kvm_sev_launch_secret),
10393 "::",
10394 stringify!(guest_len)
10395 )
10396 );
10397 assert_eq!(
10398 unsafe {
10399 &(*(::std::ptr::null::<kvm_sev_launch_secret>())).trans_uaddr as *const _ as usize
10400 },
10401 32usize,
10402 concat!(
10403 "Offset of field: ",
10404 stringify!(kvm_sev_launch_secret),
10405 "::",
10406 stringify!(trans_uaddr)
10407 )
10408 );
10409 assert_eq!(
10410 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_secret>())).trans_len as *const _ as usize },
10411 40usize,
10412 concat!(
10413 "Offset of field: ",
10414 stringify!(kvm_sev_launch_secret),
10415 "::",
10416 stringify!(trans_len)
10417 )
10418 );
10419 }
10420 #[repr(C)]
10421 #[derive(Debug, Default, Copy, Clone)]
10422 pub struct kvm_sev_launch_measure {
10423 pub uaddr: __u64,
10424 pub len: __u32,
10425 }
10426 #[test]
bindgen_test_layout_kvm_sev_launch_measure()10427 fn bindgen_test_layout_kvm_sev_launch_measure() {
10428 assert_eq!(
10429 ::std::mem::size_of::<kvm_sev_launch_measure>(),
10430 16usize,
10431 concat!("Size of: ", stringify!(kvm_sev_launch_measure))
10432 );
10433 assert_eq!(
10434 ::std::mem::align_of::<kvm_sev_launch_measure>(),
10435 8usize,
10436 concat!("Alignment of ", stringify!(kvm_sev_launch_measure))
10437 );
10438 assert_eq!(
10439 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_measure>())).uaddr as *const _ as usize },
10440 0usize,
10441 concat!(
10442 "Offset of field: ",
10443 stringify!(kvm_sev_launch_measure),
10444 "::",
10445 stringify!(uaddr)
10446 )
10447 );
10448 assert_eq!(
10449 unsafe { &(*(::std::ptr::null::<kvm_sev_launch_measure>())).len as *const _ as usize },
10450 8usize,
10451 concat!(
10452 "Offset of field: ",
10453 stringify!(kvm_sev_launch_measure),
10454 "::",
10455 stringify!(len)
10456 )
10457 );
10458 }
10459 #[repr(C)]
10460 #[derive(Debug, Default, Copy, Clone)]
10461 pub struct kvm_sev_guest_status {
10462 pub handle: __u32,
10463 pub policy: __u32,
10464 pub state: __u32,
10465 }
10466 #[test]
bindgen_test_layout_kvm_sev_guest_status()10467 fn bindgen_test_layout_kvm_sev_guest_status() {
10468 assert_eq!(
10469 ::std::mem::size_of::<kvm_sev_guest_status>(),
10470 12usize,
10471 concat!("Size of: ", stringify!(kvm_sev_guest_status))
10472 );
10473 assert_eq!(
10474 ::std::mem::align_of::<kvm_sev_guest_status>(),
10475 4usize,
10476 concat!("Alignment of ", stringify!(kvm_sev_guest_status))
10477 );
10478 assert_eq!(
10479 unsafe { &(*(::std::ptr::null::<kvm_sev_guest_status>())).handle as *const _ as usize },
10480 0usize,
10481 concat!(
10482 "Offset of field: ",
10483 stringify!(kvm_sev_guest_status),
10484 "::",
10485 stringify!(handle)
10486 )
10487 );
10488 assert_eq!(
10489 unsafe { &(*(::std::ptr::null::<kvm_sev_guest_status>())).policy as *const _ as usize },
10490 4usize,
10491 concat!(
10492 "Offset of field: ",
10493 stringify!(kvm_sev_guest_status),
10494 "::",
10495 stringify!(policy)
10496 )
10497 );
10498 assert_eq!(
10499 unsafe { &(*(::std::ptr::null::<kvm_sev_guest_status>())).state as *const _ as usize },
10500 8usize,
10501 concat!(
10502 "Offset of field: ",
10503 stringify!(kvm_sev_guest_status),
10504 "::",
10505 stringify!(state)
10506 )
10507 );
10508 }
10509 #[repr(C)]
10510 #[derive(Debug, Default, Copy, Clone)]
10511 pub struct kvm_sev_dbg {
10512 pub src_uaddr: __u64,
10513 pub dst_uaddr: __u64,
10514 pub len: __u32,
10515 }
10516 #[test]
bindgen_test_layout_kvm_sev_dbg()10517 fn bindgen_test_layout_kvm_sev_dbg() {
10518 assert_eq!(
10519 ::std::mem::size_of::<kvm_sev_dbg>(),
10520 24usize,
10521 concat!("Size of: ", stringify!(kvm_sev_dbg))
10522 );
10523 assert_eq!(
10524 ::std::mem::align_of::<kvm_sev_dbg>(),
10525 8usize,
10526 concat!("Alignment of ", stringify!(kvm_sev_dbg))
10527 );
10528 assert_eq!(
10529 unsafe { &(*(::std::ptr::null::<kvm_sev_dbg>())).src_uaddr as *const _ as usize },
10530 0usize,
10531 concat!(
10532 "Offset of field: ",
10533 stringify!(kvm_sev_dbg),
10534 "::",
10535 stringify!(src_uaddr)
10536 )
10537 );
10538 assert_eq!(
10539 unsafe { &(*(::std::ptr::null::<kvm_sev_dbg>())).dst_uaddr as *const _ as usize },
10540 8usize,
10541 concat!(
10542 "Offset of field: ",
10543 stringify!(kvm_sev_dbg),
10544 "::",
10545 stringify!(dst_uaddr)
10546 )
10547 );
10548 assert_eq!(
10549 unsafe { &(*(::std::ptr::null::<kvm_sev_dbg>())).len as *const _ as usize },
10550 16usize,
10551 concat!(
10552 "Offset of field: ",
10553 stringify!(kvm_sev_dbg),
10554 "::",
10555 stringify!(len)
10556 )
10557 );
10558 }
10559 #[repr(C)]
10560 #[derive(Copy, Clone)]
10561 pub struct kvm_assigned_pci_dev {
10562 pub assigned_dev_id: __u32,
10563 pub busnr: __u32,
10564 pub devfn: __u32,
10565 pub flags: __u32,
10566 pub segnr: __u32,
10567 pub __bindgen_anon_1: kvm_assigned_pci_dev__bindgen_ty_1,
10568 }
10569 #[repr(C)]
10570 #[derive(Copy, Clone)]
10571 pub union kvm_assigned_pci_dev__bindgen_ty_1 {
10572 pub reserved: [__u32; 11usize],
10573 _bindgen_union_align: [u32; 11usize],
10574 }
10575 #[test]
bindgen_test_layout_kvm_assigned_pci_dev__bindgen_ty_1()10576 fn bindgen_test_layout_kvm_assigned_pci_dev__bindgen_ty_1() {
10577 assert_eq!(
10578 ::std::mem::size_of::<kvm_assigned_pci_dev__bindgen_ty_1>(),
10579 44usize,
10580 concat!("Size of: ", stringify!(kvm_assigned_pci_dev__bindgen_ty_1))
10581 );
10582 assert_eq!(
10583 ::std::mem::align_of::<kvm_assigned_pci_dev__bindgen_ty_1>(),
10584 4usize,
10585 concat!(
10586 "Alignment of ",
10587 stringify!(kvm_assigned_pci_dev__bindgen_ty_1)
10588 )
10589 );
10590 assert_eq!(
10591 unsafe {
10592 &(*(::std::ptr::null::<kvm_assigned_pci_dev__bindgen_ty_1>())).reserved as *const _
10593 as usize
10594 },
10595 0usize,
10596 concat!(
10597 "Offset of field: ",
10598 stringify!(kvm_assigned_pci_dev__bindgen_ty_1),
10599 "::",
10600 stringify!(reserved)
10601 )
10602 );
10603 }
10604 impl Default for kvm_assigned_pci_dev__bindgen_ty_1 {
default() -> Self10605 fn default() -> Self {
10606 unsafe { ::std::mem::zeroed() }
10607 }
10608 }
10609 #[test]
bindgen_test_layout_kvm_assigned_pci_dev()10610 fn bindgen_test_layout_kvm_assigned_pci_dev() {
10611 assert_eq!(
10612 ::std::mem::size_of::<kvm_assigned_pci_dev>(),
10613 64usize,
10614 concat!("Size of: ", stringify!(kvm_assigned_pci_dev))
10615 );
10616 assert_eq!(
10617 ::std::mem::align_of::<kvm_assigned_pci_dev>(),
10618 4usize,
10619 concat!("Alignment of ", stringify!(kvm_assigned_pci_dev))
10620 );
10621 assert_eq!(
10622 unsafe {
10623 &(*(::std::ptr::null::<kvm_assigned_pci_dev>())).assigned_dev_id as *const _ as usize
10624 },
10625 0usize,
10626 concat!(
10627 "Offset of field: ",
10628 stringify!(kvm_assigned_pci_dev),
10629 "::",
10630 stringify!(assigned_dev_id)
10631 )
10632 );
10633 assert_eq!(
10634 unsafe { &(*(::std::ptr::null::<kvm_assigned_pci_dev>())).busnr as *const _ as usize },
10635 4usize,
10636 concat!(
10637 "Offset of field: ",
10638 stringify!(kvm_assigned_pci_dev),
10639 "::",
10640 stringify!(busnr)
10641 )
10642 );
10643 assert_eq!(
10644 unsafe { &(*(::std::ptr::null::<kvm_assigned_pci_dev>())).devfn as *const _ as usize },
10645 8usize,
10646 concat!(
10647 "Offset of field: ",
10648 stringify!(kvm_assigned_pci_dev),
10649 "::",
10650 stringify!(devfn)
10651 )
10652 );
10653 assert_eq!(
10654 unsafe { &(*(::std::ptr::null::<kvm_assigned_pci_dev>())).flags as *const _ as usize },
10655 12usize,
10656 concat!(
10657 "Offset of field: ",
10658 stringify!(kvm_assigned_pci_dev),
10659 "::",
10660 stringify!(flags)
10661 )
10662 );
10663 assert_eq!(
10664 unsafe { &(*(::std::ptr::null::<kvm_assigned_pci_dev>())).segnr as *const _ as usize },
10665 16usize,
10666 concat!(
10667 "Offset of field: ",
10668 stringify!(kvm_assigned_pci_dev),
10669 "::",
10670 stringify!(segnr)
10671 )
10672 );
10673 }
10674 impl Default for kvm_assigned_pci_dev {
default() -> Self10675 fn default() -> Self {
10676 unsafe { ::std::mem::zeroed() }
10677 }
10678 }
10679 #[repr(C)]
10680 #[derive(Copy, Clone)]
10681 pub struct kvm_assigned_irq {
10682 pub assigned_dev_id: __u32,
10683 pub host_irq: __u32,
10684 pub guest_irq: __u32,
10685 pub flags: __u32,
10686 pub __bindgen_anon_1: kvm_assigned_irq__bindgen_ty_1,
10687 }
10688 #[repr(C)]
10689 #[derive(Copy, Clone)]
10690 pub union kvm_assigned_irq__bindgen_ty_1 {
10691 pub reserved: [__u32; 12usize],
10692 _bindgen_union_align: [u32; 12usize],
10693 }
10694 #[test]
bindgen_test_layout_kvm_assigned_irq__bindgen_ty_1()10695 fn bindgen_test_layout_kvm_assigned_irq__bindgen_ty_1() {
10696 assert_eq!(
10697 ::std::mem::size_of::<kvm_assigned_irq__bindgen_ty_1>(),
10698 48usize,
10699 concat!("Size of: ", stringify!(kvm_assigned_irq__bindgen_ty_1))
10700 );
10701 assert_eq!(
10702 ::std::mem::align_of::<kvm_assigned_irq__bindgen_ty_1>(),
10703 4usize,
10704 concat!("Alignment of ", stringify!(kvm_assigned_irq__bindgen_ty_1))
10705 );
10706 assert_eq!(
10707 unsafe {
10708 &(*(::std::ptr::null::<kvm_assigned_irq__bindgen_ty_1>())).reserved as *const _ as usize
10709 },
10710 0usize,
10711 concat!(
10712 "Offset of field: ",
10713 stringify!(kvm_assigned_irq__bindgen_ty_1),
10714 "::",
10715 stringify!(reserved)
10716 )
10717 );
10718 }
10719 impl Default for kvm_assigned_irq__bindgen_ty_1 {
default() -> Self10720 fn default() -> Self {
10721 unsafe { ::std::mem::zeroed() }
10722 }
10723 }
10724 #[test]
bindgen_test_layout_kvm_assigned_irq()10725 fn bindgen_test_layout_kvm_assigned_irq() {
10726 assert_eq!(
10727 ::std::mem::size_of::<kvm_assigned_irq>(),
10728 64usize,
10729 concat!("Size of: ", stringify!(kvm_assigned_irq))
10730 );
10731 assert_eq!(
10732 ::std::mem::align_of::<kvm_assigned_irq>(),
10733 4usize,
10734 concat!("Alignment of ", stringify!(kvm_assigned_irq))
10735 );
10736 assert_eq!(
10737 unsafe {
10738 &(*(::std::ptr::null::<kvm_assigned_irq>())).assigned_dev_id as *const _ as usize
10739 },
10740 0usize,
10741 concat!(
10742 "Offset of field: ",
10743 stringify!(kvm_assigned_irq),
10744 "::",
10745 stringify!(assigned_dev_id)
10746 )
10747 );
10748 assert_eq!(
10749 unsafe { &(*(::std::ptr::null::<kvm_assigned_irq>())).host_irq as *const _ as usize },
10750 4usize,
10751 concat!(
10752 "Offset of field: ",
10753 stringify!(kvm_assigned_irq),
10754 "::",
10755 stringify!(host_irq)
10756 )
10757 );
10758 assert_eq!(
10759 unsafe { &(*(::std::ptr::null::<kvm_assigned_irq>())).guest_irq as *const _ as usize },
10760 8usize,
10761 concat!(
10762 "Offset of field: ",
10763 stringify!(kvm_assigned_irq),
10764 "::",
10765 stringify!(guest_irq)
10766 )
10767 );
10768 assert_eq!(
10769 unsafe { &(*(::std::ptr::null::<kvm_assigned_irq>())).flags as *const _ as usize },
10770 12usize,
10771 concat!(
10772 "Offset of field: ",
10773 stringify!(kvm_assigned_irq),
10774 "::",
10775 stringify!(flags)
10776 )
10777 );
10778 }
10779 impl Default for kvm_assigned_irq {
default() -> Self10780 fn default() -> Self {
10781 unsafe { ::std::mem::zeroed() }
10782 }
10783 }
10784 #[repr(C)]
10785 #[derive(Debug, Default, Copy, Clone)]
10786 pub struct kvm_assigned_msix_nr {
10787 pub assigned_dev_id: __u32,
10788 pub entry_nr: __u16,
10789 pub padding: __u16,
10790 }
10791 #[test]
bindgen_test_layout_kvm_assigned_msix_nr()10792 fn bindgen_test_layout_kvm_assigned_msix_nr() {
10793 assert_eq!(
10794 ::std::mem::size_of::<kvm_assigned_msix_nr>(),
10795 8usize,
10796 concat!("Size of: ", stringify!(kvm_assigned_msix_nr))
10797 );
10798 assert_eq!(
10799 ::std::mem::align_of::<kvm_assigned_msix_nr>(),
10800 4usize,
10801 concat!("Alignment of ", stringify!(kvm_assigned_msix_nr))
10802 );
10803 assert_eq!(
10804 unsafe {
10805 &(*(::std::ptr::null::<kvm_assigned_msix_nr>())).assigned_dev_id as *const _ as usize
10806 },
10807 0usize,
10808 concat!(
10809 "Offset of field: ",
10810 stringify!(kvm_assigned_msix_nr),
10811 "::",
10812 stringify!(assigned_dev_id)
10813 )
10814 );
10815 assert_eq!(
10816 unsafe { &(*(::std::ptr::null::<kvm_assigned_msix_nr>())).entry_nr as *const _ as usize },
10817 4usize,
10818 concat!(
10819 "Offset of field: ",
10820 stringify!(kvm_assigned_msix_nr),
10821 "::",
10822 stringify!(entry_nr)
10823 )
10824 );
10825 assert_eq!(
10826 unsafe { &(*(::std::ptr::null::<kvm_assigned_msix_nr>())).padding as *const _ as usize },
10827 6usize,
10828 concat!(
10829 "Offset of field: ",
10830 stringify!(kvm_assigned_msix_nr),
10831 "::",
10832 stringify!(padding)
10833 )
10834 );
10835 }
10836 #[repr(C)]
10837 #[derive(Debug, Default, Copy, Clone)]
10838 pub struct kvm_assigned_msix_entry {
10839 pub assigned_dev_id: __u32,
10840 pub gsi: __u32,
10841 pub entry: __u16,
10842 pub padding: [__u16; 3usize],
10843 }
10844 #[test]
bindgen_test_layout_kvm_assigned_msix_entry()10845 fn bindgen_test_layout_kvm_assigned_msix_entry() {
10846 assert_eq!(
10847 ::std::mem::size_of::<kvm_assigned_msix_entry>(),
10848 16usize,
10849 concat!("Size of: ", stringify!(kvm_assigned_msix_entry))
10850 );
10851 assert_eq!(
10852 ::std::mem::align_of::<kvm_assigned_msix_entry>(),
10853 4usize,
10854 concat!("Alignment of ", stringify!(kvm_assigned_msix_entry))
10855 );
10856 assert_eq!(
10857 unsafe {
10858 &(*(::std::ptr::null::<kvm_assigned_msix_entry>())).assigned_dev_id as *const _ as usize
10859 },
10860 0usize,
10861 concat!(
10862 "Offset of field: ",
10863 stringify!(kvm_assigned_msix_entry),
10864 "::",
10865 stringify!(assigned_dev_id)
10866 )
10867 );
10868 assert_eq!(
10869 unsafe { &(*(::std::ptr::null::<kvm_assigned_msix_entry>())).gsi as *const _ as usize },
10870 4usize,
10871 concat!(
10872 "Offset of field: ",
10873 stringify!(kvm_assigned_msix_entry),
10874 "::",
10875 stringify!(gsi)
10876 )
10877 );
10878 assert_eq!(
10879 unsafe { &(*(::std::ptr::null::<kvm_assigned_msix_entry>())).entry as *const _ as usize },
10880 8usize,
10881 concat!(
10882 "Offset of field: ",
10883 stringify!(kvm_assigned_msix_entry),
10884 "::",
10885 stringify!(entry)
10886 )
10887 );
10888 assert_eq!(
10889 unsafe { &(*(::std::ptr::null::<kvm_assigned_msix_entry>())).padding as *const _ as usize },
10890 10usize,
10891 concat!(
10892 "Offset of field: ",
10893 stringify!(kvm_assigned_msix_entry),
10894 "::",
10895 stringify!(padding)
10896 )
10897 );
10898 }
10899 #[repr(C)]
10900 #[derive(Debug, Default, Copy, Clone)]
10901 pub struct kvm_hyperv_eventfd {
10902 pub conn_id: __u32,
10903 pub fd: __s32,
10904 pub flags: __u32,
10905 pub padding: [__u32; 3usize],
10906 }
10907 #[test]
bindgen_test_layout_kvm_hyperv_eventfd()10908 fn bindgen_test_layout_kvm_hyperv_eventfd() {
10909 assert_eq!(
10910 ::std::mem::size_of::<kvm_hyperv_eventfd>(),
10911 24usize,
10912 concat!("Size of: ", stringify!(kvm_hyperv_eventfd))
10913 );
10914 assert_eq!(
10915 ::std::mem::align_of::<kvm_hyperv_eventfd>(),
10916 4usize,
10917 concat!("Alignment of ", stringify!(kvm_hyperv_eventfd))
10918 );
10919 assert_eq!(
10920 unsafe { &(*(::std::ptr::null::<kvm_hyperv_eventfd>())).conn_id as *const _ as usize },
10921 0usize,
10922 concat!(
10923 "Offset of field: ",
10924 stringify!(kvm_hyperv_eventfd),
10925 "::",
10926 stringify!(conn_id)
10927 )
10928 );
10929 assert_eq!(
10930 unsafe { &(*(::std::ptr::null::<kvm_hyperv_eventfd>())).fd as *const _ as usize },
10931 4usize,
10932 concat!(
10933 "Offset of field: ",
10934 stringify!(kvm_hyperv_eventfd),
10935 "::",
10936 stringify!(fd)
10937 )
10938 );
10939 assert_eq!(
10940 unsafe { &(*(::std::ptr::null::<kvm_hyperv_eventfd>())).flags as *const _ as usize },
10941 8usize,
10942 concat!(
10943 "Offset of field: ",
10944 stringify!(kvm_hyperv_eventfd),
10945 "::",
10946 stringify!(flags)
10947 )
10948 );
10949 assert_eq!(
10950 unsafe { &(*(::std::ptr::null::<kvm_hyperv_eventfd>())).padding as *const _ as usize },
10951 12usize,
10952 concat!(
10953 "Offset of field: ",
10954 stringify!(kvm_hyperv_eventfd),
10955 "::",
10956 stringify!(padding)
10957 )
10958 );
10959 }
10960