From 5e6fee472f32617d8cfc385f919e7bdd978bbd01 Mon Sep 17 00:00:00 2001 From: Tan En De Date: Wed, 27 Sep 2023 16:45:38 +0800 Subject: [PATCH] riscv: Initial support with v6.5 bindings Generated based on Linux tag v6.5. Signed-off-by: Tan En De --- .cargo/config | 3 + README.md | 1 + src/lib.rs | 5 + src/riscv/bindings.rs | 12441 ++++++++++++++++++++++++++++++++++++++++ src/riscv/mod.rs | 15 + 5 files changed, 12465 insertions(+) create mode 100644 src/riscv/bindings.rs create mode 100644 src/riscv/mod.rs diff --git a/.cargo/config b/.cargo/config index bf8523e..88cee92 100644 --- a/.cargo/config +++ b/.cargo/config @@ -3,3 +3,6 @@ # Related issue: https://github.com/rust-lang/compiler-builtins/issues/201 [target.aarch64-unknown-linux-musl] rustflags = [ "-C", "target-feature=+crt-static", "-C", "link-arg=-lgcc"] + +[target.riscv64gc-unknown-linux-gnu] +linker = "riscv64-unknown-linux-gnu-gcc" diff --git a/README.md b/README.md index a7d467c..e983e36 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ following target architectures: - x86_64 - arm - arm64 +- riscv The bindings exported by this crate are statically generated using header files associated with a specific kernel version, and are not automatically synced with diff --git a/src/lib.rs b/src/lib.rs index 03e43f0..8c3f0d9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -20,3 +20,8 @@ pub use self::x86_64::*; mod arm64; #[cfg(any(target_arch = "aarch", target_arch = "aarch64"))] pub use self::arm64::*; + +#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] +mod riscv; +#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] +pub use self::riscv::*; diff --git a/src/riscv/bindings.rs b/src/riscv/bindings.rs new file mode 100644 index 0000000..0e17745 --- /dev/null +++ b/src/riscv/bindings.rs @@ -0,0 +1,12441 @@ +/* automatically generated by rust-bindgen 0.64.0 */ + +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::std::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::std::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::std::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +pub const __FD_SETSIZE: u32 = 1024; +pub const _IOC_NRBITS: u32 = 8; +pub const _IOC_TYPEBITS: u32 = 8; +pub const _IOC_SIZEBITS: u32 = 14; +pub const _IOC_DIRBITS: u32 = 2; +pub const _IOC_NRMASK: u32 = 255; +pub const _IOC_TYPEMASK: u32 = 255; +pub const _IOC_SIZEMASK: u32 = 16383; +pub const _IOC_DIRMASK: u32 = 3; +pub const _IOC_NRSHIFT: u32 = 0; +pub const _IOC_TYPESHIFT: u32 = 8; +pub const _IOC_SIZESHIFT: u32 = 16; +pub const _IOC_DIRSHIFT: u32 = 30; +pub const _IOC_NONE: u32 = 0; +pub const _IOC_WRITE: u32 = 1; +pub const _IOC_READ: u32 = 2; +pub const IOC_IN: u32 = 1073741824; +pub const IOC_OUT: u32 = 2147483648; +pub const IOC_INOUT: u32 = 3221225472; +pub const IOCSIZE_MASK: u32 = 1073676288; +pub const IOCSIZE_SHIFT: u32 = 16; +pub const RISCV_MAX_VLENB: u32 = 8192; +pub const KVM_COALESCED_MMIO_PAGE_OFFSET: u32 = 1; +pub const KVM_INTERRUPT_SET: i32 = -1; +pub const KVM_INTERRUPT_UNSET: i32 = -2; +pub const KVM_RISCV_MODE_S: u32 = 1; +pub const KVM_RISCV_MODE_U: u32 = 0; +pub const KVM_RISCV_TIMER_STATE_OFF: u32 = 0; +pub const KVM_RISCV_TIMER_STATE_ON: u32 = 1; +pub const KVM_REG_RISCV_TYPE_MASK: u32 = 4278190080; +pub const KVM_REG_RISCV_TYPE_SHIFT: u32 = 24; +pub const KVM_REG_RISCV_SUBTYPE_MASK: u32 = 16711680; +pub const KVM_REG_RISCV_SUBTYPE_SHIFT: u32 = 16; +pub const KVM_REG_RISCV_CONFIG: u32 = 16777216; +pub const KVM_REG_RISCV_CORE: u32 = 33554432; +pub const KVM_REG_RISCV_CSR: u32 = 50331648; +pub const KVM_REG_RISCV_CSR_GENERAL: u32 = 0; +pub const KVM_REG_RISCV_CSR_AIA: u32 = 65536; +pub const KVM_REG_RISCV_TIMER: u32 = 67108864; +pub const KVM_REG_RISCV_FP_F: u32 = 83886080; +pub const KVM_REG_RISCV_FP_D: u32 = 100663296; +pub const KVM_REG_RISCV_ISA_EXT: u32 = 117440512; +pub const KVM_REG_RISCV_SBI_EXT: u32 = 134217728; +pub const KVM_REG_RISCV_SBI_SINGLE: u32 = 0; +pub const KVM_REG_RISCV_SBI_MULTI_EN: u32 = 65536; +pub const KVM_REG_RISCV_SBI_MULTI_DIS: u32 = 131072; +pub const KVM_REG_RISCV_VECTOR: u32 = 150994944; +pub const KVM_DEV_RISCV_APLIC_ALIGN: u32 = 4096; +pub const KVM_DEV_RISCV_APLIC_SIZE: u32 = 16384; +pub const KVM_DEV_RISCV_APLIC_MAX_HARTS: u32 = 16384; +pub const KVM_DEV_RISCV_IMSIC_ALIGN: u32 = 4096; +pub const KVM_DEV_RISCV_IMSIC_SIZE: u32 = 4096; +pub const KVM_DEV_RISCV_AIA_GRP_CONFIG: u32 = 0; +pub const KVM_DEV_RISCV_AIA_CONFIG_MODE: u32 = 0; +pub const KVM_DEV_RISCV_AIA_CONFIG_IDS: u32 = 1; +pub const KVM_DEV_RISCV_AIA_CONFIG_SRCS: u32 = 2; +pub const KVM_DEV_RISCV_AIA_CONFIG_GROUP_BITS: u32 = 3; +pub const KVM_DEV_RISCV_AIA_CONFIG_GROUP_SHIFT: u32 = 4; +pub const KVM_DEV_RISCV_AIA_CONFIG_HART_BITS: u32 = 5; +pub const KVM_DEV_RISCV_AIA_CONFIG_GUEST_BITS: u32 = 6; +pub const KVM_DEV_RISCV_AIA_MODE_EMUL: u32 = 0; +pub const KVM_DEV_RISCV_AIA_MODE_HWACCEL: u32 = 1; +pub const KVM_DEV_RISCV_AIA_MODE_AUTO: u32 = 2; +pub const KVM_DEV_RISCV_AIA_IDS_MIN: u32 = 63; +pub const KVM_DEV_RISCV_AIA_IDS_MAX: u32 = 2048; +pub const KVM_DEV_RISCV_AIA_SRCS_MAX: u32 = 1024; +pub const KVM_DEV_RISCV_AIA_GROUP_BITS_MAX: u32 = 8; +pub const KVM_DEV_RISCV_AIA_GROUP_SHIFT_MIN: u32 = 24; +pub const KVM_DEV_RISCV_AIA_GROUP_SHIFT_MAX: u32 = 56; +pub const KVM_DEV_RISCV_AIA_HART_BITS_MAX: u32 = 16; +pub const KVM_DEV_RISCV_AIA_GUEST_BITS_MAX: u32 = 8; +pub const KVM_DEV_RISCV_AIA_GRP_ADDR: u32 = 1; +pub const KVM_DEV_RISCV_AIA_ADDR_APLIC: u32 = 0; +pub const KVM_DEV_RISCV_AIA_ADDR_MAX: u32 = 16385; +pub const KVM_DEV_RISCV_AIA_GRP_CTRL: u32 = 2; +pub const KVM_DEV_RISCV_AIA_CTRL_INIT: u32 = 0; +pub const KVM_DEV_RISCV_AIA_GRP_APLIC: u32 = 3; +pub const KVM_DEV_RISCV_AIA_GRP_IMSIC: u32 = 4; +pub const KVM_DEV_RISCV_AIA_IMSIC_ISEL_BITS: u32 = 12; +pub const KVM_DEV_RISCV_AIA_IMSIC_ISEL_MASK: u32 = 4095; +pub const KVM_NR_IRQCHIPS: u32 = 1; +pub const KVM_API_VERSION: u32 = 12; +pub const KVM_TRC_SHIFT: u32 = 16; +pub const KVM_TRC_ENTRYEXIT: u32 = 65536; +pub const KVM_TRC_HANDLER: u32 = 131072; +pub const KVM_TRC_VMENTRY: u32 = 65537; +pub const KVM_TRC_VMEXIT: u32 = 65538; +pub const KVM_TRC_PAGE_FAULT: u32 = 131073; +pub const KVM_TRC_HEAD_SIZE: u32 = 12; +pub const KVM_TRC_CYCLE_SIZE: u32 = 8; +pub const KVM_TRC_EXTRA_MAX: u32 = 7; +pub const KVM_TRC_INJ_VIRQ: u32 = 131074; +pub const KVM_TRC_REDELIVER_EVT: u32 = 131075; +pub const KVM_TRC_PEND_INTR: u32 = 131076; +pub const KVM_TRC_IO_READ: u32 = 131077; +pub const KVM_TRC_IO_WRITE: u32 = 131078; +pub const KVM_TRC_CR_READ: u32 = 131079; +pub const KVM_TRC_CR_WRITE: u32 = 131080; +pub const KVM_TRC_DR_READ: u32 = 131081; +pub const KVM_TRC_DR_WRITE: u32 = 131082; +pub const KVM_TRC_MSR_READ: u32 = 131083; +pub const KVM_TRC_MSR_WRITE: u32 = 131084; +pub const KVM_TRC_CPUID: u32 = 131085; +pub const KVM_TRC_INTR: u32 = 131086; +pub const KVM_TRC_NMI: u32 = 131087; +pub const KVM_TRC_VMMCALL: u32 = 131088; +pub const KVM_TRC_HLT: u32 = 131089; +pub const KVM_TRC_CLTS: u32 = 131090; +pub const KVM_TRC_LMSW: u32 = 131091; +pub const KVM_TRC_APIC_ACCESS: u32 = 131092; +pub const KVM_TRC_TDP_FAULT: u32 = 131093; +pub const KVM_TRC_GTLB_WRITE: u32 = 131094; +pub const KVM_TRC_STLB_WRITE: u32 = 131095; +pub const KVM_TRC_STLB_INVAL: u32 = 131096; +pub const KVM_TRC_PPC_INSTR: u32 = 131097; +pub const KVM_MEM_LOG_DIRTY_PAGES: u32 = 1; +pub const KVM_MEM_READONLY: u32 = 2; +pub const KVM_PIT_SPEAKER_DUMMY: u32 = 1; +pub const KVM_S390_CMMA_PEEK: u32 = 1; +pub const KVM_EXIT_HYPERV_SYNIC: u32 = 1; +pub const KVM_EXIT_HYPERV_HCALL: u32 = 2; +pub const KVM_EXIT_HYPERV_SYNDBG: u32 = 3; +pub const KVM_EXIT_XEN_HCALL: u32 = 1; +pub const KVM_S390_GET_SKEYS_NONE: u32 = 1; +pub const KVM_S390_SKEYS_MAX: u32 = 1048576; +pub const KVM_EXIT_UNKNOWN: u32 = 0; +pub const KVM_EXIT_EXCEPTION: u32 = 1; +pub const KVM_EXIT_IO: u32 = 2; +pub const KVM_EXIT_HYPERCALL: u32 = 3; +pub const KVM_EXIT_DEBUG: u32 = 4; +pub const KVM_EXIT_HLT: u32 = 5; +pub const KVM_EXIT_MMIO: u32 = 6; +pub const KVM_EXIT_IRQ_WINDOW_OPEN: u32 = 7; +pub const KVM_EXIT_SHUTDOWN: u32 = 8; +pub const KVM_EXIT_FAIL_ENTRY: u32 = 9; +pub const KVM_EXIT_INTR: u32 = 10; +pub const KVM_EXIT_SET_TPR: u32 = 11; +pub const KVM_EXIT_TPR_ACCESS: u32 = 12; +pub const KVM_EXIT_S390_SIEIC: u32 = 13; +pub const KVM_EXIT_S390_RESET: u32 = 14; +pub const KVM_EXIT_DCR: u32 = 15; +pub const KVM_EXIT_NMI: u32 = 16; +pub const KVM_EXIT_INTERNAL_ERROR: u32 = 17; +pub const KVM_EXIT_OSI: u32 = 18; +pub const KVM_EXIT_PAPR_HCALL: u32 = 19; +pub const KVM_EXIT_S390_UCONTROL: u32 = 20; +pub const KVM_EXIT_WATCHDOG: u32 = 21; +pub const KVM_EXIT_S390_TSCH: u32 = 22; +pub const KVM_EXIT_EPR: u32 = 23; +pub const KVM_EXIT_SYSTEM_EVENT: u32 = 24; +pub const KVM_EXIT_S390_STSI: u32 = 25; +pub const KVM_EXIT_IOAPIC_EOI: u32 = 26; +pub const KVM_EXIT_HYPERV: u32 = 27; +pub const KVM_EXIT_ARM_NISV: u32 = 28; +pub const KVM_EXIT_X86_RDMSR: u32 = 29; +pub const KVM_EXIT_X86_WRMSR: u32 = 30; +pub const KVM_EXIT_DIRTY_RING_FULL: u32 = 31; +pub const KVM_EXIT_AP_RESET_HOLD: u32 = 32; +pub const KVM_EXIT_X86_BUS_LOCK: u32 = 33; +pub const KVM_EXIT_XEN: u32 = 34; +pub const KVM_EXIT_RISCV_SBI: u32 = 35; +pub const KVM_EXIT_RISCV_CSR: u32 = 36; +pub const KVM_EXIT_NOTIFY: u32 = 37; +pub const KVM_INTERNAL_ERROR_EMULATION: u32 = 1; +pub const KVM_INTERNAL_ERROR_SIMUL_EX: u32 = 2; +pub const KVM_INTERNAL_ERROR_DELIVERY_EV: u32 = 3; +pub const KVM_INTERNAL_ERROR_UNEXPECTED_EXIT_REASON: u32 = 4; +pub const KVM_INTERNAL_ERROR_EMULATION_FLAG_INSTRUCTION_BYTES: u32 = 1; +pub const KVM_EXIT_IO_IN: u32 = 0; +pub const KVM_EXIT_IO_OUT: u32 = 1; +pub const KVM_S390_RESET_POR: u32 = 1; +pub const KVM_S390_RESET_CLEAR: u32 = 2; +pub const KVM_S390_RESET_SUBSYSTEM: u32 = 4; +pub const KVM_S390_RESET_CPU_INIT: u32 = 8; +pub const KVM_S390_RESET_IPL: u32 = 16; +pub const KVM_SYSTEM_EVENT_SHUTDOWN: u32 = 1; +pub const KVM_SYSTEM_EVENT_RESET: u32 = 2; +pub const KVM_SYSTEM_EVENT_CRASH: u32 = 3; +pub const KVM_SYSTEM_EVENT_WAKEUP: u32 = 4; +pub const KVM_SYSTEM_EVENT_SUSPEND: u32 = 5; +pub const KVM_SYSTEM_EVENT_SEV_TERM: u32 = 6; +pub const KVM_MSR_EXIT_REASON_INVAL: u32 = 1; +pub const KVM_MSR_EXIT_REASON_UNKNOWN: u32 = 2; +pub const KVM_MSR_EXIT_REASON_FILTER: u32 = 4; +pub const KVM_MSR_EXIT_REASON_VALID_MASK: u32 = 7; +pub const KVM_NOTIFY_CONTEXT_INVALID: u32 = 1; +pub const SYNC_REGS_SIZE_BYTES: u32 = 2048; +pub const KVM_S390_MEMOP_LOGICAL_READ: u32 = 0; +pub const KVM_S390_MEMOP_LOGICAL_WRITE: u32 = 1; +pub const KVM_S390_MEMOP_SIDA_READ: u32 = 2; +pub const KVM_S390_MEMOP_SIDA_WRITE: u32 = 3; +pub const KVM_S390_MEMOP_ABSOLUTE_READ: u32 = 4; +pub const KVM_S390_MEMOP_ABSOLUTE_WRITE: u32 = 5; +pub const KVM_S390_MEMOP_ABSOLUTE_CMPXCHG: u32 = 6; +pub const KVM_S390_MEMOP_F_CHECK_ONLY: u32 = 1; +pub const KVM_S390_MEMOP_F_INJECT_EXCEPTION: u32 = 2; +pub const KVM_S390_MEMOP_F_SKEY_PROTECTION: u32 = 4; +pub const KVM_S390_MEMOP_EXTENSION_CAP_BASE: u32 = 1; +pub const KVM_S390_MEMOP_EXTENSION_CAP_CMPXCHG: u32 = 2; +pub const KVM_MP_STATE_RUNNABLE: u32 = 0; +pub const KVM_MP_STATE_UNINITIALIZED: u32 = 1; +pub const KVM_MP_STATE_INIT_RECEIVED: u32 = 2; +pub const KVM_MP_STATE_HALTED: u32 = 3; +pub const KVM_MP_STATE_SIPI_RECEIVED: u32 = 4; +pub const KVM_MP_STATE_STOPPED: u32 = 5; +pub const KVM_MP_STATE_CHECK_STOP: u32 = 6; +pub const KVM_MP_STATE_OPERATING: u32 = 7; +pub const KVM_MP_STATE_LOAD: u32 = 8; +pub const KVM_MP_STATE_AP_RESET_HOLD: u32 = 9; +pub const KVM_MP_STATE_SUSPENDED: u32 = 10; +pub const KVM_S390_SIGP_STOP: u32 = 4294836224; +pub const KVM_S390_PROGRAM_INT: u32 = 4294836225; +pub const KVM_S390_SIGP_SET_PREFIX: u32 = 4294836226; +pub const KVM_S390_RESTART: u32 = 4294836227; +pub const KVM_S390_INT_PFAULT_INIT: u32 = 4294836228; +pub const KVM_S390_INT_PFAULT_DONE: u32 = 4294836229; +pub const KVM_S390_MCHK: u32 = 4294840320; +pub const KVM_S390_INT_CLOCK_COMP: u32 = 4294905860; +pub const KVM_S390_INT_CPU_TIMER: u32 = 4294905861; +pub const KVM_S390_INT_VIRTIO: u32 = 4294911491; +pub const KVM_S390_INT_SERVICE: u32 = 4294910977; +pub const KVM_S390_INT_EMERGENCY: u32 = 4294906369; +pub const KVM_S390_INT_EXTERNAL_CALL: u32 = 4294906370; +pub const KVM_S390_INT_IO_MIN: u32 = 0; +pub const KVM_S390_INT_IO_MAX: u32 = 4294836223; +pub const KVM_S390_INT_IO_AI_MASK: u32 = 67108864; +pub const KVM_S390_PGM_FLAGS_ILC_VALID: u32 = 1; +pub const KVM_S390_PGM_FLAGS_ILC_0: u32 = 2; +pub const KVM_S390_PGM_FLAGS_ILC_1: u32 = 4; +pub const KVM_S390_PGM_FLAGS_ILC_MASK: u32 = 6; +pub const KVM_S390_PGM_FLAGS_NO_REWIND: u32 = 8; +pub const KVM_S390_STOP_FLAG_STORE_STATUS: u32 = 1; +pub const KVM_GUESTDBG_ENABLE: u32 = 1; +pub const KVM_GUESTDBG_SINGLESTEP: u32 = 2; +pub const KVM_X86_DISABLE_EXITS_MWAIT: u32 = 1; +pub const KVM_X86_DISABLE_EXITS_HLT: u32 = 2; +pub const KVM_X86_DISABLE_EXITS_PAUSE: u32 = 4; +pub const KVM_X86_DISABLE_EXITS_CSTATE: u32 = 8; +pub const KVM_X86_DISABLE_VALID_EXITS: u32 = 15; +pub const KVM_PPC_PVINFO_FLAGS_EV_IDLE: u32 = 1; +pub const KVM_PPC_PAGE_SIZES_MAX_SZ: u32 = 8; +pub const KVM_PPC_PAGE_SIZES_REAL: u32 = 1; +pub const KVM_PPC_1T_SEGMENTS: u32 = 2; +pub const KVM_PPC_NO_HASH: u32 = 4; +pub const KVMIO: u32 = 174; +pub const KVM_VM_S390_UCONTROL: u32 = 1; +pub const KVM_VM_PPC_HV: u32 = 1; +pub const KVM_VM_PPC_PR: u32 = 2; +pub const KVM_VM_MIPS_AUTO: u32 = 0; +pub const KVM_VM_MIPS_VZ: u32 = 1; +pub const KVM_VM_MIPS_TE: u32 = 2; +pub const KVM_S390_SIE_PAGE_OFFSET: u32 = 1; +pub const KVM_VM_TYPE_ARM_IPA_SIZE_MASK: u32 = 255; +pub const KVM_CAP_IRQCHIP: u32 = 0; +pub const KVM_CAP_HLT: u32 = 1; +pub const KVM_CAP_MMU_SHADOW_CACHE_CONTROL: u32 = 2; +pub const KVM_CAP_USER_MEMORY: u32 = 3; +pub const KVM_CAP_SET_TSS_ADDR: u32 = 4; +pub const KVM_CAP_VAPIC: u32 = 6; +pub const KVM_CAP_EXT_CPUID: u32 = 7; +pub const KVM_CAP_CLOCKSOURCE: u32 = 8; +pub const KVM_CAP_NR_VCPUS: u32 = 9; +pub const KVM_CAP_NR_MEMSLOTS: u32 = 10; +pub const KVM_CAP_PIT: u32 = 11; +pub const KVM_CAP_NOP_IO_DELAY: u32 = 12; +pub const KVM_CAP_PV_MMU: u32 = 13; +pub const KVM_CAP_MP_STATE: u32 = 14; +pub const KVM_CAP_COALESCED_MMIO: u32 = 15; +pub const KVM_CAP_SYNC_MMU: u32 = 16; +pub const KVM_CAP_IOMMU: u32 = 18; +pub const KVM_CAP_DESTROY_MEMORY_REGION_WORKS: u32 = 21; +pub const KVM_CAP_USER_NMI: u32 = 22; +pub const KVM_CAP_IRQ_ROUTING: u32 = 25; +pub const KVM_CAP_IRQ_INJECT_STATUS: u32 = 26; +pub const KVM_CAP_ASSIGN_DEV_IRQ: u32 = 29; +pub const KVM_CAP_JOIN_MEMORY_REGIONS_WORKS: u32 = 30; +pub const KVM_CAP_IRQFD: u32 = 32; +pub const KVM_CAP_SET_BOOT_CPU_ID: u32 = 34; +pub const KVM_CAP_IOEVENTFD: u32 = 36; +pub const KVM_CAP_SET_IDENTITY_MAP_ADDR: u32 = 37; +pub const KVM_CAP_ADJUST_CLOCK: u32 = 39; +pub const KVM_CAP_INTERNAL_ERROR_DATA: u32 = 40; +pub const KVM_CAP_S390_PSW: u32 = 42; +pub const KVM_CAP_PPC_SEGSTATE: u32 = 43; +pub const KVM_CAP_HYPERV: u32 = 44; +pub const KVM_CAP_HYPERV_VAPIC: u32 = 45; +pub const KVM_CAP_HYPERV_SPIN: u32 = 46; +pub const KVM_CAP_PCI_SEGMENT: u32 = 47; +pub const KVM_CAP_PPC_PAIRED_SINGLES: u32 = 48; +pub const KVM_CAP_INTR_SHADOW: u32 = 49; +pub const KVM_CAP_X86_ROBUST_SINGLESTEP: u32 = 51; +pub const KVM_CAP_PPC_OSI: u32 = 52; +pub const KVM_CAP_PPC_UNSET_IRQ: u32 = 53; +pub const KVM_CAP_ENABLE_CAP: u32 = 54; +pub const KVM_CAP_PPC_GET_PVINFO: u32 = 57; +pub const KVM_CAP_PPC_IRQ_LEVEL: u32 = 58; +pub const KVM_CAP_ASYNC_PF: u32 = 59; +pub const KVM_CAP_TSC_CONTROL: u32 = 60; +pub const KVM_CAP_GET_TSC_KHZ: u32 = 61; +pub const KVM_CAP_PPC_BOOKE_SREGS: u32 = 62; +pub const KVM_CAP_SPAPR_TCE: u32 = 63; +pub const KVM_CAP_PPC_SMT: u32 = 64; +pub const KVM_CAP_PPC_RMA: u32 = 65; +pub const KVM_CAP_MAX_VCPUS: u32 = 66; +pub const KVM_CAP_PPC_HIOR: u32 = 67; +pub const KVM_CAP_PPC_PAPR: u32 = 68; +pub const KVM_CAP_SW_TLB: u32 = 69; +pub const KVM_CAP_ONE_REG: u32 = 70; +pub const KVM_CAP_S390_GMAP: u32 = 71; +pub const KVM_CAP_TSC_DEADLINE_TIMER: u32 = 72; +pub const KVM_CAP_S390_UCONTROL: u32 = 73; +pub const KVM_CAP_SYNC_REGS: u32 = 74; +pub const KVM_CAP_PCI_2_3: u32 = 75; +pub const KVM_CAP_KVMCLOCK_CTRL: u32 = 76; +pub const KVM_CAP_SIGNAL_MSI: u32 = 77; +pub const KVM_CAP_PPC_GET_SMMU_INFO: u32 = 78; +pub const KVM_CAP_S390_COW: u32 = 79; +pub const KVM_CAP_PPC_ALLOC_HTAB: u32 = 80; +pub const KVM_CAP_READONLY_MEM: u32 = 81; +pub const KVM_CAP_IRQFD_RESAMPLE: u32 = 82; +pub const KVM_CAP_PPC_BOOKE_WATCHDOG: u32 = 83; +pub const KVM_CAP_PPC_HTAB_FD: u32 = 84; +pub const KVM_CAP_S390_CSS_SUPPORT: u32 = 85; +pub const KVM_CAP_PPC_EPR: u32 = 86; +pub const KVM_CAP_ARM_PSCI: u32 = 87; +pub const KVM_CAP_ARM_SET_DEVICE_ADDR: u32 = 88; +pub const KVM_CAP_DEVICE_CTRL: u32 = 89; +pub const KVM_CAP_IRQ_MPIC: u32 = 90; +pub const KVM_CAP_PPC_RTAS: u32 = 91; +pub const KVM_CAP_IRQ_XICS: u32 = 92; +pub const KVM_CAP_ARM_EL1_32BIT: u32 = 93; +pub const KVM_CAP_SPAPR_MULTITCE: u32 = 94; +pub const KVM_CAP_EXT_EMUL_CPUID: u32 = 95; +pub const KVM_CAP_HYPERV_TIME: u32 = 96; +pub const KVM_CAP_IOAPIC_POLARITY_IGNORED: u32 = 97; +pub const KVM_CAP_ENABLE_CAP_VM: u32 = 98; +pub const KVM_CAP_S390_IRQCHIP: u32 = 99; +pub const KVM_CAP_IOEVENTFD_NO_LENGTH: u32 = 100; +pub const KVM_CAP_VM_ATTRIBUTES: u32 = 101; +pub const KVM_CAP_ARM_PSCI_0_2: u32 = 102; +pub const KVM_CAP_PPC_FIXUP_HCALL: u32 = 103; +pub const KVM_CAP_PPC_ENABLE_HCALL: u32 = 104; +pub const KVM_CAP_CHECK_EXTENSION_VM: u32 = 105; +pub const KVM_CAP_S390_USER_SIGP: u32 = 106; +pub const KVM_CAP_S390_VECTOR_REGISTERS: u32 = 107; +pub const KVM_CAP_S390_MEM_OP: u32 = 108; +pub const KVM_CAP_S390_USER_STSI: u32 = 109; +pub const KVM_CAP_S390_SKEYS: u32 = 110; +pub const KVM_CAP_MIPS_FPU: u32 = 111; +pub const KVM_CAP_MIPS_MSA: u32 = 112; +pub const KVM_CAP_S390_INJECT_IRQ: u32 = 113; +pub const KVM_CAP_S390_IRQ_STATE: u32 = 114; +pub const KVM_CAP_PPC_HWRNG: u32 = 115; +pub const KVM_CAP_DISABLE_QUIRKS: u32 = 116; +pub const KVM_CAP_X86_SMM: u32 = 117; +pub const KVM_CAP_MULTI_ADDRESS_SPACE: u32 = 118; +pub const KVM_CAP_GUEST_DEBUG_HW_BPS: u32 = 119; +pub const KVM_CAP_GUEST_DEBUG_HW_WPS: u32 = 120; +pub const KVM_CAP_SPLIT_IRQCHIP: u32 = 121; +pub const KVM_CAP_IOEVENTFD_ANY_LENGTH: u32 = 122; +pub const KVM_CAP_HYPERV_SYNIC: u32 = 123; +pub const KVM_CAP_S390_RI: u32 = 124; +pub const KVM_CAP_SPAPR_TCE_64: u32 = 125; +pub const KVM_CAP_ARM_PMU_V3: u32 = 126; +pub const KVM_CAP_VCPU_ATTRIBUTES: u32 = 127; +pub const KVM_CAP_MAX_VCPU_ID: u32 = 128; +pub const KVM_CAP_X2APIC_API: u32 = 129; +pub const KVM_CAP_S390_USER_INSTR0: u32 = 130; +pub const KVM_CAP_MSI_DEVID: u32 = 131; +pub const KVM_CAP_PPC_HTM: u32 = 132; +pub const KVM_CAP_SPAPR_RESIZE_HPT: u32 = 133; +pub const KVM_CAP_PPC_MMU_RADIX: u32 = 134; +pub const KVM_CAP_PPC_MMU_HASH_V3: u32 = 135; +pub const KVM_CAP_IMMEDIATE_EXIT: u32 = 136; +pub const KVM_CAP_MIPS_VZ: u32 = 137; +pub const KVM_CAP_MIPS_TE: u32 = 138; +pub const KVM_CAP_MIPS_64BIT: u32 = 139; +pub const KVM_CAP_S390_GS: u32 = 140; +pub const KVM_CAP_S390_AIS: u32 = 141; +pub const KVM_CAP_SPAPR_TCE_VFIO: u32 = 142; +pub const KVM_CAP_X86_DISABLE_EXITS: u32 = 143; +pub const KVM_CAP_ARM_USER_IRQ: u32 = 144; +pub const KVM_CAP_S390_CMMA_MIGRATION: u32 = 145; +pub const KVM_CAP_PPC_FWNMI: u32 = 146; +pub const KVM_CAP_PPC_SMT_POSSIBLE: u32 = 147; +pub const KVM_CAP_HYPERV_SYNIC2: u32 = 148; +pub const KVM_CAP_HYPERV_VP_INDEX: u32 = 149; +pub const KVM_CAP_S390_AIS_MIGRATION: u32 = 150; +pub const KVM_CAP_PPC_GET_CPU_CHAR: u32 = 151; +pub const KVM_CAP_S390_BPB: u32 = 152; +pub const KVM_CAP_GET_MSR_FEATURES: u32 = 153; +pub const KVM_CAP_HYPERV_EVENTFD: u32 = 154; +pub const KVM_CAP_HYPERV_TLBFLUSH: u32 = 155; +pub const KVM_CAP_S390_HPAGE_1M: u32 = 156; +pub const KVM_CAP_NESTED_STATE: u32 = 157; +pub const KVM_CAP_ARM_INJECT_SERROR_ESR: u32 = 158; +pub const KVM_CAP_MSR_PLATFORM_INFO: u32 = 159; +pub const KVM_CAP_PPC_NESTED_HV: u32 = 160; +pub const KVM_CAP_HYPERV_SEND_IPI: u32 = 161; +pub const KVM_CAP_COALESCED_PIO: u32 = 162; +pub const KVM_CAP_HYPERV_ENLIGHTENED_VMCS: u32 = 163; +pub const KVM_CAP_EXCEPTION_PAYLOAD: u32 = 164; +pub const KVM_CAP_ARM_VM_IPA_SIZE: u32 = 165; +pub const KVM_CAP_MANUAL_DIRTY_LOG_PROTECT: u32 = 166; +pub const KVM_CAP_HYPERV_CPUID: u32 = 167; +pub const KVM_CAP_MANUAL_DIRTY_LOG_PROTECT2: u32 = 168; +pub const KVM_CAP_PPC_IRQ_XIVE: u32 = 169; +pub const KVM_CAP_ARM_SVE: u32 = 170; +pub const KVM_CAP_ARM_PTRAUTH_ADDRESS: u32 = 171; +pub const KVM_CAP_ARM_PTRAUTH_GENERIC: u32 = 172; +pub const KVM_CAP_PMU_EVENT_FILTER: u32 = 173; +pub const KVM_CAP_ARM_IRQ_LINE_LAYOUT_2: u32 = 174; +pub const KVM_CAP_HYPERV_DIRECT_TLBFLUSH: u32 = 175; +pub const KVM_CAP_PPC_GUEST_DEBUG_SSTEP: u32 = 176; +pub const KVM_CAP_ARM_NISV_TO_USER: u32 = 177; +pub const KVM_CAP_ARM_INJECT_EXT_DABT: u32 = 178; +pub const KVM_CAP_S390_VCPU_RESETS: u32 = 179; +pub const KVM_CAP_S390_PROTECTED: u32 = 180; +pub const KVM_CAP_PPC_SECURE_GUEST: u32 = 181; +pub const KVM_CAP_HALT_POLL: u32 = 182; +pub const KVM_CAP_ASYNC_PF_INT: u32 = 183; +pub const KVM_CAP_LAST_CPU: u32 = 184; +pub const KVM_CAP_SMALLER_MAXPHYADDR: u32 = 185; +pub const KVM_CAP_S390_DIAG318: u32 = 186; +pub const KVM_CAP_STEAL_TIME: u32 = 187; +pub const KVM_CAP_X86_USER_SPACE_MSR: u32 = 188; +pub const KVM_CAP_X86_MSR_FILTER: u32 = 189; +pub const KVM_CAP_ENFORCE_PV_FEATURE_CPUID: u32 = 190; +pub const KVM_CAP_SYS_HYPERV_CPUID: u32 = 191; +pub const KVM_CAP_DIRTY_LOG_RING: u32 = 192; +pub const KVM_CAP_X86_BUS_LOCK_EXIT: u32 = 193; +pub const KVM_CAP_PPC_DAWR1: u32 = 194; +pub const KVM_CAP_SET_GUEST_DEBUG2: u32 = 195; +pub const KVM_CAP_SGX_ATTRIBUTE: u32 = 196; +pub const KVM_CAP_VM_COPY_ENC_CONTEXT_FROM: u32 = 197; +pub const KVM_CAP_PTP_KVM: u32 = 198; +pub const KVM_CAP_HYPERV_ENFORCE_CPUID: u32 = 199; +pub const KVM_CAP_SREGS2: u32 = 200; +pub const KVM_CAP_EXIT_HYPERCALL: u32 = 201; +pub const KVM_CAP_PPC_RPT_INVALIDATE: u32 = 202; +pub const KVM_CAP_BINARY_STATS_FD: u32 = 203; +pub const KVM_CAP_EXIT_ON_EMULATION_FAILURE: u32 = 204; +pub const KVM_CAP_ARM_MTE: u32 = 205; +pub const KVM_CAP_VM_MOVE_ENC_CONTEXT_FROM: u32 = 206; +pub const KVM_CAP_VM_GPA_BITS: u32 = 207; +pub const KVM_CAP_XSAVE2: u32 = 208; +pub const KVM_CAP_SYS_ATTRIBUTES: u32 = 209; +pub const KVM_CAP_PPC_AIL_MODE_3: u32 = 210; +pub const KVM_CAP_S390_MEM_OP_EXTENSION: u32 = 211; +pub const KVM_CAP_PMU_CAPABILITY: u32 = 212; +pub const KVM_CAP_DISABLE_QUIRKS2: u32 = 213; +pub const KVM_CAP_VM_TSC_CONTROL: u32 = 214; +pub const KVM_CAP_SYSTEM_EVENT_DATA: u32 = 215; +pub const KVM_CAP_ARM_SYSTEM_SUSPEND: u32 = 216; +pub const KVM_CAP_S390_PROTECTED_DUMP: u32 = 217; +pub const KVM_CAP_X86_TRIPLE_FAULT_EVENT: u32 = 218; +pub const KVM_CAP_X86_NOTIFY_VMEXIT: u32 = 219; +pub const KVM_CAP_VM_DISABLE_NX_HUGE_PAGES: u32 = 220; +pub const KVM_CAP_S390_ZPCI_OP: u32 = 221; +pub const KVM_CAP_S390_CPU_TOPOLOGY: u32 = 222; +pub const KVM_CAP_DIRTY_LOG_RING_ACQ_REL: u32 = 223; +pub const KVM_CAP_S390_PROTECTED_ASYNC_DISABLE: u32 = 224; +pub const KVM_CAP_DIRTY_LOG_RING_WITH_BITMAP: u32 = 225; +pub const KVM_CAP_PMU_EVENT_MASKED_EVENTS: u32 = 226; +pub const KVM_CAP_COUNTER_OFFSET: u32 = 227; +pub const KVM_CAP_ARM_EAGER_SPLIT_CHUNK_SIZE: u32 = 228; +pub const KVM_CAP_ARM_SUPPORTED_BLOCK_SIZES: u32 = 229; +pub const KVM_IRQ_ROUTING_IRQCHIP: u32 = 1; +pub const KVM_IRQ_ROUTING_MSI: u32 = 2; +pub const KVM_IRQ_ROUTING_S390_ADAPTER: u32 = 3; +pub const KVM_IRQ_ROUTING_HV_SINT: u32 = 4; +pub const KVM_IRQ_ROUTING_XEN_EVTCHN: u32 = 5; +pub const KVM_IRQFD_FLAG_DEASSIGN: u32 = 1; +pub const KVM_IRQFD_FLAG_RESAMPLE: u32 = 2; +pub const KVM_CLOCK_TSC_STABLE: u32 = 2; +pub const KVM_CLOCK_REALTIME: u32 = 4; +pub const KVM_CLOCK_HOST_TSC: u32 = 8; +pub const KVM_MMU_FSL_BOOKE_NOHV: u32 = 0; +pub const KVM_MMU_FSL_BOOKE_HV: u32 = 1; +pub const KVM_REG_ARCH_MASK: i64 = -72057594037927936; +pub const KVM_REG_GENERIC: u32 = 0; +pub const KVM_REG_PPC: u64 = 1152921504606846976; +pub const KVM_REG_X86: u64 = 2305843009213693952; +pub const KVM_REG_IA64: u64 = 3458764513820540928; +pub const KVM_REG_ARM: u64 = 4611686018427387904; +pub const KVM_REG_S390: u64 = 5764607523034234880; +pub const KVM_REG_ARM64: u64 = 6917529027641081856; +pub const KVM_REG_MIPS: u64 = 8070450532247928832; +pub const KVM_REG_RISCV: i64 = -9223372036854775808; +pub const KVM_REG_SIZE_SHIFT: u32 = 52; +pub const KVM_REG_SIZE_MASK: u64 = 67553994410557440; +pub const KVM_REG_SIZE_U8: u32 = 0; +pub const KVM_REG_SIZE_U16: u64 = 4503599627370496; +pub const KVM_REG_SIZE_U32: u64 = 9007199254740992; +pub const KVM_REG_SIZE_U64: u64 = 13510798882111488; +pub const KVM_REG_SIZE_U128: u64 = 18014398509481984; +pub const KVM_REG_SIZE_U256: u64 = 22517998136852480; +pub const KVM_REG_SIZE_U512: u64 = 27021597764222976; +pub const KVM_REG_SIZE_U1024: u64 = 31525197391593472; +pub const KVM_REG_SIZE_U2048: u64 = 36028797018963968; +pub const KVM_MSI_VALID_DEVID: u32 = 1; +pub const KVM_CREATE_DEVICE_TEST: u32 = 1; +pub const KVM_DEV_VFIO_GROUP: u32 = 1; +pub const KVM_DEV_VFIO_GROUP_ADD: u32 = 1; +pub const KVM_DEV_VFIO_GROUP_DEL: u32 = 2; +pub const KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: u32 = 3; +pub const KVM_S390_STORE_STATUS_NOADDR: i32 = -1; +pub const KVM_S390_STORE_STATUS_PREFIXED: i32 = -2; +pub const KVM_XEN_EVTCHN_DEASSIGN: u32 = 1; +pub const KVM_XEN_EVTCHN_UPDATE: u32 = 2; +pub const KVM_XEN_EVTCHN_RESET: u32 = 4; +pub const KVM_XEN_ATTR_TYPE_LONG_MODE: u32 = 0; +pub const KVM_XEN_ATTR_TYPE_SHARED_INFO: u32 = 1; +pub const KVM_XEN_ATTR_TYPE_UPCALL_VECTOR: u32 = 2; +pub const KVM_XEN_ATTR_TYPE_EVTCHN: u32 = 3; +pub const KVM_XEN_ATTR_TYPE_XEN_VERSION: u32 = 4; +pub const KVM_XEN_ATTR_TYPE_RUNSTATE_UPDATE_FLAG: u32 = 5; +pub const KVM_XEN_VCPU_ATTR_TYPE_VCPU_INFO: u32 = 0; +pub const KVM_XEN_VCPU_ATTR_TYPE_VCPU_TIME_INFO: u32 = 1; +pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADDR: u32 = 2; +pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_CURRENT: u32 = 3; +pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_DATA: u32 = 4; +pub const KVM_XEN_VCPU_ATTR_TYPE_RUNSTATE_ADJUST: u32 = 5; +pub const KVM_XEN_VCPU_ATTR_TYPE_VCPU_ID: u32 = 6; +pub const KVM_XEN_VCPU_ATTR_TYPE_TIMER: u32 = 7; +pub const KVM_XEN_VCPU_ATTR_TYPE_UPCALL_VECTOR: u32 = 8; +pub const KVM_DEV_ASSIGN_ENABLE_IOMMU: u32 = 1; +pub const KVM_DEV_ASSIGN_PCI_2_3: u32 = 2; +pub const KVM_DEV_ASSIGN_MASK_INTX: u32 = 4; +pub const KVM_DEV_IRQ_HOST_INTX: u32 = 1; +pub const KVM_DEV_IRQ_HOST_MSI: u32 = 2; +pub const KVM_DEV_IRQ_HOST_MSIX: u32 = 4; +pub const KVM_DEV_IRQ_GUEST_INTX: u32 = 256; +pub const KVM_DEV_IRQ_GUEST_MSI: u32 = 512; +pub const KVM_DEV_IRQ_GUEST_MSIX: u32 = 1024; +pub const KVM_DEV_IRQ_HOST_MASK: u32 = 255; +pub const KVM_DEV_IRQ_GUEST_MASK: u32 = 65280; +pub const KVM_MAX_MSIX_PER_DEV: u32 = 256; +pub const KVM_X2APIC_API_USE_32BIT_IDS: u32 = 1; +pub const KVM_X2APIC_API_DISABLE_BROADCAST_QUIRK: u32 = 2; +pub const KVM_ARM_DEV_EL1_VTIMER: u32 = 1; +pub const KVM_ARM_DEV_EL1_PTIMER: u32 = 2; +pub const KVM_ARM_DEV_PMU: u32 = 4; +pub const KVM_HYPERV_CONN_ID_MASK: u32 = 16777215; +pub const KVM_HYPERV_EVENTFD_DEASSIGN: u32 = 1; +pub const KVM_DIRTY_LOG_MANUAL_PROTECT_ENABLE: u32 = 1; +pub const KVM_DIRTY_LOG_INITIALLY_SET: u32 = 2; +pub const KVM_DIRTY_LOG_PAGE_OFFSET: u32 = 0; +pub const KVM_DIRTY_GFN_F_MASK: u32 = 3; +pub const KVM_BUS_LOCK_DETECTION_OFF: u32 = 1; +pub const KVM_BUS_LOCK_DETECTION_EXIT: u32 = 2; +pub const KVM_PMU_CAP_DISABLE: u32 = 1; +pub const KVM_STATS_TYPE_SHIFT: u32 = 0; +pub const KVM_STATS_TYPE_MASK: u32 = 15; +pub const KVM_STATS_TYPE_CUMULATIVE: u32 = 0; +pub const KVM_STATS_TYPE_INSTANT: u32 = 1; +pub const KVM_STATS_TYPE_PEAK: u32 = 2; +pub const KVM_STATS_TYPE_LINEAR_HIST: u32 = 3; +pub const KVM_STATS_TYPE_LOG_HIST: u32 = 4; +pub const KVM_STATS_TYPE_MAX: u32 = 4; +pub const KVM_STATS_UNIT_SHIFT: u32 = 4; +pub const KVM_STATS_UNIT_MASK: u32 = 240; +pub const KVM_STATS_UNIT_NONE: u32 = 0; +pub const KVM_STATS_UNIT_BYTES: u32 = 16; +pub const KVM_STATS_UNIT_SECONDS: u32 = 32; +pub const KVM_STATS_UNIT_CYCLES: u32 = 48; +pub const KVM_STATS_UNIT_BOOLEAN: u32 = 64; +pub const KVM_STATS_UNIT_MAX: u32 = 64; +pub const KVM_STATS_BASE_SHIFT: u32 = 8; +pub const KVM_STATS_BASE_MASK: u32 = 3840; +pub const KVM_STATS_BASE_POW10: u32 = 0; +pub const KVM_STATS_BASE_POW2: u32 = 256; +pub const KVM_STATS_BASE_MAX: u32 = 256; +pub const KVM_X86_NOTIFY_VMEXIT_ENABLED: u32 = 1; +pub const KVM_X86_NOTIFY_VMEXIT_USER: u32 = 2; +pub const KVM_S390_ZPCIOP_REG_AEN: u32 = 0; +pub const KVM_S390_ZPCIOP_DEREG_AEN: u32 = 1; +pub const KVM_S390_ZPCIOP_REGAEN_HOST: u32 = 1; +pub type __s8 = ::std::os::raw::c_schar; +pub type __u8 = ::std::os::raw::c_uchar; +pub type __s16 = ::std::os::raw::c_short; +pub type __u16 = ::std::os::raw::c_ushort; +pub type __s32 = ::std::os::raw::c_int; +pub type __u32 = ::std::os::raw::c_uint; +pub type __s64 = ::std::os::raw::c_longlong; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __kernel_fd_set { + pub fds_bits: [::std::os::raw::c_ulong; 16usize], +} +#[test] +fn bindgen_test_layout___kernel_fd_set() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__kernel_fd_set>(), + 128usize, + concat!("Size of: ", stringify!(__kernel_fd_set)) + ); + assert_eq!( + ::std::mem::align_of::<__kernel_fd_set>(), + 8usize, + concat!("Alignment of ", stringify!(__kernel_fd_set)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_fd_set), + "::", + stringify!(fds_bits) + ) + ); +} +pub type __kernel_sighandler_t = + ::std::option::Option; +pub type __kernel_key_t = ::std::os::raw::c_int; +pub type __kernel_mqd_t = ::std::os::raw::c_int; +pub type __kernel_long_t = ::std::os::raw::c_long; +pub type __kernel_ulong_t = ::std::os::raw::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = ::std::os::raw::c_uint; +pub type __kernel_pid_t = ::std::os::raw::c_int; +pub type __kernel_ipc_pid_t = ::std::os::raw::c_int; +pub type __kernel_uid_t = ::std::os::raw::c_uint; +pub type __kernel_gid_t = ::std::os::raw::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = ::std::os::raw::c_int; +pub type __kernel_uid32_t = ::std::os::raw::c_uint; +pub type __kernel_gid32_t = ::std::os::raw::c_uint; +pub type __kernel_old_uid_t = __kernel_uid_t; +pub type __kernel_old_gid_t = __kernel_gid_t; +pub type __kernel_old_dev_t = ::std::os::raw::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __kernel_fsid_t { + pub val: [::std::os::raw::c_int; 2usize], +} +#[test] +fn bindgen_test_layout___kernel_fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__kernel_fsid_t>(), + 8usize, + concat!("Size of: ", stringify!(__kernel_fsid_t)) + ); + assert_eq!( + ::std::mem::align_of::<__kernel_fsid_t>(), + 4usize, + concat!("Alignment of ", stringify!(__kernel_fsid_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_fsid_t), + "::", + stringify!(val) + ) + ); +} +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = ::std::os::raw::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = ::std::os::raw::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = ::std::os::raw::c_int; +pub type __kernel_clockid_t = ::std::os::raw::c_int; +pub type __kernel_caddr_t = *mut ::std::os::raw::c_char; +pub type __kernel_uid16_t = ::std::os::raw::c_ushort; +pub type __kernel_gid16_t = ::std::os::raw::c_ushort; +pub type __s128 = i128; +pub type __u128 = u128; +pub type __le16 = __u16; +pub type __be16 = __u16; +pub type __le32 = __u32; +pub type __be32 = __u32; +pub type __le64 = __u64; +pub type __be64 = __u64; +pub type __sum16 = __u16; +pub type __wsum = __u32; +pub type __poll_t = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct user_regs_struct { + pub pc: ::std::os::raw::c_ulong, + pub ra: ::std::os::raw::c_ulong, + pub sp: ::std::os::raw::c_ulong, + pub gp: ::std::os::raw::c_ulong, + pub tp: ::std::os::raw::c_ulong, + pub t0: ::std::os::raw::c_ulong, + pub t1: ::std::os::raw::c_ulong, + pub t2: ::std::os::raw::c_ulong, + pub s0: ::std::os::raw::c_ulong, + pub s1: ::std::os::raw::c_ulong, + pub a0: ::std::os::raw::c_ulong, + pub a1: ::std::os::raw::c_ulong, + pub a2: ::std::os::raw::c_ulong, + pub a3: ::std::os::raw::c_ulong, + pub a4: ::std::os::raw::c_ulong, + pub a5: ::std::os::raw::c_ulong, + pub a6: ::std::os::raw::c_ulong, + pub a7: ::std::os::raw::c_ulong, + pub s2: ::std::os::raw::c_ulong, + pub s3: ::std::os::raw::c_ulong, + pub s4: ::std::os::raw::c_ulong, + pub s5: ::std::os::raw::c_ulong, + pub s6: ::std::os::raw::c_ulong, + pub s7: ::std::os::raw::c_ulong, + pub s8: ::std::os::raw::c_ulong, + pub s9: ::std::os::raw::c_ulong, + pub s10: ::std::os::raw::c_ulong, + pub s11: ::std::os::raw::c_ulong, + pub t3: ::std::os::raw::c_ulong, + pub t4: ::std::os::raw::c_ulong, + pub t5: ::std::os::raw::c_ulong, + pub t6: ::std::os::raw::c_ulong, +} +#[test] +fn bindgen_test_layout_user_regs_struct() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(user_regs_struct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(user_regs_struct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pc) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(pc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ra) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(ra) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sp) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(sp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gp) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(gp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tp) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(tp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t0) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t1) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t2) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s0) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s1) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a0) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a1) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a2) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a3) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a4) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a5) as usize - ptr as usize }, + 120usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a6) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a6) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a7) as usize - ptr as usize }, + 136usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(a7) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s2) as usize - ptr as usize }, + 144usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s3) as usize - ptr as usize }, + 152usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s4) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s5) as usize - ptr as usize }, + 168usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s6) as usize - ptr as usize }, + 176usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s6) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s7) as usize - ptr as usize }, + 184usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s7) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s8) as usize - ptr as usize }, + 192usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s9) as usize - ptr as usize }, + 200usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s9) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s10) as usize - ptr as usize }, + 208usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s10) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s11) as usize - ptr as usize }, + 216usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(s11) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t3) as usize - ptr as usize }, + 224usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t4) as usize - ptr as usize }, + 232usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t5) as usize - ptr as usize }, + 240usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).t6) as usize - ptr as usize }, + 248usize, + concat!( + "Offset of field: ", + stringify!(user_regs_struct), + "::", + stringify!(t6) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __riscv_f_ext_state { + pub f: [__u32; 32usize], + pub fcsr: __u32, +} +#[test] +fn bindgen_test_layout___riscv_f_ext_state() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_f_ext_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_f_ext_state>(), + 132usize, + concat!("Size of: ", stringify!(__riscv_f_ext_state)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_f_ext_state>(), + 4usize, + concat!("Alignment of ", stringify!(__riscv_f_ext_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_f_ext_state), + "::", + stringify!(f) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fcsr) as usize - ptr as usize }, + 128usize, + concat!( + "Offset of field: ", + stringify!(__riscv_f_ext_state), + "::", + stringify!(fcsr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __riscv_d_ext_state { + pub f: [__u64; 32usize], + pub fcsr: __u32, +} +#[test] +fn bindgen_test_layout___riscv_d_ext_state() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_d_ext_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_d_ext_state>(), + 264usize, + concat!("Size of: ", stringify!(__riscv_d_ext_state)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_d_ext_state>(), + 8usize, + concat!("Alignment of ", stringify!(__riscv_d_ext_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_d_ext_state), + "::", + stringify!(f) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fcsr) as usize - ptr as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(__riscv_d_ext_state), + "::", + stringify!(fcsr) + ) + ); +} +#[repr(C)] +#[repr(align(16))] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct __riscv_q_ext_state { + pub f: [__u64; 64usize], + pub fcsr: __u32, + pub reserved: [__u32; 3usize], +} +#[test] +fn bindgen_test_layout___riscv_q_ext_state() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_q_ext_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_q_ext_state>(), + 528usize, + concat!("Size of: ", stringify!(__riscv_q_ext_state)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_q_ext_state>(), + 16usize, + concat!("Alignment of ", stringify!(__riscv_q_ext_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_q_ext_state), + "::", + stringify!(f) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fcsr) as usize - ptr as usize }, + 512usize, + concat!( + "Offset of field: ", + stringify!(__riscv_q_ext_state), + "::", + stringify!(fcsr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 516usize, + concat!( + "Offset of field: ", + stringify!(__riscv_q_ext_state), + "::", + stringify!(reserved) + ) + ); +} +impl Default for __riscv_q_ext_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __riscv_ctx_hdr { + pub magic: __u32, + pub size: __u32, +} +#[test] +fn bindgen_test_layout___riscv_ctx_hdr() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_ctx_hdr> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_ctx_hdr>(), + 8usize, + concat!("Size of: ", stringify!(__riscv_ctx_hdr)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_ctx_hdr>(), + 4usize, + concat!("Alignment of ", stringify!(__riscv_ctx_hdr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_ctx_hdr), + "::", + stringify!(magic) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(__riscv_ctx_hdr), + "::", + stringify!(size) + ) + ); +} +#[repr(C)] +#[repr(align(16))] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct __riscv_extra_ext_header { + pub __padding: [__u32; 129usize], + pub reserved: __u32, + pub hdr: __riscv_ctx_hdr, +} +#[test] +fn bindgen_test_layout___riscv_extra_ext_header() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_extra_ext_header> = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_extra_ext_header>(), + 528usize, + concat!("Size of: ", stringify!(__riscv_extra_ext_header)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_extra_ext_header>(), + 16usize, + concat!("Alignment of ", stringify!(__riscv_extra_ext_header)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).__padding) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_extra_ext_header), + "::", + stringify!(__padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 516usize, + concat!( + "Offset of field: ", + stringify!(__riscv_extra_ext_header), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr) as usize - ptr as usize }, + 520usize, + concat!( + "Offset of field: ", + stringify!(__riscv_extra_ext_header), + "::", + stringify!(hdr) + ) + ); +} +impl Default for __riscv_extra_ext_header { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[repr(align(16))] +#[derive(Copy, Clone)] +pub union __riscv_fp_state { + pub f: __riscv_f_ext_state, + pub d: __riscv_d_ext_state, + pub q: __riscv_q_ext_state, +} +#[test] +fn bindgen_test_layout___riscv_fp_state() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_fp_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_fp_state>(), + 528usize, + concat!("Size of: ", stringify!(__riscv_fp_state)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_fp_state>(), + 16usize, + concat!("Alignment of ", stringify!(__riscv_fp_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).f) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_fp_state), + "::", + stringify!(f) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_fp_state), + "::", + stringify!(d) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_fp_state), + "::", + stringify!(q) + ) + ); +} +impl Default for __riscv_fp_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for __riscv_fp_state { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "__riscv_fp_state {{ union }}") + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct __riscv_v_ext_state { + pub vstart: ::std::os::raw::c_ulong, + pub vl: ::std::os::raw::c_ulong, + pub vtype: ::std::os::raw::c_ulong, + pub vcsr: ::std::os::raw::c_ulong, + pub vlenb: ::std::os::raw::c_ulong, + pub datap: *mut ::std::os::raw::c_void, +} +#[test] +fn bindgen_test_layout___riscv_v_ext_state() { + const UNINIT: ::std::mem::MaybeUninit<__riscv_v_ext_state> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__riscv_v_ext_state>(), + 48usize, + concat!("Size of: ", stringify!(__riscv_v_ext_state)) + ); + assert_eq!( + ::std::mem::align_of::<__riscv_v_ext_state>(), + 8usize, + concat!("Alignment of ", stringify!(__riscv_v_ext_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vstart) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__riscv_v_ext_state), + "::", + stringify!(vstart) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vl) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(__riscv_v_ext_state), + "::", + stringify!(vl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtype) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(__riscv_v_ext_state), + "::", + stringify!(vtype) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vcsr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(__riscv_v_ext_state), + "::", + stringify!(vcsr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vlenb) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(__riscv_v_ext_state), + "::", + stringify!(vlenb) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).datap) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(__riscv_v_ext_state), + "::", + stringify!(datap) + ) + ); +} +impl Default for __riscv_v_ext_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_regs {} +#[test] +fn bindgen_test_layout_kvm_regs() { + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_regs)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_regs)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_fpu {} +#[test] +fn bindgen_test_layout_kvm_fpu() { + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_fpu)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_fpu)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_debug_exit_arch {} +#[test] +fn bindgen_test_layout_kvm_debug_exit_arch() { + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_debug_exit_arch)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_debug_exit_arch)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_guest_debug_arch {} +#[test] +fn bindgen_test_layout_kvm_guest_debug_arch() { + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_guest_debug_arch)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_guest_debug_arch)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sync_regs {} +#[test] +fn bindgen_test_layout_kvm_sync_regs() { + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_sync_regs)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_sync_regs)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sregs {} +#[test] +fn bindgen_test_layout_kvm_sregs() { + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_sregs)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_sregs)) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_riscv_config { + pub isa: ::std::os::raw::c_ulong, + pub zicbom_block_size: ::std::os::raw::c_ulong, + pub mvendorid: ::std::os::raw::c_ulong, + pub marchid: ::std::os::raw::c_ulong, + pub mimpid: ::std::os::raw::c_ulong, + pub zicboz_block_size: ::std::os::raw::c_ulong, +} +#[test] +fn bindgen_test_layout_kvm_riscv_config() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_riscv_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_riscv_config)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_config), + "::", + stringify!(isa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).zicbom_block_size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_config), + "::", + stringify!(zicbom_block_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mvendorid) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_config), + "::", + stringify!(mvendorid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).marchid) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_config), + "::", + stringify!(marchid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mimpid) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_config), + "::", + stringify!(mimpid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).zicboz_block_size) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_config), + "::", + stringify!(zicboz_block_size) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_riscv_core { + pub regs: user_regs_struct, + pub mode: ::std::os::raw::c_ulong, +} +#[test] +fn bindgen_test_layout_kvm_riscv_core() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 264usize, + concat!("Size of: ", stringify!(kvm_riscv_core)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_riscv_core)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_core), + "::", + stringify!(regs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, + 256usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_core), + "::", + stringify!(mode) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_riscv_csr { + pub sstatus: ::std::os::raw::c_ulong, + pub sie: ::std::os::raw::c_ulong, + pub stvec: ::std::os::raw::c_ulong, + pub sscratch: ::std::os::raw::c_ulong, + pub sepc: ::std::os::raw::c_ulong, + pub scause: ::std::os::raw::c_ulong, + pub stval: ::std::os::raw::c_ulong, + pub sip: ::std::os::raw::c_ulong, + pub satp: ::std::os::raw::c_ulong, + pub scounteren: ::std::os::raw::c_ulong, +} +#[test] +fn bindgen_test_layout_kvm_riscv_csr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 80usize, + concat!("Size of: ", stringify!(kvm_riscv_csr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_riscv_csr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sstatus) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(sstatus) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sie) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(sie) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stvec) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(stvec) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sscratch) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(sscratch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sepc) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(sepc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scause) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(scause) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stval) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(stval) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sip) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(sip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).satp) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(satp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scounteren) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_csr), + "::", + stringify!(scounteren) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_riscv_aia_csr { + pub siselect: ::std::os::raw::c_ulong, + pub iprio1: ::std::os::raw::c_ulong, + pub iprio2: ::std::os::raw::c_ulong, + pub sieh: ::std::os::raw::c_ulong, + pub siph: ::std::os::raw::c_ulong, + pub iprio1h: ::std::os::raw::c_ulong, + pub iprio2h: ::std::os::raw::c_ulong, +} +#[test] +fn bindgen_test_layout_kvm_riscv_aia_csr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(kvm_riscv_aia_csr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_riscv_aia_csr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).siselect) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(siselect) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).iprio1) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(iprio1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).iprio2) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(iprio2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sieh) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(sieh) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).siph) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(siph) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).iprio1h) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(iprio1h) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).iprio2h) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_aia_csr), + "::", + stringify!(iprio2h) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_riscv_timer { + pub frequency: __u64, + pub time: __u64, + pub compare: __u64, + pub state: __u64, +} +#[test] +fn bindgen_test_layout_kvm_riscv_timer() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_riscv_timer)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_riscv_timer)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).frequency) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_timer), + "::", + stringify!(frequency) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_timer), + "::", + stringify!(time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).compare) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_timer), + "::", + stringify!(compare) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_riscv_timer), + "::", + stringify!(state) + ) + ); +} +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_A: KVM_RISCV_ISA_EXT_ID = 0; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_C: KVM_RISCV_ISA_EXT_ID = 1; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_D: KVM_RISCV_ISA_EXT_ID = 2; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_F: KVM_RISCV_ISA_EXT_ID = 3; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_H: KVM_RISCV_ISA_EXT_ID = 4; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_I: KVM_RISCV_ISA_EXT_ID = 5; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_M: KVM_RISCV_ISA_EXT_ID = 6; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_SVPBMT: KVM_RISCV_ISA_EXT_ID = 7; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_SSTC: KVM_RISCV_ISA_EXT_ID = 8; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_SVINVAL: KVM_RISCV_ISA_EXT_ID = 9; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_ZIHINTPAUSE: KVM_RISCV_ISA_EXT_ID = 10; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_ZICBOM: KVM_RISCV_ISA_EXT_ID = 11; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_ZICBOZ: KVM_RISCV_ISA_EXT_ID = 12; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_ZBB: KVM_RISCV_ISA_EXT_ID = 13; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_SSAIA: KVM_RISCV_ISA_EXT_ID = 14; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_V: KVM_RISCV_ISA_EXT_ID = 15; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_SVNAPOT: KVM_RISCV_ISA_EXT_ID = 16; +pub const KVM_RISCV_ISA_EXT_ID_KVM_RISCV_ISA_EXT_MAX: KVM_RISCV_ISA_EXT_ID = 17; +pub type KVM_RISCV_ISA_EXT_ID = ::std::os::raw::c_uint; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_V01: KVM_RISCV_SBI_EXT_ID = 0; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_TIME: KVM_RISCV_SBI_EXT_ID = 1; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_IPI: KVM_RISCV_SBI_EXT_ID = 2; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_RFENCE: KVM_RISCV_SBI_EXT_ID = 3; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_SRST: KVM_RISCV_SBI_EXT_ID = 4; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_HSM: KVM_RISCV_SBI_EXT_ID = 5; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_PMU: KVM_RISCV_SBI_EXT_ID = 6; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_EXPERIMENTAL: KVM_RISCV_SBI_EXT_ID = 7; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_VENDOR: KVM_RISCV_SBI_EXT_ID = 8; +pub const KVM_RISCV_SBI_EXT_ID_KVM_RISCV_SBI_EXT_MAX: KVM_RISCV_SBI_EXT_ID = 9; +pub type KVM_RISCV_SBI_EXT_ID = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_user_trace_setup { + pub buf_size: __u32, + pub buf_nr: __u32, +} +#[test] +fn bindgen_test_layout_kvm_user_trace_setup() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_user_trace_setup)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_user_trace_setup)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buf_size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_user_trace_setup), + "::", + stringify!(buf_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buf_nr) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_user_trace_setup), + "::", + stringify!(buf_nr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_breakpoint { + pub enabled: __u32, + pub padding: __u32, + pub address: __u64, +} +#[test] +fn bindgen_test_layout_kvm_breakpoint() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_breakpoint)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_breakpoint)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).enabled) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_breakpoint), + "::", + stringify!(enabled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_breakpoint), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_breakpoint), + "::", + stringify!(address) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_debug_guest { + pub enabled: __u32, + pub pad: __u32, + pub breakpoints: [kvm_breakpoint; 4usize], + pub singlestep: __u32, +} +#[test] +fn bindgen_test_layout_kvm_debug_guest() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 80usize, + concat!("Size of: ", stringify!(kvm_debug_guest)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_debug_guest)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).enabled) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_debug_guest), + "::", + stringify!(enabled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_debug_guest), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).breakpoints) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_debug_guest), + "::", + stringify!(breakpoints) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).singlestep) as usize - ptr as usize }, + 72usize, + concat!( + "Offset of field: ", + stringify!(kvm_debug_guest), + "::", + stringify!(singlestep) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_userspace_memory_region { + pub slot: __u32, + pub flags: __u32, + pub guest_phys_addr: __u64, + pub memory_size: __u64, + pub userspace_addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_userspace_memory_region() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_userspace_memory_region)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_userspace_memory_region)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slot) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_userspace_memory_region), + "::", + stringify!(slot) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_userspace_memory_region), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_phys_addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_userspace_memory_region), + "::", + stringify!(guest_phys_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).memory_size) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_userspace_memory_region), + "::", + stringify!(memory_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userspace_addr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_userspace_memory_region), + "::", + stringify!(userspace_addr) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_irq_level { + pub __bindgen_anon_1: kvm_irq_level__bindgen_ty_1, + pub level: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_irq_level__bindgen_ty_1 { + pub irq: __u32, + pub status: __s32, +} +#[test] +fn bindgen_test_layout_kvm_irq_level__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_irq_level__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irq_level__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).irq) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_level__bindgen_ty_1), + "::", + stringify!(irq) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_level__bindgen_ty_1), + "::", + stringify!(status) + ) + ); +} +impl Default for kvm_irq_level__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_level__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_irq_level__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_irq_level() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_irq_level)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irq_level)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).level) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_level), + "::", + stringify!(level) + ) + ); +} +impl Default for kvm_irq_level { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_level { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_irq_level {{ __bindgen_anon_1: {:?}, level: {:?} }}", + self.__bindgen_anon_1, self.level + ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_irqchip { + pub chip_id: __u32, + pub pad: __u32, + pub chip: kvm_irqchip__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_irqchip__bindgen_ty_1 { + pub dummy: [::std::os::raw::c_char; 512usize], +} +#[test] +fn bindgen_test_layout_kvm_irqchip__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 512usize, + concat!("Size of: ", stringify!(kvm_irqchip__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_irqchip__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dummy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqchip__bindgen_ty_1), + "::", + stringify!(dummy) + ) + ); +} +impl Default for kvm_irqchip__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irqchip__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_irqchip__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_irqchip() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 520usize, + concat!("Size of: ", stringify!(kvm_irqchip)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irqchip)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chip_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqchip), + "::", + stringify!(chip_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqchip), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).chip) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqchip), + "::", + stringify!(chip) + ) + ); +} +impl Default for kvm_irqchip { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irqchip { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_irqchip {{ chip_id: {:?}, pad: {:?}, chip: {:?} }}", + self.chip_id, self.pad, self.chip + ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_pit_config { + pub flags: __u32, + pub pad: [__u32; 15usize], +} +#[test] +fn bindgen_test_layout_kvm_pit_config() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_pit_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_pit_config)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_pit_config), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_pit_config), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_skeys { + pub start_gfn: __u64, + pub count: __u64, + pub skeydata_addr: __u64, + pub flags: __u32, + pub reserved: [__u32; 9usize], +} +#[test] +fn bindgen_test_layout_kvm_s390_skeys() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_skeys)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_skeys)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).start_gfn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_skeys), + "::", + stringify!(start_gfn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_skeys), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).skeydata_addr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_skeys), + "::", + stringify!(skeydata_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_skeys), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_skeys), + "::", + stringify!(reserved) + ) + ); +} +#[doc = " kvm_s390_cmma_log - Used for CMMA migration.\n\n Used both for input and output.\n\n @start_gfn: Guest page number to start from.\n @count: Size of the result buffer.\n @flags: Control operation mode via KVM_S390_CMMA_* flags\n @remaining: Used with KVM_S390_GET_CMMA_BITS. Indicates how many dirty\n pages are still remaining.\n @mask: Used with KVM_S390_SET_CMMA_BITS. Bitmap of bits to actually set\n in the PGSTE.\n @values: Pointer to the values buffer.\n\n Used in KVM_S390_{G,S}ET_CMMA_BITS ioctls."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_s390_cmma_log { + pub start_gfn: __u64, + pub count: __u32, + pub flags: __u32, + pub __bindgen_anon_1: kvm_s390_cmma_log__bindgen_ty_1, + pub values: __u64, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_s390_cmma_log__bindgen_ty_1 { + pub remaining: __u64, + pub mask: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_cmma_log__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_s390_cmma_log__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_cmma_log__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).remaining) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_cmma_log__bindgen_ty_1), + "::", + stringify!(remaining) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_cmma_log__bindgen_ty_1), + "::", + stringify!(mask) + ) + ); +} +impl Default for kvm_s390_cmma_log__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_cmma_log__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_s390_cmma_log__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_s390_cmma_log() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_s390_cmma_log)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_cmma_log)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).start_gfn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_cmma_log), + "::", + stringify!(start_gfn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_cmma_log), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_cmma_log), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).values) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_cmma_log), + "::", + stringify!(values) + ) + ); +} +impl Default for kvm_s390_cmma_log { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_cmma_log { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_s390_cmma_log {{ start_gfn: {:?}, count: {:?}, flags: {:?}, __bindgen_anon_1: {:?}, values: {:?} }}" , self . start_gfn , self . count , self . flags , self . __bindgen_anon_1 , self . values) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_hyperv_exit { + pub type_: __u32, + pub pad1: __u32, + pub u: kvm_hyperv_exit__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_hyperv_exit__bindgen_ty_1 { + pub synic: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1, + pub hcall: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2, + pub syndbg: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1 { + pub msr: __u32, + pub pad2: __u32, + pub control: __u64, + pub evt_page: __u64, + pub msg_page: __u64, +} +#[test] +fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).msr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(msr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(pad2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).evt_page) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(evt_page) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).msg_page) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(msg_page) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2 { + pub input: __u64, + pub result: __u64, + pub params: [__u64; 2usize], +} +#[test] +fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).input) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(input) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(result) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(params) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3 { + pub msr: __u32, + pub pad2: __u32, + pub control: __u64, + pub status: __u64, + pub send_page: __u64, + pub recv_page: __u64, + pub pending_page: __u64, +} +#[test] +fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!( + "Size of: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).msr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(msr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad2) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(pad2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(status) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).send_page) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(send_page) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).recv_page) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(recv_page) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pending_page) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(pending_page) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_hyperv_exit__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_hyperv_exit__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_hyperv_exit__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).synic) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1), + "::", + stringify!(synic) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hcall) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1), + "::", + stringify!(hcall) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).syndbg) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit__bindgen_ty_1), + "::", + stringify!(syndbg) + ) + ); +} +impl Default for kvm_hyperv_exit__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_hyperv_exit__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_hyperv_exit__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_hyperv_exit() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(kvm_hyperv_exit)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_hyperv_exit)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit), + "::", + stringify!(pad1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_exit), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_hyperv_exit { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_hyperv_exit { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_hyperv_exit {{ type: {:?}, pad1: {:?}, u: {:?} }}", + self.type_, self.pad1, self.u + ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_xen_exit { + pub type_: __u32, + pub u: kvm_xen_exit__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_xen_exit__bindgen_ty_1 { + pub hcall: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_xen_exit__bindgen_ty_1__bindgen_ty_1 { + pub longmode: __u32, + pub cpl: __u32, + pub input: __u64, + pub result: __u64, + pub params: [__u64; 6usize], +} +#[test] +fn bindgen_test_layout_kvm_xen_exit__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!( + "Size of: ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).longmode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(longmode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpl) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(cpl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).input) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(input) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(result) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(params) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_xen_exit__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_xen_exit__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_xen_exit__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hcall) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit__bindgen_ty_1), + "::", + stringify!(hcall) + ) + ); +} +impl Default for kvm_xen_exit__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_exit__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_xen_exit__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_xen_exit() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 80usize, + concat!("Size of: ", stringify!(kvm_xen_exit)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_xen_exit)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_exit), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_xen_exit { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_exit { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_xen_exit {{ type: {:?}, u: {:?} }}", + self.type_, self.u + ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run { + pub request_interrupt_window: __u8, + pub immediate_exit: __u8, + pub padding1: [__u8; 6usize], + pub exit_reason: __u32, + pub ready_for_interrupt_injection: __u8, + pub if_flag: __u8, + pub flags: __u16, + pub cr8: __u64, + pub apic_base: __u64, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1, + pub kvm_valid_regs: __u64, + pub kvm_dirty_regs: __u64, + pub s: kvm_run__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1 { + pub hw: kvm_run__bindgen_ty_1__bindgen_ty_1, + pub fail_entry: kvm_run__bindgen_ty_1__bindgen_ty_2, + pub ex: kvm_run__bindgen_ty_1__bindgen_ty_3, + pub io: kvm_run__bindgen_ty_1__bindgen_ty_4, + pub debug: kvm_run__bindgen_ty_1__bindgen_ty_5, + pub mmio: kvm_run__bindgen_ty_1__bindgen_ty_6, + pub hypercall: kvm_run__bindgen_ty_1__bindgen_ty_7, + pub tpr_access: kvm_run__bindgen_ty_1__bindgen_ty_8, + pub s390_sieic: kvm_run__bindgen_ty_1__bindgen_ty_9, + pub s390_reset_flags: __u64, + pub s390_ucontrol: kvm_run__bindgen_ty_1__bindgen_ty_10, + pub dcr: kvm_run__bindgen_ty_1__bindgen_ty_11, + pub internal: kvm_run__bindgen_ty_1__bindgen_ty_12, + pub emulation_failure: kvm_run__bindgen_ty_1__bindgen_ty_13, + pub osi: kvm_run__bindgen_ty_1__bindgen_ty_14, + pub papr_hcall: kvm_run__bindgen_ty_1__bindgen_ty_15, + pub s390_tsch: kvm_run__bindgen_ty_1__bindgen_ty_16, + pub epr: kvm_run__bindgen_ty_1__bindgen_ty_17, + pub system_event: kvm_run__bindgen_ty_1__bindgen_ty_18, + pub s390_stsi: kvm_run__bindgen_ty_1__bindgen_ty_19, + pub eoi: kvm_run__bindgen_ty_1__bindgen_ty_20, + pub hyperv: kvm_hyperv_exit, + pub arm_nisv: kvm_run__bindgen_ty_1__bindgen_ty_21, + pub msr: kvm_run__bindgen_ty_1__bindgen_ty_22, + pub xen: kvm_xen_exit, + pub riscv_sbi: kvm_run__bindgen_ty_1__bindgen_ty_23, + pub riscv_csr: kvm_run__bindgen_ty_1__bindgen_ty_24, + pub notify: kvm_run__bindgen_ty_1__bindgen_ty_25, + pub padding: [::std::os::raw::c_char; 256usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_1 { + pub hardware_exit_reason: __u64, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hardware_exit_reason) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(hardware_exit_reason) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_2 { + pub hardware_entry_failure_reason: __u64, + pub cpu: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).hardware_entry_failure_reason) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(hardware_entry_failure_reason) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpu) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(cpu) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_3 { + pub exception: __u32, + pub error_code: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).exception) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(exception) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(error_code) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_4 { + pub direction: __u8, + pub size: __u8, + pub port: __u16, + pub count: __u32, + pub data_offset: __u64, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).direction) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(direction) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data_offset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(data_offset) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_5 { + pub arch: kvm_debug_exit_arch, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_5() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_5)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).arch) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_5), + "::", + stringify!(arch) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_6 { + pub phys_addr: __u64, + pub data: [__u8; 8usize], + pub len: __u32, + pub is_write: __u8, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_6() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phys_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6), + "::", + stringify!(phys_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).is_write) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_6), + "::", + stringify!(is_write) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_7 { + pub nr: __u64, + pub args: [__u64; 6usize], + pub ret: __u64, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1 { + pub longmode: __u32, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).longmode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1), + "::", + stringify!(longmode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1), + "::", + stringify!(flags) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_7__bindgen_ty_1 {{ union }}" + ) + } +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_7() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7), + "::", + stringify!(args) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ret) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_7), + "::", + stringify!(ret) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_7 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1__bindgen_ty_7 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_run__bindgen_ty_1__bindgen_ty_7 {{ nr: {:?}, args: {:?}, ret: {:?}, __bindgen_anon_1: {:?} }}" , self . nr , self . args , self . ret , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_8 { + pub rip: __u64, + pub is_write: __u32, + pub pad: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_8() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8), + "::", + stringify!(rip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).is_write) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8), + "::", + stringify!(is_write) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_8), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_9 { + pub icptcode: __u8, + pub ipa: __u16, + pub ipb: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_9() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).icptcode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9), + "::", + stringify!(icptcode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ipa) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9), + "::", + stringify!(ipa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ipb) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_9), + "::", + stringify!(ipb) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_10 { + pub trans_exc_code: __u64, + pub pgm_code: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_10() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_exc_code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10), + "::", + stringify!(trans_exc_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pgm_code) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_10), + "::", + stringify!(pgm_code) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_11 { + pub dcrn: __u32, + pub data: __u32, + pub is_write: __u8, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_11() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dcrn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11), + "::", + stringify!(dcrn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).is_write) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_11), + "::", + stringify!(is_write) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_12 { + pub suberror: __u32, + pub ndata: __u32, + pub data: [__u64; 16usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_12() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 136usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).suberror) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12), + "::", + stringify!(suberror) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ndata) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12), + "::", + stringify!(ndata) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_12), + "::", + stringify!(data) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_13 { + pub suberror: __u32, + pub ndata: __u32, + pub flags: __u64, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1 { + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1 { + pub insn_size: __u8, + pub insn_bytes: [__u8; 15usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).insn_size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(insn_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).insn_bytes) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(insn_bytes) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_13__bindgen_ty_1 {{ union }}" + ) + } +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_13() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).suberror) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13), + "::", + stringify!(suberror) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ndata) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13), + "::", + stringify!(ndata) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_13), + "::", + stringify!(flags) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_13 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1__bindgen_ty_13 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_run__bindgen_ty_1__bindgen_ty_13 {{ suberror: {:?}, ndata: {:?}, flags: {:?}, __bindgen_anon_1: {:?} }}" , self . suberror , self . ndata , self . flags , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_14 { + pub gprs: [__u64; 32usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_14() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gprs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_14), + "::", + stringify!(gprs) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_15 { + pub nr: __u64, + pub ret: __u64, + pub args: [__u64; 9usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_15() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 88usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ret) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15), + "::", + stringify!(ret) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_15), + "::", + stringify!(args) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_16 { + pub subchannel_id: __u16, + pub subchannel_nr: __u16, + pub io_int_parm: __u32, + pub io_int_word: __u32, + pub ipb: __u32, + pub dequeued: __u8, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_16() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 20usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subchannel_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16), + "::", + stringify!(subchannel_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subchannel_nr) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16), + "::", + stringify!(subchannel_nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).io_int_parm) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16), + "::", + stringify!(io_int_parm) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).io_int_word) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16), + "::", + stringify!(io_int_word) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ipb) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16), + "::", + stringify!(ipb) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dequeued) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_16), + "::", + stringify!(dequeued) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_17 { + pub epr: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_17() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).epr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_17), + "::", + stringify!(epr) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_18 { + pub type_: __u32, + pub ndata: __u32, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1 { + pub flags: __u64, + pub data: [__u64; 16usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 128usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1), + "::", + stringify!(data) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_18__bindgen_ty_1 {{ union }}" + ) + } +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_18() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 136usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ndata) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_18), + "::", + stringify!(ndata) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_18 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1__bindgen_ty_18 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_run__bindgen_ty_1__bindgen_ty_18 {{ type: {:?}, ndata: {:?}, __bindgen_anon_1: {:?} }}" , self . type_ , self . ndata , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_19 { + pub addr: __u64, + pub ar: __u8, + pub reserved: __u8, + pub fc: __u8, + pub sel1: __u8, + pub sel2: __u16, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_19() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ar) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19), + "::", + stringify!(ar) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fc) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19), + "::", + stringify!(fc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sel1) as usize - ptr as usize }, + 11usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19), + "::", + stringify!(sel1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sel2) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_19), + "::", + stringify!(sel2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_20 { + pub vector: __u8, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_20() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_20), + "::", + stringify!(vector) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_21 { + pub esr_iss: __u64, + pub fault_ipa: __u64, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_21() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).esr_iss) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21), + "::", + stringify!(esr_iss) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fault_ipa) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_21), + "::", + stringify!(fault_ipa) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_22 { + pub error: __u8, + pub pad: [__u8; 7usize], + pub reason: __u32, + pub index: __u32, + pub data: __u64, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_22() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22), + "::", + stringify!(error) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reason) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22), + "::", + stringify!(reason) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22), + "::", + stringify!(index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_22), + "::", + stringify!(data) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_23 { + pub extension_id: ::std::os::raw::c_ulong, + pub function_id: ::std::os::raw::c_ulong, + pub args: [::std::os::raw::c_ulong; 6usize], + pub ret: [::std::os::raw::c_ulong; 2usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_23() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 80usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_23) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_23) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extension_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_23), + "::", + stringify!(extension_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).function_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_23), + "::", + stringify!(function_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_23), + "::", + stringify!(args) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ret) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_23), + "::", + stringify!(ret) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_24 { + pub csr_num: ::std::os::raw::c_ulong, + pub new_value: ::std::os::raw::c_ulong, + pub write_mask: ::std::os::raw::c_ulong, + pub ret_value: ::std::os::raw::c_ulong, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_24() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_24) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_24) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).csr_num) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_24), + "::", + stringify!(csr_num) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).new_value) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_24), + "::", + stringify!(new_value) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).write_mask) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_24), + "::", + stringify!(write_mask) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ret_value) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_24), + "::", + stringify!(ret_value) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_25 { + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1__bindgen_ty_25() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_25) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_25) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1__bindgen_ty_25), + "::", + stringify!(flags) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_run__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hw) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(hw) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fail_entry) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(fail_entry) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ex) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(ex) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).io) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(io) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).debug) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(debug) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mmio) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(mmio) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hypercall) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(hypercall) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tpr_access) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(tpr_access) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s390_sieic) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(s390_sieic) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s390_reset_flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(s390_reset_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s390_ucontrol) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(s390_ucontrol) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dcr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(dcr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).internal) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(internal) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).emulation_failure) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(emulation_failure) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).osi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(osi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).papr_hcall) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(papr_hcall) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s390_tsch) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(s390_tsch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).epr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(epr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).system_event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(system_event) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s390_stsi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(s390_stsi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eoi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(eoi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hyperv) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(hyperv) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).arm_nisv) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(arm_nisv) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).msr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(msr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xen) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(xen) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).riscv_sbi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(riscv_sbi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).riscv_csr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(riscv_csr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).notify) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(notify) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_1), + "::", + stringify!(padding) + ) + ); +} +impl Default for kvm_run__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_run__bindgen_ty_1 {{ union }}") + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_2 { + pub regs: kvm_sync_regs, + pub padding: [::std::os::raw::c_char; 2048usize], +} +#[test] +fn bindgen_test_layout_kvm_run__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2048usize, + concat!("Size of: ", stringify!(kvm_run__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(kvm_run__bindgen_ty_2)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_2), + "::", + stringify!(regs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run__bindgen_ty_2), + "::", + stringify!(padding) + ) + ); +} +impl Default for kvm_run__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run__bindgen_ty_2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_run__bindgen_ty_2 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_run() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2352usize, + concat!("Size of: ", stringify!(kvm_run)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_run)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).request_interrupt_window) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(request_interrupt_window) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).immediate_exit) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(immediate_exit) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding1) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(padding1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).exit_reason) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(exit_reason) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).ready_for_interrupt_injection) as usize - ptr as usize + }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(ready_for_interrupt_injection) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).if_flag) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(if_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cr8) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(cr8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).apic_base) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(apic_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kvm_valid_regs) as usize - ptr as usize }, + 288usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(kvm_valid_regs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).kvm_dirty_regs) as usize - ptr as usize }, + 296usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(kvm_dirty_regs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).s) as usize - ptr as usize }, + 304usize, + concat!( + "Offset of field: ", + stringify!(kvm_run), + "::", + stringify!(s) + ) + ); +} +impl Default for kvm_run { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_run { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_run {{ request_interrupt_window: {:?}, immediate_exit: {:?}, padding1: {:?}, exit_reason: {:?}, ready_for_interrupt_injection: {:?}, if_flag: {:?}, flags: {:?}, cr8: {:?}, apic_base: {:?}, __bindgen_anon_1: {:?}, kvm_valid_regs: {:?}, kvm_dirty_regs: {:?}, s: {:?} }}" , self . request_interrupt_window , self . immediate_exit , self . padding1 , self . exit_reason , self . ready_for_interrupt_injection , self . if_flag , self . flags , self . cr8 , self . apic_base , self . __bindgen_anon_1 , self . kvm_valid_regs , self . kvm_dirty_regs , self . s) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_coalesced_mmio_zone { + pub addr: __u64, + pub size: __u32, + pub __bindgen_anon_1: kvm_coalesced_mmio_zone__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_coalesced_mmio_zone__bindgen_ty_1 { + pub pad: __u32, + pub pio: __u32, +} +#[test] +fn bindgen_test_layout_kvm_coalesced_mmio_zone__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pio) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_zone__bindgen_ty_1), + "::", + stringify!(pio) + ) + ); +} +impl Default for kvm_coalesced_mmio_zone__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_coalesced_mmio_zone__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_coalesced_mmio_zone__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_coalesced_mmio_zone() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_coalesced_mmio_zone)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_coalesced_mmio_zone)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_zone), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_zone), + "::", + stringify!(size) + ) + ); +} +impl Default for kvm_coalesced_mmio_zone { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_coalesced_mmio_zone { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_coalesced_mmio_zone {{ addr: {:?}, size: {:?}, __bindgen_anon_1: {:?} }}", + self.addr, self.size, self.__bindgen_anon_1 + ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_coalesced_mmio { + pub phys_addr: __u64, + pub len: __u32, + pub __bindgen_anon_1: kvm_coalesced_mmio__bindgen_ty_1, + pub data: [__u8; 8usize], +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_coalesced_mmio__bindgen_ty_1 { + pub pad: __u32, + pub pio: __u32, +} +#[test] +fn bindgen_test_layout_kvm_coalesced_mmio__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_coalesced_mmio__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_coalesced_mmio__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pio) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio__bindgen_ty_1), + "::", + stringify!(pio) + ) + ); +} +impl Default for kvm_coalesced_mmio__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_coalesced_mmio__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_coalesced_mmio__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_coalesced_mmio() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_coalesced_mmio)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_coalesced_mmio)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).phys_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio), + "::", + stringify!(phys_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio), + "::", + stringify!(data) + ) + ); +} +impl Default for kvm_coalesced_mmio { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_coalesced_mmio { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_coalesced_mmio {{ phys_addr: {:?}, len: {:?}, __bindgen_anon_1: {:?}, data: {:?} }}" , self . phys_addr , self . len , self . __bindgen_anon_1 , self . data) + } +} +#[repr(C)] +pub struct kvm_coalesced_mmio_ring { + pub first: __u32, + pub last: __u32, + pub coalesced_mmio: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_kvm_coalesced_mmio_ring() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_coalesced_mmio_ring)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_coalesced_mmio_ring)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_ring), + "::", + stringify!(first) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_ring), + "::", + stringify!(last) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).coalesced_mmio) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_coalesced_mmio_ring), + "::", + stringify!(coalesced_mmio) + ) + ); +} +impl Default for kvm_coalesced_mmio_ring { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_coalesced_mmio_ring { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_coalesced_mmio_ring {{ first: {:?}, last: {:?}, coalesced_mmio: {:?} }}", + self.first, self.last, self.coalesced_mmio + ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_translation { + pub linear_address: __u64, + pub physical_address: __u64, + pub valid: __u8, + pub writeable: __u8, + pub usermode: __u8, + pub pad: [__u8; 5usize], +} +#[test] +fn bindgen_test_layout_kvm_translation() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_translation)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_translation)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).linear_address) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_translation), + "::", + stringify!(linear_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).physical_address) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_translation), + "::", + stringify!(physical_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).valid) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_translation), + "::", + stringify!(valid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).writeable) as usize - ptr as usize }, + 17usize, + concat!( + "Offset of field: ", + stringify!(kvm_translation), + "::", + stringify!(writeable) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).usermode) as usize - ptr as usize }, + 18usize, + concat!( + "Offset of field: ", + stringify!(kvm_translation), + "::", + stringify!(usermode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 19usize, + concat!( + "Offset of field: ", + stringify!(kvm_translation), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_s390_mem_op { + pub gaddr: __u64, + pub flags: __u64, + pub size: __u32, + pub op: __u32, + pub buf: __u64, + pub __bindgen_anon_1: kvm_s390_mem_op__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_s390_mem_op__bindgen_ty_1 { + pub __bindgen_anon_1: kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1, + pub sida_offset: __u32, + pub reserved: [__u8; 32usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1 { + pub ar: __u8, + pub key: __u8, + pub pad1: [__u8; 6usize], + pub old_addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ar) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(ar) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).key) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(key) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad1) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(pad1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).old_addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(old_addr) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_s390_mem_op__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_s390_mem_op__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_mem_op__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sida_offset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1), + "::", + stringify!(sida_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for kvm_s390_mem_op__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_mem_op__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_s390_mem_op__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_s390_mem_op() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_mem_op)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_mem_op)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op), + "::", + stringify!(gaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op), + "::", + stringify!(op) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mem_op), + "::", + stringify!(buf) + ) + ); +} +impl Default for kvm_s390_mem_op { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_mem_op { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_s390_mem_op {{ gaddr: {:?}, flags: {:?}, size: {:?}, op: {:?}, buf: {:?}, __bindgen_anon_1: {:?} }}" , self . gaddr , self . flags , self . size , self . op , self . buf , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_interrupt { + pub irq: __u32, +} +#[test] +fn bindgen_test_layout_kvm_interrupt() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_interrupt)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_interrupt)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).irq) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_interrupt), + "::", + stringify!(irq) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_dirty_log { + pub slot: __u32, + pub padding1: __u32, + pub __bindgen_anon_1: kvm_dirty_log__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_dirty_log__bindgen_ty_1 { + pub dirty_bitmap: *mut ::std::os::raw::c_void, + pub padding2: __u64, +} +#[test] +fn bindgen_test_layout_kvm_dirty_log__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_dirty_log__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_dirty_log__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dirty_bitmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_log__bindgen_ty_1), + "::", + stringify!(dirty_bitmap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_log__bindgen_ty_1), + "::", + stringify!(padding2) + ) + ); +} +impl Default for kvm_dirty_log__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_dirty_log__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_dirty_log__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_dirty_log() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_dirty_log)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_dirty_log)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slot) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_log), + "::", + stringify!(slot) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_log), + "::", + stringify!(padding1) + ) + ); +} +impl Default for kvm_dirty_log { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_dirty_log { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_dirty_log {{ slot: {:?}, padding1: {:?}, __bindgen_anon_1: {:?} }}", + self.slot, self.padding1, self.__bindgen_anon_1 + ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_clear_dirty_log { + pub slot: __u32, + pub num_pages: __u32, + pub first_page: __u64, + pub __bindgen_anon_1: kvm_clear_dirty_log__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_clear_dirty_log__bindgen_ty_1 { + pub dirty_bitmap: *mut ::std::os::raw::c_void, + pub padding2: __u64, +} +#[test] +fn bindgen_test_layout_kvm_clear_dirty_log__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_clear_dirty_log__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_clear_dirty_log__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dirty_bitmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_clear_dirty_log__bindgen_ty_1), + "::", + stringify!(dirty_bitmap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_clear_dirty_log__bindgen_ty_1), + "::", + stringify!(padding2) + ) + ); +} +impl Default for kvm_clear_dirty_log__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_clear_dirty_log__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_clear_dirty_log__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_clear_dirty_log() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_clear_dirty_log)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_clear_dirty_log)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slot) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_clear_dirty_log), + "::", + stringify!(slot) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_pages) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_clear_dirty_log), + "::", + stringify!(num_pages) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).first_page) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_clear_dirty_log), + "::", + stringify!(first_page) + ) + ); +} +impl Default for kvm_clear_dirty_log { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_clear_dirty_log { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_clear_dirty_log {{ slot: {:?}, num_pages: {:?}, first_page: {:?}, __bindgen_anon_1: {:?} }}" , self . slot , self . num_pages , self . first_page , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct kvm_signal_mask { + pub len: __u32, + pub sigset: __IncompleteArrayField<__u8>, +} +#[test] +fn bindgen_test_layout_kvm_signal_mask() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_signal_mask)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_signal_mask)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_signal_mask), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sigset) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_signal_mask), + "::", + stringify!(sigset) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_tpr_access_ctl { + pub enabled: __u32, + pub flags: __u32, + pub reserved: [__u32; 8usize], +} +#[test] +fn bindgen_test_layout_kvm_tpr_access_ctl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(kvm_tpr_access_ctl)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_tpr_access_ctl)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).enabled) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_tpr_access_ctl), + "::", + stringify!(enabled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_tpr_access_ctl), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_tpr_access_ctl), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_vapic_addr { + pub vapic_addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_vapic_addr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_vapic_addr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_vapic_addr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vapic_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_vapic_addr), + "::", + stringify!(vapic_addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_mp_state { + pub mp_state: __u32, +} +#[test] +fn bindgen_test_layout_kvm_mp_state() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_mp_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_mp_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mp_state) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_mp_state), + "::", + stringify!(mp_state) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_psw { + pub mask: __u64, + pub addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_psw() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_s390_psw)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_psw)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mask) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_psw), + "::", + stringify!(mask) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_psw), + "::", + stringify!(addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_interrupt { + pub type_: __u32, + pub parm: __u32, + pub parm64: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_interrupt() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_s390_interrupt)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_interrupt)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_interrupt), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).parm) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_interrupt), + "::", + stringify!(parm) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).parm64) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_interrupt), + "::", + stringify!(parm64) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_io_info { + pub subchannel_id: __u16, + pub subchannel_nr: __u16, + pub io_int_parm: __u32, + pub io_int_word: __u32, +} +#[test] +fn bindgen_test_layout_kvm_s390_io_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(kvm_s390_io_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_s390_io_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subchannel_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_io_info), + "::", + stringify!(subchannel_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subchannel_nr) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_io_info), + "::", + stringify!(subchannel_nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).io_int_parm) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_io_info), + "::", + stringify!(io_int_parm) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).io_int_word) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_io_info), + "::", + stringify!(io_int_word) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_ext_info { + pub ext_params: __u32, + pub pad: __u32, + pub ext_params2: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_ext_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_s390_ext_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_ext_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ext_params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_ext_info), + "::", + stringify!(ext_params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_ext_info), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ext_params2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_ext_info), + "::", + stringify!(ext_params2) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pgm_info { + pub trans_exc_code: __u64, + pub mon_code: __u64, + pub per_address: __u64, + pub data_exc_code: __u32, + pub code: __u16, + pub mon_class_nr: __u16, + pub per_code: __u8, + pub per_atmid: __u8, + pub exc_access_id: __u8, + pub per_access_id: __u8, + pub op_access_id: __u8, + pub flags: __u8, + pub pad: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_kvm_s390_pgm_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(kvm_s390_pgm_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pgm_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_exc_code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(trans_exc_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mon_code) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(mon_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).per_address) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(per_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data_exc_code) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(data_exc_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mon_class_nr) as usize - ptr as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(mon_class_nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).per_code) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(per_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).per_atmid) as usize - ptr as usize }, + 33usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(per_atmid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).exc_access_id) as usize - ptr as usize }, + 34usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(exc_access_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).per_access_id) as usize - ptr as usize }, + 35usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(per_access_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).op_access_id) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(op_access_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 37usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 38usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pgm_info), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_prefix_info { + pub address: __u32, +} +#[test] +fn bindgen_test_layout_kvm_s390_prefix_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_s390_prefix_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_s390_prefix_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_prefix_info), + "::", + stringify!(address) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_extcall_info { + pub code: __u16, +} +#[test] +fn bindgen_test_layout_kvm_s390_extcall_info() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(kvm_s390_extcall_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(kvm_s390_extcall_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_extcall_info), + "::", + stringify!(code) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_emerg_info { + pub code: __u16, +} +#[test] +fn bindgen_test_layout_kvm_s390_emerg_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(kvm_s390_emerg_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!("Alignment of ", stringify!(kvm_s390_emerg_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_emerg_info), + "::", + stringify!(code) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_stop_info { + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_kvm_s390_stop_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_s390_stop_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_s390_stop_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_stop_info), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_mchk_info { + pub cr14: __u64, + pub mcic: __u64, + pub failing_storage_address: __u64, + pub ext_damage_code: __u32, + pub pad: __u32, + pub fixed_logout: [__u8; 16usize], +} +#[test] +fn bindgen_test_layout_kvm_s390_mchk_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_s390_mchk_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_mchk_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cr14) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mchk_info), + "::", + stringify!(cr14) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mcic) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mchk_info), + "::", + stringify!(mcic) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).failing_storage_address) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mchk_info), + "::", + stringify!(failing_storage_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ext_damage_code) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mchk_info), + "::", + stringify!(ext_damage_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mchk_info), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fixed_logout) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_mchk_info), + "::", + stringify!(fixed_logout) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_s390_irq { + pub type_: __u64, + pub u: kvm_s390_irq__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_s390_irq__bindgen_ty_1 { + pub io: kvm_s390_io_info, + pub ext: kvm_s390_ext_info, + pub pgm: kvm_s390_pgm_info, + pub emerg: kvm_s390_emerg_info, + pub extcall: kvm_s390_extcall_info, + pub prefix: kvm_s390_prefix_info, + pub stop: kvm_s390_stop_info, + pub mchk: kvm_s390_mchk_info, + pub reserved: [::std::os::raw::c_char; 64usize], +} +#[test] +fn bindgen_test_layout_kvm_s390_irq__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_irq__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_irq__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).io) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(io) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ext) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(ext) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pgm) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(pgm) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).emerg) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(emerg) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).extcall) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(extcall) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).prefix) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(prefix) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).stop) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(stop) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mchk) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(mchk) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for kvm_s390_irq__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_irq__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_s390_irq__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_s390_irq() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_s390_irq)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_irq)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_s390_irq { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_irq { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_s390_irq {{ type: {:?}, u: {:?} }}", + self.type_, self.u + ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_irq_state { + pub buf: __u64, + pub flags: __u32, + pub len: __u32, + pub reserved: [__u32; 4usize], +} +#[test] +fn bindgen_test_layout_kvm_s390_irq_state() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_s390_irq_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_irq_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buf) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq_state), + "::", + stringify!(buf) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq_state), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq_state), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_irq_state), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_guest_debug { + pub control: __u32, + pub pad: __u32, + pub arch: kvm_guest_debug_arch, +} +#[test] +fn bindgen_test_layout_kvm_guest_debug() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_guest_debug)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_guest_debug)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_guest_debug), + "::", + stringify!(control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_guest_debug), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).arch) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_guest_debug), + "::", + stringify!(arch) + ) + ); +} +pub const kvm_ioeventfd_flag_nr_datamatch: _bindgen_ty_1 = 0; +pub const kvm_ioeventfd_flag_nr_pio: _bindgen_ty_1 = 1; +pub const kvm_ioeventfd_flag_nr_deassign: _bindgen_ty_1 = 2; +pub const kvm_ioeventfd_flag_nr_virtio_ccw_notify: _bindgen_ty_1 = 3; +pub const kvm_ioeventfd_flag_nr_fast_mmio: _bindgen_ty_1 = 4; +pub const kvm_ioeventfd_flag_nr_max: _bindgen_ty_1 = 5; +pub type _bindgen_ty_1 = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_ioeventfd { + pub datamatch: __u64, + pub addr: __u64, + pub len: __u32, + pub fd: __s32, + pub flags: __u32, + pub pad: [__u8; 36usize], +} +#[test] +fn bindgen_test_layout_kvm_ioeventfd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_ioeventfd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_ioeventfd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).datamatch) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_ioeventfd), + "::", + stringify!(datamatch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_ioeventfd), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_ioeventfd), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_ioeventfd), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_ioeventfd), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(kvm_ioeventfd), + "::", + stringify!(pad) + ) + ); +} +impl Default for kvm_ioeventfd { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_enable_cap { + pub cap: __u32, + pub flags: __u32, + pub args: [__u64; 4usize], + pub pad: [__u8; 64usize], +} +#[test] +fn bindgen_test_layout_kvm_enable_cap() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 104usize, + concat!("Size of: ", stringify!(kvm_enable_cap)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_enable_cap)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_enable_cap), + "::", + stringify!(cap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_enable_cap), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).args) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_enable_cap), + "::", + stringify!(args) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_enable_cap), + "::", + stringify!(pad) + ) + ); +} +impl Default for kvm_enable_cap { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_ppc_pvinfo { + pub flags: __u32, + pub hcall: [__u32; 4usize], + pub pad: [__u8; 108usize], +} +#[test] +fn bindgen_test_layout_kvm_ppc_pvinfo() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 128usize, + concat!("Size of: ", stringify!(kvm_ppc_pvinfo)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_ppc_pvinfo)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_pvinfo), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hcall) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_pvinfo), + "::", + stringify!(hcall) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_pvinfo), + "::", + stringify!(pad) + ) + ); +} +impl Default for kvm_ppc_pvinfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_ppc_one_page_size { + pub page_shift: __u32, + pub pte_enc: __u32, +} +#[test] +fn bindgen_test_layout_kvm_ppc_one_page_size() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_ppc_one_page_size)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_ppc_one_page_size)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_shift) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_one_page_size), + "::", + stringify!(page_shift) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pte_enc) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_one_page_size), + "::", + stringify!(pte_enc) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_ppc_one_seg_page_size { + pub page_shift: __u32, + pub slb_enc: __u32, + pub enc: [kvm_ppc_one_page_size; 8usize], +} +#[test] +fn bindgen_test_layout_kvm_ppc_one_seg_page_size() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_ppc_one_seg_page_size)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_ppc_one_seg_page_size)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_shift) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_one_seg_page_size), + "::", + stringify!(page_shift) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slb_enc) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_one_seg_page_size), + "::", + stringify!(slb_enc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).enc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_one_seg_page_size), + "::", + stringify!(enc) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_ppc_smmu_info { + pub flags: __u64, + pub slb_size: __u32, + pub data_keys: __u16, + pub instr_keys: __u16, + pub sps: [kvm_ppc_one_seg_page_size; 8usize], +} +#[test] +fn bindgen_test_layout_kvm_ppc_smmu_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 592usize, + concat!("Size of: ", stringify!(kvm_ppc_smmu_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_ppc_smmu_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_smmu_info), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slb_size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_smmu_info), + "::", + stringify!(slb_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data_keys) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_smmu_info), + "::", + stringify!(data_keys) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).instr_keys) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_smmu_info), + "::", + stringify!(instr_keys) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sps) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_smmu_info), + "::", + stringify!(sps) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_ppc_resize_hpt { + pub flags: __u64, + pub shift: __u32, + pub pad: __u32, +} +#[test] +fn bindgen_test_layout_kvm_ppc_resize_hpt() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_ppc_resize_hpt)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_ppc_resize_hpt)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_resize_hpt), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).shift) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_resize_hpt), + "::", + stringify!(shift) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_ppc_resize_hpt), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_irq_routing_irqchip { + pub irqchip: __u32, + pub pin: __u32, +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_irqchip() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_irq_routing_irqchip)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irq_routing_irqchip)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).irqchip) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_irqchip), + "::", + stringify!(irqchip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pin) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_irqchip), + "::", + stringify!(pin) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_irq_routing_msi { + pub address_lo: __u32, + pub address_hi: __u32, + pub data: __u32, + pub __bindgen_anon_1: kvm_irq_routing_msi__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_irq_routing_msi__bindgen_ty_1 { + pub pad: __u32, + pub devid: __u32, +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_msi__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(kvm_irq_routing_msi__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_irq_routing_msi__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_msi__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devid) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_msi__bindgen_ty_1), + "::", + stringify!(devid) + ) + ); +} +impl Default for kvm_irq_routing_msi__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_routing_msi__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_irq_routing_msi__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_msi() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_irq_routing_msi)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irq_routing_msi)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_lo) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_msi), + "::", + stringify!(address_lo) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_hi) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_msi), + "::", + stringify!(address_hi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_msi), + "::", + stringify!(data) + ) + ); +} +impl Default for kvm_irq_routing_msi { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_routing_msi { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_irq_routing_msi {{ address_lo: {:?}, address_hi: {:?}, data: {:?}, __bindgen_anon_1: {:?} }}" , self . address_lo , self . address_hi , self . data , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_irq_routing_s390_adapter { + pub ind_addr: __u64, + pub summary_addr: __u64, + pub ind_offset: __u64, + pub summary_offset: __u32, + pub adapter_id: __u32, +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_s390_adapter() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_irq_routing_s390_adapter)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_irq_routing_s390_adapter)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ind_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_s390_adapter), + "::", + stringify!(ind_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).summary_addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_s390_adapter), + "::", + stringify!(summary_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ind_offset) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_s390_adapter), + "::", + stringify!(ind_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).summary_offset) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_s390_adapter), + "::", + stringify!(summary_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).adapter_id) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_s390_adapter), + "::", + stringify!(adapter_id) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_irq_routing_hv_sint { + pub vcpu: __u32, + pub sint: __u32, +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_hv_sint() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_irq_routing_hv_sint)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irq_routing_hv_sint)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vcpu) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_hv_sint), + "::", + stringify!(vcpu) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_hv_sint), + "::", + stringify!(sint) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_irq_routing_xen_evtchn { + pub port: __u32, + pub vcpu: __u32, + pub priority: __u32, +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_xen_evtchn() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(kvm_irq_routing_xen_evtchn)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irq_routing_xen_evtchn)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_xen_evtchn), + "::", + stringify!(port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vcpu) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_xen_evtchn), + "::", + stringify!(vcpu) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_xen_evtchn), + "::", + stringify!(priority) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_irq_routing_entry { + pub gsi: __u32, + pub type_: __u32, + pub flags: __u32, + pub pad: __u32, + pub u: kvm_irq_routing_entry__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_irq_routing_entry__bindgen_ty_1 { + pub irqchip: kvm_irq_routing_irqchip, + pub msi: kvm_irq_routing_msi, + pub adapter: kvm_irq_routing_s390_adapter, + pub hv_sint: kvm_irq_routing_hv_sint, + pub xen_evtchn: kvm_irq_routing_xen_evtchn, + pub pad: [__u32; 8usize], +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_entry__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_irq_routing_entry__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).irqchip) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1), + "::", + stringify!(irqchip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).msi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1), + "::", + stringify!(msi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).adapter) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1), + "::", + stringify!(adapter) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_sint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1), + "::", + stringify!(hv_sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xen_evtchn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1), + "::", + stringify!(xen_evtchn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); +} +impl Default for kvm_irq_routing_entry__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_routing_entry__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_irq_routing_entry__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_irq_routing_entry() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_irq_routing_entry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_irq_routing_entry)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry), + "::", + stringify!(gsi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing_entry), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_irq_routing_entry { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_routing_entry { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_irq_routing_entry {{ gsi: {:?}, type: {:?}, flags: {:?}, pad: {:?}, u: {:?} }}", + self.gsi, self.type_, self.flags, self.pad, self.u + ) + } +} +#[repr(C)] +pub struct kvm_irq_routing { + pub nr: __u32, + pub flags: __u32, + pub entries: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_kvm_irq_routing() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_irq_routing)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_irq_routing)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irq_routing), + "::", + stringify!(entries) + ) + ); +} +impl Default for kvm_irq_routing { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_irq_routing { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_irq_routing {{ nr: {:?}, flags: {:?}, entries: {:?} }}", + self.nr, self.flags, self.entries + ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_irqfd { + pub fd: __u32, + pub gsi: __u32, + pub flags: __u32, + pub resamplefd: __u32, + pub pad: [__u8; 16usize], +} +#[test] +fn bindgen_test_layout_kvm_irqfd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_irqfd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_irqfd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqfd), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqfd), + "::", + stringify!(gsi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqfd), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).resamplefd) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqfd), + "::", + stringify!(resamplefd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_irqfd), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_clock_data { + pub clock: __u64, + pub flags: __u32, + pub pad0: __u32, + pub realtime: __u64, + pub host_tsc: __u64, + pub pad: [__u32; 4usize], +} +#[test] +fn bindgen_test_layout_kvm_clock_data() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_clock_data)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_clock_data)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).clock) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_clock_data), + "::", + stringify!(clock) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_clock_data), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad0) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_clock_data), + "::", + stringify!(pad0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).realtime) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_clock_data), + "::", + stringify!(realtime) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).host_tsc) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_clock_data), + "::", + stringify!(host_tsc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_clock_data), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_config_tlb { + pub params: __u64, + pub array: __u64, + pub mmu_type: __u32, + pub array_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_config_tlb() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_config_tlb)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_config_tlb)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).params) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_config_tlb), + "::", + stringify!(params) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).array) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_config_tlb), + "::", + stringify!(array) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mmu_type) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_config_tlb), + "::", + stringify!(mmu_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).array_len) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_config_tlb), + "::", + stringify!(array_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_dirty_tlb { + pub bitmap: __u64, + pub num_dirty: __u32, +} +#[test] +fn bindgen_test_layout_kvm_dirty_tlb() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_dirty_tlb)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_dirty_tlb)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bitmap) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_tlb), + "::", + stringify!(bitmap) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_dirty) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_tlb), + "::", + stringify!(num_dirty) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct kvm_reg_list { + pub n: __u64, + pub reg: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_kvm_reg_list() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_reg_list)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_reg_list)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).n) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_reg_list), + "::", + stringify!(n) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_reg_list), + "::", + stringify!(reg) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_one_reg { + pub id: __u64, + pub addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_one_reg() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_one_reg)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_one_reg)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_one_reg), + "::", + stringify!(id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_one_reg), + "::", + stringify!(addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_msi { + pub address_lo: __u32, + pub address_hi: __u32, + pub data: __u32, + pub flags: __u32, + pub devid: __u32, + pub pad: [__u8; 12usize], +} +#[test] +fn bindgen_test_layout_kvm_msi() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_msi)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_msi)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_lo) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_msi), + "::", + stringify!(address_lo) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_hi) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_msi), + "::", + stringify!(address_hi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_msi), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_msi), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devid) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_msi), + "::", + stringify!(devid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_msi), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_arm_device_addr { + pub id: __u64, + pub addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_arm_device_addr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_arm_device_addr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_arm_device_addr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_arm_device_addr), + "::", + stringify!(id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_arm_device_addr), + "::", + stringify!(addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_create_device { + pub type_: __u32, + pub fd: __u32, + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_kvm_create_device() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(kvm_create_device)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_create_device)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_create_device), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_create_device), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_create_device), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_device_attr { + pub flags: __u32, + pub group: __u32, + pub attr: __u64, + pub addr: __u64, +} +#[test] +fn bindgen_test_layout_kvm_device_attr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_device_attr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_device_attr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_device_attr), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_device_attr), + "::", + stringify!(group) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).attr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_device_attr), + "::", + stringify!(attr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_device_attr), + "::", + stringify!(addr) + ) + ); +} +pub const kvm_device_type_KVM_DEV_TYPE_FSL_MPIC_20: kvm_device_type = 1; +pub const kvm_device_type_KVM_DEV_TYPE_FSL_MPIC_42: kvm_device_type = 2; +pub const kvm_device_type_KVM_DEV_TYPE_XICS: kvm_device_type = 3; +pub const kvm_device_type_KVM_DEV_TYPE_VFIO: kvm_device_type = 4; +pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V2: kvm_device_type = 5; +pub const kvm_device_type_KVM_DEV_TYPE_FLIC: kvm_device_type = 6; +pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_V3: kvm_device_type = 7; +pub const kvm_device_type_KVM_DEV_TYPE_ARM_VGIC_ITS: kvm_device_type = 8; +pub const kvm_device_type_KVM_DEV_TYPE_XIVE: kvm_device_type = 9; +pub const kvm_device_type_KVM_DEV_TYPE_ARM_PV_TIME: kvm_device_type = 10; +pub const kvm_device_type_KVM_DEV_TYPE_RISCV_AIA: kvm_device_type = 11; +pub const kvm_device_type_KVM_DEV_TYPE_MAX: kvm_device_type = 12; +pub type kvm_device_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_vfio_spapr_tce { + pub groupfd: __s32, + pub tablefd: __s32, +} +#[test] +fn bindgen_test_layout_kvm_vfio_spapr_tce() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_vfio_spapr_tce)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_vfio_spapr_tce)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).groupfd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_vfio_spapr_tce), + "::", + stringify!(groupfd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tablefd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_vfio_spapr_tce), + "::", + stringify!(tablefd) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_ucas_mapping { + pub user_addr: __u64, + pub vcpu_addr: __u64, + pub length: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_ucas_mapping() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_s390_ucas_mapping)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_ucas_mapping)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).user_addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_ucas_mapping), + "::", + stringify!(user_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vcpu_addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_ucas_mapping), + "::", + stringify!(vcpu_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_ucas_mapping), + "::", + stringify!(length) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_enc_region { + pub addr: __u64, + pub size: __u64, +} +#[test] +fn bindgen_test_layout_kvm_enc_region() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_enc_region)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_enc_region)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_enc_region), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_enc_region), + "::", + stringify!(size) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_sec_parm { + pub origin: __u64, + pub length: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_sec_parm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_s390_pv_sec_parm)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_sec_parm)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).origin) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_sec_parm), + "::", + stringify!(origin) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_sec_parm), + "::", + stringify!(length) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_unp { + pub addr: __u64, + pub size: __u64, + pub tweak: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_unp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_s390_pv_unp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_unp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_unp), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_unp), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).tweak) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_unp), + "::", + stringify!(tweak) + ) + ); +} +pub const pv_cmd_dmp_id_KVM_PV_DUMP_INIT: pv_cmd_dmp_id = 0; +pub const pv_cmd_dmp_id_KVM_PV_DUMP_CONFIG_STOR_STATE: pv_cmd_dmp_id = 1; +pub const pv_cmd_dmp_id_KVM_PV_DUMP_COMPLETE: pv_cmd_dmp_id = 2; +pub const pv_cmd_dmp_id_KVM_PV_DUMP_CPU: pv_cmd_dmp_id = 3; +pub type pv_cmd_dmp_id = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_dmp { + pub subcmd: __u64, + pub buff_addr: __u64, + pub buff_len: __u64, + pub gaddr: __u64, + pub reserved: [__u64; 4usize], +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_dmp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_pv_dmp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_dmp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subcmd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_dmp), + "::", + stringify!(subcmd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buff_addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_dmp), + "::", + stringify!(buff_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buff_len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_dmp), + "::", + stringify!(buff_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gaddr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_dmp), + "::", + stringify!(gaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_dmp), + "::", + stringify!(reserved) + ) + ); +} +pub const pv_cmd_info_id_KVM_PV_INFO_VM: pv_cmd_info_id = 0; +pub const pv_cmd_info_id_KVM_PV_INFO_DUMP: pv_cmd_info_id = 1; +pub type pv_cmd_info_id = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_info_dump { + pub dump_cpu_buffer_len: __u64, + pub dump_config_mem_buffer_per_1m: __u64, + pub dump_config_finalize_len: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_info_dump() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_s390_pv_info_dump)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_info_dump)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dump_cpu_buffer_len) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_dump), + "::", + stringify!(dump_cpu_buffer_len) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).dump_config_mem_buffer_per_1m) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_dump), + "::", + stringify!(dump_config_mem_buffer_per_1m) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dump_config_finalize_len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_dump), + "::", + stringify!(dump_config_finalize_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_info_vm { + pub inst_calls_list: [__u64; 4usize], + pub max_cpus: __u64, + pub max_guests: __u64, + pub max_guest_addr: __u64, + pub feature_indication: __u64, +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_info_vm() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_pv_info_vm)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_info_vm)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).inst_calls_list) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_vm), + "::", + stringify!(inst_calls_list) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_cpus) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_vm), + "::", + stringify!(max_cpus) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_guests) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_vm), + "::", + stringify!(max_guests) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_guest_addr) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_vm), + "::", + stringify!(max_guest_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).feature_indication) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_vm), + "::", + stringify!(feature_indication) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_info_header { + pub id: __u32, + pub len_max: __u32, + pub len_written: __u32, + pub reserved: __u32, +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_info_header() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_s390_pv_info_header)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_info_header)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_header), + "::", + stringify!(id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len_max) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_header), + "::", + stringify!(len_max) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len_written) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_header), + "::", + stringify!(len_written) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info_header), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_s390_pv_info { + pub header: kvm_s390_pv_info_header, + pub __bindgen_anon_1: kvm_s390_pv_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_s390_pv_info__bindgen_ty_1 { + pub dump: kvm_s390_pv_info_dump, + pub vm: kvm_s390_pv_info_vm, +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_info__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_pv_info__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_info__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dump) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info__bindgen_ty_1), + "::", + stringify!(dump) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vm) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info__bindgen_ty_1), + "::", + stringify!(vm) + ) + ); +} +impl Default for kvm_s390_pv_info__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_pv_info__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_s390_pv_info__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_s390_pv_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 80usize, + concat!("Size of: ", stringify!(kvm_s390_pv_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_pv_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_pv_info), + "::", + stringify!(header) + ) + ); +} +impl Default for kvm_s390_pv_info { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_pv_info { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_s390_pv_info {{ header: {:?}, __bindgen_anon_1: {:?} }}", + self.header, self.__bindgen_anon_1 + ) + } +} +pub const pv_cmd_id_KVM_PV_ENABLE: pv_cmd_id = 0; +pub const pv_cmd_id_KVM_PV_DISABLE: pv_cmd_id = 1; +pub const pv_cmd_id_KVM_PV_SET_SEC_PARMS: pv_cmd_id = 2; +pub const pv_cmd_id_KVM_PV_UNPACK: pv_cmd_id = 3; +pub const pv_cmd_id_KVM_PV_VERIFY: pv_cmd_id = 4; +pub const pv_cmd_id_KVM_PV_PREP_RESET: pv_cmd_id = 5; +pub const pv_cmd_id_KVM_PV_UNSHARE_ALL: pv_cmd_id = 6; +pub const pv_cmd_id_KVM_PV_INFO: pv_cmd_id = 7; +pub const pv_cmd_id_KVM_PV_DUMP: pv_cmd_id = 8; +pub const pv_cmd_id_KVM_PV_ASYNC_CLEANUP_PREPARE: pv_cmd_id = 9; +pub const pv_cmd_id_KVM_PV_ASYNC_CLEANUP_PERFORM: pv_cmd_id = 10; +pub type pv_cmd_id = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_pv_cmd { + pub cmd: __u32, + pub rc: __u16, + pub rrc: __u16, + pub data: __u64, + pub flags: __u32, + pub reserved: [__u32; 3usize], +} +#[test] +fn bindgen_test_layout_kvm_pv_cmd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_pv_cmd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_pv_cmd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cmd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_pv_cmd), + "::", + stringify!(cmd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rc) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_pv_cmd), + "::", + stringify!(rc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rrc) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(kvm_pv_cmd), + "::", + stringify!(rrc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_pv_cmd), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_pv_cmd), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_pv_cmd), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_xen_hvm_attr { + pub type_: __u16, + pub pad: [__u16; 3usize], + pub u: kvm_xen_hvm_attr__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_xen_hvm_attr__bindgen_ty_1 { + pub long_mode: __u8, + pub vector: __u8, + pub runstate_update_flag: __u8, + pub shared_info: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1, + pub evtchn: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2, + pub xen_version: __u32, + pub pad: [__u64; 8usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1 { + pub gfn: __u64, +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gfn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(gfn) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2 { + pub send_port: __u32, + pub type_: __u32, + pub flags: __u32, + pub deliver: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 { + pub port: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, + pub eventfd: kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, + pub padding: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1 { + pub port: __u32, + pub vcpu: __u32, + pub priority: __u32, +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, + >(), + 12usize, + concat!( + "Size of: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vcpu) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(vcpu) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(priority) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2 { + pub port: __u32, + pub fd: __s32, +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2, + >(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(fd) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eventfd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(eventfd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1), + "::", + stringify!(padding) + ) + ); +} +impl Default for kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2__bindgen_ty_1 {{ union }}" + ) + } +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 28usize, + concat!( + "Size of: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).send_port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(send_port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).deliver) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(deliver) + ) + ); +} +impl Default for kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_xen_hvm_attr__bindgen_ty_1__bindgen_ty_2 {{ send_port: {:?}, type: {:?}, flags: {:?}, deliver: {:?} }}" , self . send_port , self . type_ , self . flags , self . deliver) + } +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_xen_hvm_attr__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_xen_hvm_attr__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).long_mode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(long_mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(vector) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).runstate_update_flag) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(runstate_update_flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).shared_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(shared_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).evtchn) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(evtchn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xen_version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(xen_version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); +} +impl Default for kvm_xen_hvm_attr__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_hvm_attr__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_xen_hvm_attr__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_xen_hvm_attr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_xen_hvm_attr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_xen_hvm_attr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_hvm_attr), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_xen_hvm_attr { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_hvm_attr { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_xen_hvm_attr {{ type: {:?}, pad: {:?}, u: {:?} }}", + self.type_, self.pad, self.u + ) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_xen_vcpu_attr { + pub type_: __u16, + pub pad: [__u16; 3usize], + pub u: kvm_xen_vcpu_attr__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_xen_vcpu_attr__bindgen_ty_1 { + pub gpa: __u64, + pub pad: [__u64; 8usize], + pub runstate: kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1, + pub vcpu_id: __u32, + pub timer: kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2, + pub vector: __u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1 { + pub state: __u64, + pub state_entry_time: __u64, + pub time_running: __u64, + pub time_runnable: __u64, + pub time_blocked: __u64, + pub time_offline: __u64, +} +#[test] +fn bindgen_test_layout_kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!( + "Size of: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(state) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).state_entry_time) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(state_entry_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_running) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(time_running) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_runnable) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(time_runnable) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_blocked) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(time_blocked) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_offline) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(time_offline) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2 { + pub port: __u32, + pub priority: __u32, + pub expires_ns: __u64, +} +#[test] +fn bindgen_test_layout_kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(port) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).priority) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(priority) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).expires_ns) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(expires_ns) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_xen_vcpu_attr__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_xen_vcpu_attr__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_xen_vcpu_attr__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1), + "::", + stringify!(gpa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).runstate) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1), + "::", + stringify!(runstate) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vcpu_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1), + "::", + stringify!(vcpu_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timer) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1), + "::", + stringify!(timer) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr__bindgen_ty_1), + "::", + stringify!(vector) + ) + ); +} +impl Default for kvm_xen_vcpu_attr__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_vcpu_attr__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_xen_vcpu_attr__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_xen_vcpu_attr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_xen_vcpu_attr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_xen_vcpu_attr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_xen_vcpu_attr), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_xen_vcpu_attr { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_xen_vcpu_attr { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_xen_vcpu_attr {{ type: {:?}, pad: {:?}, u: {:?} }}", + self.type_, self.pad, self.u + ) + } +} +pub const sev_cmd_id_KVM_SEV_INIT: sev_cmd_id = 0; +pub const sev_cmd_id_KVM_SEV_ES_INIT: sev_cmd_id = 1; +pub const sev_cmd_id_KVM_SEV_LAUNCH_START: sev_cmd_id = 2; +pub const sev_cmd_id_KVM_SEV_LAUNCH_UPDATE_DATA: sev_cmd_id = 3; +pub const sev_cmd_id_KVM_SEV_LAUNCH_UPDATE_VMSA: sev_cmd_id = 4; +pub const sev_cmd_id_KVM_SEV_LAUNCH_SECRET: sev_cmd_id = 5; +pub const sev_cmd_id_KVM_SEV_LAUNCH_MEASURE: sev_cmd_id = 6; +pub const sev_cmd_id_KVM_SEV_LAUNCH_FINISH: sev_cmd_id = 7; +pub const sev_cmd_id_KVM_SEV_SEND_START: sev_cmd_id = 8; +pub const sev_cmd_id_KVM_SEV_SEND_UPDATE_DATA: sev_cmd_id = 9; +pub const sev_cmd_id_KVM_SEV_SEND_UPDATE_VMSA: sev_cmd_id = 10; +pub const sev_cmd_id_KVM_SEV_SEND_FINISH: sev_cmd_id = 11; +pub const sev_cmd_id_KVM_SEV_RECEIVE_START: sev_cmd_id = 12; +pub const sev_cmd_id_KVM_SEV_RECEIVE_UPDATE_DATA: sev_cmd_id = 13; +pub const sev_cmd_id_KVM_SEV_RECEIVE_UPDATE_VMSA: sev_cmd_id = 14; +pub const sev_cmd_id_KVM_SEV_RECEIVE_FINISH: sev_cmd_id = 15; +pub const sev_cmd_id_KVM_SEV_GUEST_STATUS: sev_cmd_id = 16; +pub const sev_cmd_id_KVM_SEV_DBG_DECRYPT: sev_cmd_id = 17; +pub const sev_cmd_id_KVM_SEV_DBG_ENCRYPT: sev_cmd_id = 18; +pub const sev_cmd_id_KVM_SEV_CERT_EXPORT: sev_cmd_id = 19; +pub const sev_cmd_id_KVM_SEV_GET_ATTESTATION_REPORT: sev_cmd_id = 20; +pub const sev_cmd_id_KVM_SEV_SEND_CANCEL: sev_cmd_id = 21; +pub const sev_cmd_id_KVM_SEV_NR_MAX: sev_cmd_id = 22; +pub type sev_cmd_id = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_cmd { + pub id: __u32, + pub data: __u64, + pub error: __u32, + pub sev_fd: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_cmd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_sev_cmd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_cmd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_cmd), + "::", + stringify!(id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_cmd), + "::", + stringify!(data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).error) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_cmd), + "::", + stringify!(error) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sev_fd) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_cmd), + "::", + stringify!(sev_fd) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_launch_start { + pub handle: __u32, + pub policy: __u32, + pub dh_uaddr: __u64, + pub dh_len: __u32, + pub session_uaddr: __u64, + pub session_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_launch_start() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(kvm_sev_launch_start)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_launch_start)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_start), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).policy) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_start), + "::", + stringify!(policy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dh_uaddr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_start), + "::", + stringify!(dh_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dh_len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_start), + "::", + stringify!(dh_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).session_uaddr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_start), + "::", + stringify!(session_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).session_len) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_start), + "::", + stringify!(session_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_launch_update_data { + pub uaddr: __u64, + pub len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_launch_update_data() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_sev_launch_update_data)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_launch_update_data)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_update_data), + "::", + stringify!(uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_update_data), + "::", + stringify!(len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_launch_secret { + pub hdr_uaddr: __u64, + pub hdr_len: __u32, + pub guest_uaddr: __u64, + pub guest_len: __u32, + pub trans_uaddr: __u64, + pub trans_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_launch_secret() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_sev_launch_secret)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_launch_secret)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr_uaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_secret), + "::", + stringify!(hdr_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr_len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_secret), + "::", + stringify!(hdr_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_uaddr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_secret), + "::", + stringify!(guest_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_len) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_secret), + "::", + stringify!(guest_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_uaddr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_secret), + "::", + stringify!(trans_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_len) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_secret), + "::", + stringify!(trans_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_launch_measure { + pub uaddr: __u64, + pub len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_launch_measure() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_sev_launch_measure)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_launch_measure)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_measure), + "::", + stringify!(uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_launch_measure), + "::", + stringify!(len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_guest_status { + pub handle: __u32, + pub policy: __u32, + pub state: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_guest_status() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(kvm_sev_guest_status)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_sev_guest_status)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_guest_status), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).policy) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_guest_status), + "::", + stringify!(policy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).state) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_guest_status), + "::", + stringify!(state) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_dbg { + pub src_uaddr: __u64, + pub dst_uaddr: __u64, + pub len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_dbg() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_sev_dbg)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_dbg)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).src_uaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_dbg), + "::", + stringify!(src_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dst_uaddr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_dbg), + "::", + stringify!(dst_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_dbg), + "::", + stringify!(len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_attestation_report { + pub mnonce: [__u8; 16usize], + pub uaddr: __u64, + pub len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_attestation_report() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(kvm_sev_attestation_report)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_attestation_report)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mnonce) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_attestation_report), + "::", + stringify!(mnonce) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).uaddr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_attestation_report), + "::", + stringify!(uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_attestation_report), + "::", + stringify!(len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_send_start { + pub policy: __u32, + pub pdh_cert_uaddr: __u64, + pub pdh_cert_len: __u32, + pub plat_certs_uaddr: __u64, + pub plat_certs_len: __u32, + pub amd_certs_uaddr: __u64, + pub amd_certs_len: __u32, + pub session_uaddr: __u64, + pub session_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_send_start() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_sev_send_start)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_send_start)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).policy) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(policy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pdh_cert_uaddr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(pdh_cert_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pdh_cert_len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(pdh_cert_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).plat_certs_uaddr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(plat_certs_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).plat_certs_len) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(plat_certs_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).amd_certs_uaddr) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(amd_certs_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).amd_certs_len) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(amd_certs_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).session_uaddr) as usize - ptr as usize }, + 56usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(session_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).session_len) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_start), + "::", + stringify!(session_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_send_update_data { + pub hdr_uaddr: __u64, + pub hdr_len: __u32, + pub guest_uaddr: __u64, + pub guest_len: __u32, + pub trans_uaddr: __u64, + pub trans_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_send_update_data() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_sev_send_update_data)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_send_update_data)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr_uaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_update_data), + "::", + stringify!(hdr_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr_len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_update_data), + "::", + stringify!(hdr_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_uaddr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_update_data), + "::", + stringify!(guest_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_len) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_update_data), + "::", + stringify!(guest_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_uaddr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_update_data), + "::", + stringify!(trans_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_len) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_send_update_data), + "::", + stringify!(trans_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_receive_start { + pub handle: __u32, + pub policy: __u32, + pub pdh_uaddr: __u64, + pub pdh_len: __u32, + pub session_uaddr: __u64, + pub session_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_receive_start() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(kvm_sev_receive_start)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_receive_start)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).handle) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_start), + "::", + stringify!(handle) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).policy) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_start), + "::", + stringify!(policy) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pdh_uaddr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_start), + "::", + stringify!(pdh_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pdh_len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_start), + "::", + stringify!(pdh_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).session_uaddr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_start), + "::", + stringify!(session_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).session_len) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_start), + "::", + stringify!(session_len) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sev_receive_update_data { + pub hdr_uaddr: __u64, + pub hdr_len: __u32, + pub guest_uaddr: __u64, + pub guest_len: __u32, + pub trans_uaddr: __u64, + pub trans_len: __u32, +} +#[test] +fn bindgen_test_layout_kvm_sev_receive_update_data() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_sev_receive_update_data)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_sev_receive_update_data)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr_uaddr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_update_data), + "::", + stringify!(hdr_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hdr_len) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_update_data), + "::", + stringify!(hdr_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_uaddr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_update_data), + "::", + stringify!(guest_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_len) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_update_data), + "::", + stringify!(guest_len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_uaddr) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_update_data), + "::", + stringify!(trans_uaddr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trans_len) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(kvm_sev_receive_update_data), + "::", + stringify!(trans_len) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_assigned_pci_dev { + pub assigned_dev_id: __u32, + pub busnr: __u32, + pub devfn: __u32, + pub flags: __u32, + pub segnr: __u32, + pub __bindgen_anon_1: kvm_assigned_pci_dev__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_assigned_pci_dev__bindgen_ty_1 { + pub reserved: [__u32; 11usize], +} +#[test] +fn bindgen_test_layout_kvm_assigned_pci_dev__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 44usize, + concat!("Size of: ", stringify!(kvm_assigned_pci_dev__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(kvm_assigned_pci_dev__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_pci_dev__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for kvm_assigned_pci_dev__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_assigned_pci_dev__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_assigned_pci_dev__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_assigned_pci_dev() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_assigned_pci_dev)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_assigned_pci_dev)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).assigned_dev_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_pci_dev), + "::", + stringify!(assigned_dev_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).busnr) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_pci_dev), + "::", + stringify!(busnr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).devfn) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_pci_dev), + "::", + stringify!(devfn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_pci_dev), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).segnr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_pci_dev), + "::", + stringify!(segnr) + ) + ); +} +impl Default for kvm_assigned_pci_dev { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_assigned_pci_dev { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_assigned_pci_dev {{ assigned_dev_id: {:?}, busnr: {:?}, devfn: {:?}, flags: {:?}, segnr: {:?}, __bindgen_anon_1: {:?} }}" , self . assigned_dev_id , self . busnr , self . devfn , self . flags , self . segnr , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_assigned_irq { + pub assigned_dev_id: __u32, + pub host_irq: __u32, + pub guest_irq: __u32, + pub flags: __u32, + pub __bindgen_anon_1: kvm_assigned_irq__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_assigned_irq__bindgen_ty_1 { + pub reserved: [__u32; 12usize], +} +#[test] +fn bindgen_test_layout_kvm_assigned_irq__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(kvm_assigned_irq__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_assigned_irq__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_irq__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for kvm_assigned_irq__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_assigned_irq__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_assigned_irq__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_assigned_irq() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_assigned_irq)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_assigned_irq)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).assigned_dev_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_irq), + "::", + stringify!(assigned_dev_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).host_irq) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_irq), + "::", + stringify!(host_irq) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_irq) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_irq), + "::", + stringify!(guest_irq) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_irq), + "::", + stringify!(flags) + ) + ); +} +impl Default for kvm_assigned_irq { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_assigned_irq { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write ! (f , "kvm_assigned_irq {{ assigned_dev_id: {:?}, host_irq: {:?}, guest_irq: {:?}, flags: {:?}, __bindgen_anon_1: {:?} }}" , self . assigned_dev_id , self . host_irq , self . guest_irq , self . flags , self . __bindgen_anon_1) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_assigned_msix_nr { + pub assigned_dev_id: __u32, + pub entry_nr: __u16, + pub padding: __u16, +} +#[test] +fn bindgen_test_layout_kvm_assigned_msix_nr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(kvm_assigned_msix_nr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_assigned_msix_nr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).assigned_dev_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_nr), + "::", + stringify!(assigned_dev_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).entry_nr) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_nr), + "::", + stringify!(entry_nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_nr), + "::", + stringify!(padding) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_assigned_msix_entry { + pub assigned_dev_id: __u32, + pub gsi: __u32, + pub entry: __u16, + pub padding: [__u16; 3usize], +} +#[test] +fn bindgen_test_layout_kvm_assigned_msix_entry() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_assigned_msix_entry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_assigned_msix_entry)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).assigned_dev_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_entry), + "::", + stringify!(assigned_dev_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_entry), + "::", + stringify!(gsi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).entry) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_entry), + "::", + stringify!(entry) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(kvm_assigned_msix_entry), + "::", + stringify!(padding) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_hyperv_eventfd { + pub conn_id: __u32, + pub fd: __s32, + pub flags: __u32, + pub padding: [__u32; 3usize], +} +#[test] +fn bindgen_test_layout_kvm_hyperv_eventfd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_hyperv_eventfd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_hyperv_eventfd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).conn_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_eventfd), + "::", + stringify!(conn_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_eventfd), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_eventfd), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_hyperv_eventfd), + "::", + stringify!(padding) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_dirty_gfn { + pub flags: __u32, + pub slot: __u32, + pub offset: __u64, +} +#[test] +fn bindgen_test_layout_kvm_dirty_gfn() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_dirty_gfn)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_dirty_gfn)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_gfn), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).slot) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_gfn), + "::", + stringify!(slot) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_dirty_gfn), + "::", + stringify!(offset) + ) + ); +} +#[doc = " struct kvm_stats_header - Header of per vm/vcpu binary statistics data.\n @flags: Some extra information for header, always 0 for now.\n @name_size: The size in bytes of the memory which contains statistics\n name string including trailing '\\0'. The memory is allocated\n at the send of statistics descriptor.\n @num_desc: The number of statistics the vm or vcpu has.\n @id_offset: The offset of the vm/vcpu stats' id string in the file pointed\n by vm/vcpu stats fd.\n @desc_offset: The offset of the vm/vcpu stats' descriptor block in the file\n pointd by vm/vcpu stats fd.\n @data_offset: The offset of the vm/vcpu stats' data block in the file\n pointed by vm/vcpu stats fd.\n\n This is the header userspace needs to read from stats fd before any other\n readings. It is used by userspace to discover all the information about the\n vm/vcpu's binary statistics.\n Userspace reads this header from the start of the vm/vcpu's stats fd."] +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_stats_header { + pub flags: __u32, + pub name_size: __u32, + pub num_desc: __u32, + pub id_offset: __u32, + pub desc_offset: __u32, + pub data_offset: __u32, +} +#[test] +fn bindgen_test_layout_kvm_stats_header() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(kvm_stats_header)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_stats_header)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_header), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_header), + "::", + stringify!(name_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_desc) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_header), + "::", + stringify!(num_desc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_offset) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_header), + "::", + stringify!(id_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).desc_offset) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_header), + "::", + stringify!(desc_offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data_offset) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_header), + "::", + stringify!(data_offset) + ) + ); +} +#[doc = " struct kvm_stats_desc - Descriptor of a KVM statistics.\n @flags: Annotations of the stats, like type, unit, etc.\n @exponent: Used together with @flags to determine the unit.\n @size: The number of data items for this stats.\n Every data item is of type __u64.\n @offset: The offset of the stats to the start of stat structure in\n structure kvm or kvm_vcpu.\n @bucket_size: A parameter value used for histogram stats. It is only used\n\t\tfor linear histogram stats, specifying the size of the bucket;\n @name: The name string for the stats. Its size is indicated by the\n &kvm_stats_header->name_size."] +#[repr(C)] +#[derive(Debug, Default)] +pub struct kvm_stats_desc { + pub flags: __u32, + pub exponent: __s16, + pub size: __u16, + pub offset: __u32, + pub bucket_size: __u32, + pub name: __IncompleteArrayField<::std::os::raw::c_char>, +} +#[test] +fn bindgen_test_layout_kvm_stats_desc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(kvm_stats_desc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(kvm_stats_desc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_desc), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).exponent) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_desc), + "::", + stringify!(exponent) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_desc), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_desc), + "::", + stringify!(offset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bucket_size) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_desc), + "::", + stringify!(bucket_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_stats_desc), + "::", + stringify!(name) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_s390_zpci_op { + pub fh: __u32, + pub op: __u8, + pub pad: [__u8; 3usize], + pub u: kvm_s390_zpci_op__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_s390_zpci_op__bindgen_ty_1 { + pub reg_aen: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, + pub reserved: [__u64; 8usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1 { + pub ibv: __u64, + pub sb: __u64, + pub flags: __u32, + pub noi: __u32, + pub isc: __u8, + pub sbo: __u8, + pub pad: __u16, +} +#[test] +fn bindgen_test_layout_kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ibv) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(ibv) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sb) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(sb) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).noi) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(noi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isc) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(isc) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sbo) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(sbo) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 26usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(pad) + ) + ); +} +#[test] +fn bindgen_test_layout_kvm_s390_zpci_op__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 64usize, + concat!("Size of: ", stringify!(kvm_s390_zpci_op__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_zpci_op__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg_aen) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1), + "::", + stringify!(reg_aen) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for kvm_s390_zpci_op__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_zpci_op__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_s390_zpci_op__bindgen_ty_1 {{ union }}") + } +} +#[test] +fn bindgen_test_layout_kvm_s390_zpci_op() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(kvm_s390_zpci_op)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(kvm_s390_zpci_op)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fh) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op), + "::", + stringify!(fh) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).op) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op), + "::", + stringify!(op) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(kvm_s390_zpci_op), + "::", + stringify!(u) + ) + ); +} +impl Default for kvm_s390_zpci_op { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for kvm_s390_zpci_op { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_s390_zpci_op {{ fh: {:?}, op: {:?}, pad: {:?}, u: {:?} }}", + self.fh, self.op, self.pad, self.u + ) + } +} diff --git a/src/riscv/mod.rs b/src/riscv/mod.rs new file mode 100644 index 0000000..5171f37 --- /dev/null +++ b/src/riscv/mod.rs @@ -0,0 +1,15 @@ +// Copyright (c) 2023 StarFive Technology Co., Ltd. All rights reserved. +// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +#[allow(clippy::all)] +#[allow(clippy::undocumented_unsafe_blocks)] +// Keep this until https://github.com/rust-lang/rust-bindgen/issues/1651 is fixed. +#[cfg_attr(test, allow(deref_nullptr))] +pub mod bindings; +// #[cfg(feature = "fam-wrappers")] +// pub mod fam_wrappers; + +pub use self::bindings::*; +// #[cfg(feature = "fam-wrappers")] +// pub use self::fam_wrappers::*;