diff --git a/kvm-bindings/CHANGELOG.md b/kvm-bindings/CHANGELOG.md index 4a607c87..f127c236 100644 --- a/kvm-bindings/CHANGELOG.md +++ b/kvm-bindings/CHANGELOG.md @@ -2,6 +2,11 @@ ## Upcoming Release +### Added + +- s390x (`s390x-unknown-linux-gnu`) KVM bindings, including `fam-wrappers` and `serde` + support aligned with other architectures. + ## v0.14.1 ### Fixed diff --git a/kvm-bindings/README.md b/kvm-bindings/README.md index 0319e8ac..fe63be53 100644 --- a/kvm-bindings/README.md +++ b/kvm-bindings/README.md @@ -6,6 +6,7 @@ following target architectures: - x86_64 - arm64 - riscv64 +- s390x 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/kvm-bindings/src/lib.rs b/kvm-bindings/src/lib.rs index 1eacfcd8..1a7ad80e 100644 --- a/kvm-bindings/src/lib.rs +++ b/kvm-bindings/src/lib.rs @@ -28,3 +28,8 @@ pub use self::arm64::*; mod riscv64; #[cfg(target_arch = "riscv64")] pub use self::riscv64::*; + +#[cfg(target_arch = "s390x")] +mod s390x; +#[cfg(target_arch = "s390x")] +pub use self::s390x::*; diff --git a/kvm-bindings/src/s390x/bindings.rs b/kvm-bindings/src/s390x/bindings.rs new file mode 100644 index 00000000..0d9ce234 --- /dev/null +++ b/kvm-bindings/src/s390x/bindings.rs @@ -0,0 +1,5028 @@ +/* automatically generated by rust-bindgen 0.72.0 */ + +#[repr(transparent)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct __BindgenBitfieldUnit { + storage: Storage, +} +impl __BindgenBitfieldUnit { + #[inline] + pub const fn new(storage: Storage) -> Self { + Self { storage } + } +} +impl __BindgenBitfieldUnit +where + Storage: AsRef<[u8]> + AsMut<[u8]>, +{ + #[inline] + fn extract_bit(byte: u8, index: usize) -> bool { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + Self::extract_bit(byte, index) + } + #[inline] + pub unsafe fn raw_get_bit(this: *const Self, index: usize) -> bool { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + *(core::ptr::addr_of!((*this).storage) as *const u8).offset(byte_index as isize) + }; + Self::extract_bit(byte, index) + } + #[inline] + fn change_bit(byte: u8, index: usize, val: bool) -> u8 { + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { byte | mask } else { byte & !mask } + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + *byte = Self::change_bit(*byte, index, val); + } + #[inline] + pub unsafe fn raw_set_bit(this: *mut Self, index: usize, val: bool) { + debug_assert!(index / 8 < core::mem::size_of::()); + let byte_index = index / 8; + let byte = unsafe { + (core::ptr::addr_of_mut!((*this).storage) as *mut u8).offset(byte_index as isize) + }; + unsafe { *byte = Self::change_bit(*byte, index, val) }; + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub unsafe fn raw_get(this: *const Self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if unsafe { Self::raw_get_bit(this, i + bit_offset) } { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } + #[inline] + pub unsafe fn raw_set(this: *mut Self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < core::mem::size_of::()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= core::mem::size_of::()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + unsafe { Self::raw_set_bit(this, index + bit_offset, val_bit_is_set) }; + } + } +} +#[repr(transparent)] +#[derive(Default)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +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] { + unsafe { ::std::slice::from_raw_parts(self.as_ptr(), len) } + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + unsafe { ::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 __BITS_PER_LONG: u32 = 64; +pub const __BITS_PER_LONG_LONG: u32 = 64; +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 KVM_S390_CMMA_PEEK: 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_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_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_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 const KVM_DEV_FLIC_GET_ALL_IRQS: u32 = 1; +pub const KVM_DEV_FLIC_ENQUEUE: u32 = 2; +pub const KVM_DEV_FLIC_CLEAR_IRQS: u32 = 3; +pub const KVM_DEV_FLIC_APF_ENABLE: u32 = 4; +pub const KVM_DEV_FLIC_APF_DISABLE_WAIT: u32 = 5; +pub const KVM_DEV_FLIC_ADAPTER_REGISTER: u32 = 6; +pub const KVM_DEV_FLIC_ADAPTER_MODIFY: u32 = 7; +pub const KVM_DEV_FLIC_CLEAR_IO_IRQ: u32 = 8; +pub const KVM_DEV_FLIC_AISM: u32 = 9; +pub const KVM_DEV_FLIC_AIRQ_INJECT: u32 = 10; +pub const KVM_DEV_FLIC_AISM_ALL: u32 = 11; +pub const KVM_S390_MAX_FLOAT_IRQS: u32 = 266250; +pub const KVM_S390_FLIC_MAX_BUFFER: u32 = 33554432; +pub const KVM_S390_ADAPTER_SUPPRESSIBLE: u32 = 1; +pub const KVM_S390_IO_ADAPTER_MASK: u32 = 1; +pub const KVM_S390_IO_ADAPTER_MAP: u32 = 2; +pub const KVM_S390_IO_ADAPTER_UNMAP: u32 = 3; +pub const KVM_S390_VM_MEM_CTRL: u32 = 0; +pub const KVM_S390_VM_TOD: u32 = 1; +pub const KVM_S390_VM_CRYPTO: u32 = 2; +pub const KVM_S390_VM_CPU_MODEL: u32 = 3; +pub const KVM_S390_VM_MIGRATION: u32 = 4; +pub const KVM_S390_VM_CPU_TOPOLOGY: u32 = 5; +pub const KVM_S390_VM_MEM_ENABLE_CMMA: u32 = 0; +pub const KVM_S390_VM_MEM_CLR_CMMA: u32 = 1; +pub const KVM_S390_VM_MEM_LIMIT_SIZE: u32 = 2; +pub const KVM_S390_VM_TOD_LOW: u32 = 0; +pub const KVM_S390_VM_TOD_HIGH: u32 = 1; +pub const KVM_S390_VM_TOD_EXT: u32 = 2; +pub const KVM_S390_VM_CPU_PROCESSOR: u32 = 0; +pub const KVM_S390_VM_CPU_MACHINE: u32 = 1; +pub const KVM_S390_VM_CPU_PROCESSOR_FEAT: u32 = 2; +pub const KVM_S390_VM_CPU_MACHINE_FEAT: u32 = 3; +pub const KVM_S390_VM_CPU_FEAT_NR_BITS: u32 = 1024; +pub const KVM_S390_VM_CPU_FEAT_ESOP: u32 = 0; +pub const KVM_S390_VM_CPU_FEAT_SIEF2: u32 = 1; +pub const KVM_S390_VM_CPU_FEAT_64BSCAO: u32 = 2; +pub const KVM_S390_VM_CPU_FEAT_SIIF: u32 = 3; +pub const KVM_S390_VM_CPU_FEAT_GPERE: u32 = 4; +pub const KVM_S390_VM_CPU_FEAT_GSLS: u32 = 5; +pub const KVM_S390_VM_CPU_FEAT_IB: u32 = 6; +pub const KVM_S390_VM_CPU_FEAT_CEI: u32 = 7; +pub const KVM_S390_VM_CPU_FEAT_IBS: u32 = 8; +pub const KVM_S390_VM_CPU_FEAT_SKEY: u32 = 9; +pub const KVM_S390_VM_CPU_FEAT_CMMA: u32 = 10; +pub const KVM_S390_VM_CPU_FEAT_PFMFI: u32 = 11; +pub const KVM_S390_VM_CPU_FEAT_SIGPIF: u32 = 12; +pub const KVM_S390_VM_CPU_FEAT_KSS: u32 = 13; +pub const KVM_S390_VM_CPU_PROCESSOR_SUBFUNC: u32 = 4; +pub const KVM_S390_VM_CPU_MACHINE_SUBFUNC: u32 = 5; +pub const KVM_S390_VM_CPU_PROCESSOR_UV_FEAT_GUEST: u32 = 6; +pub const KVM_S390_VM_CPU_MACHINE_UV_FEAT_GUEST: u32 = 7; +pub const KVM_S390_VM_CPU_UV_FEAT_NR_BITS: u32 = 64; +pub const KVM_S390_VM_CRYPTO_ENABLE_AES_KW: u32 = 0; +pub const KVM_S390_VM_CRYPTO_ENABLE_DEA_KW: u32 = 1; +pub const KVM_S390_VM_CRYPTO_DISABLE_AES_KW: u32 = 2; +pub const KVM_S390_VM_CRYPTO_DISABLE_DEA_KW: u32 = 3; +pub const KVM_S390_VM_CRYPTO_ENABLE_APIE: u32 = 4; +pub const KVM_S390_VM_CRYPTO_DISABLE_APIE: u32 = 5; +pub const KVM_S390_VM_MIGRATION_STOP: u32 = 0; +pub const KVM_S390_VM_MIGRATION_START: u32 = 1; +pub const KVM_S390_VM_MIGRATION_STATUS: u32 = 2; +pub const KVM_GUESTDBG_USE_HW_BP: u32 = 65536; +pub const KVM_HW_BP: u32 = 1; +pub const KVM_HW_WP_WRITE: u32 = 2; +pub const KVM_SINGLESTEP: u32 = 4; +pub const KVM_S390_PFAULT_TOKEN_INVALID: i32 = -1; +pub const KVM_SYNC_PREFIX: u32 = 1; +pub const KVM_SYNC_GPRS: u32 = 2; +pub const KVM_SYNC_ACRS: u32 = 4; +pub const KVM_SYNC_CRS: u32 = 8; +pub const KVM_SYNC_ARCH0: u32 = 16; +pub const KVM_SYNC_PFAULT: u32 = 32; +pub const KVM_SYNC_VRS: u32 = 64; +pub const KVM_SYNC_RICCB: u32 = 128; +pub const KVM_SYNC_FPRS: u32 = 256; +pub const KVM_SYNC_GSCB: u32 = 512; +pub const KVM_SYNC_BPBC: u32 = 1024; +pub const KVM_SYNC_ETOKEN: u32 = 2048; +pub const KVM_SYNC_DIAG318: u32 = 4096; +pub const KVM_SYNC_S390_VALID_FIELDS: u32 = 8191; +pub const SDNXC: u32 = 8; +pub const SDNXL: u32 = 256; +pub const KVM_API_VERSION: u32 = 12; +pub const KVM_MEM_LOG_DIRTY_PAGES: u32 = 1; +pub const KVM_MEM_READONLY: u32 = 2; +pub const KVM_MEM_GUEST_MEMFD: u32 = 4; +pub const KVM_PIT_SPEAKER_DUMMY: 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_EXIT_LOONGARCH_IOCSR: u32 = 38; +pub const KVM_EXIT_MEMORY_FAULT: u32 = 39; +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_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 KVM_MEMORY_EXIT_FLAG_PRIVATE: u32 = 8; +pub const SYNC_REGS_SIZE_BYTES: u32 = 2048; +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_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 KVMIO: u32 = 174; +pub const KVM_VM_S390_UCONTROL: u32 = 1; +pub const KVM_VM_PPC_HV: u32 = 1; +pub const KVM_VM_PPC_PR: u32 = 2; +pub const KVM_VM_MIPS_AUTO: u32 = 0; +pub const KVM_VM_MIPS_VZ: u32 = 1; +pub const KVM_VM_MIPS_TE: u32 = 2; +pub const KVM_S390_SIE_PAGE_OFFSET: u32 = 1; +pub const KVM_VM_TYPE_ARM_IPA_SIZE_MASK: u32 = 255; +pub const KVM_CAP_IRQCHIP: u32 = 0; +pub const KVM_CAP_HLT: u32 = 1; +pub const KVM_CAP_MMU_SHADOW_CACHE_CONTROL: u32 = 2; +pub const KVM_CAP_USER_MEMORY: u32 = 3; +pub const KVM_CAP_SET_TSS_ADDR: u32 = 4; +pub const KVM_CAP_VAPIC: u32 = 6; +pub const KVM_CAP_EXT_CPUID: u32 = 7; +pub const KVM_CAP_CLOCKSOURCE: u32 = 8; +pub const KVM_CAP_NR_VCPUS: u32 = 9; +pub const KVM_CAP_NR_MEMSLOTS: u32 = 10; +pub const KVM_CAP_PIT: u32 = 11; +pub const KVM_CAP_NOP_IO_DELAY: u32 = 12; +pub const KVM_CAP_PV_MMU: u32 = 13; +pub const KVM_CAP_MP_STATE: u32 = 14; +pub const KVM_CAP_COALESCED_MMIO: u32 = 15; +pub const KVM_CAP_SYNC_MMU: u32 = 16; +pub const KVM_CAP_IOMMU: u32 = 18; +pub const KVM_CAP_DESTROY_MEMORY_REGION_WORKS: u32 = 21; +pub const KVM_CAP_USER_NMI: u32 = 22; +pub const KVM_CAP_SET_GUEST_DEBUG: u32 = 23; +pub const KVM_CAP_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_CAP_ARM_SUPPORTED_REG_MASK_RANGES: u32 = 230; +pub const KVM_CAP_USER_MEMORY2: u32 = 231; +pub const KVM_CAP_MEMORY_FAULT_INFO: u32 = 232; +pub const KVM_CAP_MEMORY_ATTRIBUTES: u32 = 233; +pub const KVM_CAP_GUEST_MEMFD: u32 = 234; +pub const KVM_CAP_VM_TYPES: u32 = 235; +pub const KVM_CAP_PRE_FAULT_MEMORY: u32 = 236; +pub const KVM_CAP_X86_APIC_BUS_CYCLES_NS: u32 = 237; +pub const KVM_CAP_X86_GUEST_MODE: u32 = 238; +pub const KVM_CAP_ARM_WRITABLE_IMP_ID_REGS: u32 = 239; +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_LOONGARCH: i64 = -8070450532247928832; +pub const KVM_REG_SIZE_SHIFT: u32 = 52; +pub const KVM_REG_SIZE_MASK: u64 = 67553994410557440; +pub const KVM_REG_SIZE_U8: u32 = 0; +pub const KVM_REG_SIZE_U16: u64 = 4503599627370496; +pub const KVM_REG_SIZE_U32: u64 = 9007199254740992; +pub const KVM_REG_SIZE_U64: u64 = 13510798882111488; +pub const KVM_REG_SIZE_U128: u64 = 18014398509481984; +pub const KVM_REG_SIZE_U256: u64 = 22517998136852480; +pub const KVM_REG_SIZE_U512: u64 = 27021597764222976; +pub const KVM_REG_SIZE_U1024: u64 = 31525197391593472; +pub const KVM_REG_SIZE_U2048: u64 = 36028797018963968; +pub const KVM_MSI_VALID_DEVID: u32 = 1; +pub const KVM_CREATE_DEVICE_TEST: u32 = 1; +pub const KVM_DEV_VFIO_FILE: u32 = 1; +pub const KVM_DEV_VFIO_FILE_ADD: u32 = 1; +pub const KVM_DEV_VFIO_FILE_DEL: u32 = 2; +pub const KVM_DEV_VFIO_GROUP: u32 = 1; +pub const KVM_DEV_VFIO_GROUP_ADD: u32 = 1; +pub const KVM_DEV_VFIO_GROUP_DEL: u32 = 2; +pub const KVM_DEV_VFIO_GROUP_SET_SPAPR_TCE: u32 = 3; +pub const KVM_S390_STORE_STATUS_NOADDR: i32 = -1; +pub const KVM_S390_STORE_STATUS_PREFIXED: i32 = -2; +pub const KVM_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_MEMORY_ATTRIBUTE_PRIVATE: u32 = 8; +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; +pub type addr_t = ::std::os::raw::c_ulong; +pub type saddr_t = ::std::os::raw::c_long; +#[repr(C, packed(4))] +#[derive(Copy, Clone)] +pub struct __vector128 { + pub __bindgen_anon_1: __vector128__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union __vector128__bindgen_ty_1 { + pub __bindgen_anon_1: __vector128__bindgen_ty_1__bindgen_ty_1, + pub u: [__u32; 4usize], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __vector128__bindgen_ty_1__bindgen_ty_1 { + pub high: __u64, + pub low: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __vector128__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::<__vector128__bindgen_ty_1__bindgen_ty_1>() - 16usize]; + ["Alignment of __vector128__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::<__vector128__bindgen_ty_1__bindgen_ty_1>() - 8usize]; + ["Offset of field: __vector128__bindgen_ty_1__bindgen_ty_1::high"] + [::std::mem::offset_of!(__vector128__bindgen_ty_1__bindgen_ty_1, high) - 0usize]; + ["Offset of field: __vector128__bindgen_ty_1__bindgen_ty_1::low"] + [::std::mem::offset_of!(__vector128__bindgen_ty_1__bindgen_ty_1, low) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __vector128__bindgen_ty_1"] + [::std::mem::size_of::<__vector128__bindgen_ty_1>() - 16usize]; + ["Alignment of __vector128__bindgen_ty_1"] + [::std::mem::align_of::<__vector128__bindgen_ty_1>() - 8usize]; + ["Offset of field: __vector128__bindgen_ty_1::u"] + [::std::mem::offset_of!(__vector128__bindgen_ty_1, u) - 0usize]; +}; +impl Default for __vector128__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 __vector128__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "__vector128__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __vector128"][::std::mem::size_of::<__vector128>() - 16usize]; + ["Alignment of __vector128"][::std::mem::align_of::<__vector128>() - 4usize]; +}; +impl Default for __vector128 { + 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 __vector128 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + // Cannot read `__bindgen_anon_1` through a reference: `__vector128` is + // `repr(C, packed(4))` and the field may be misaligned. + f.write_str("__vector128 { ... }") + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __kernel_fd_set { + pub fds_bits: [::std::os::raw::c_ulong; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fd_set"][::std::mem::size_of::<__kernel_fd_set>() - 128usize]; + ["Alignment of __kernel_fd_set"][::std::mem::align_of::<__kernel_fd_set>() - 8usize]; + ["Offset of field: __kernel_fd_set::fds_bits"] + [::std::mem::offset_of!(__kernel_fd_set, fds_bits) - 0usize]; +}; +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_size_t = ::std::os::raw::c_ulong; +pub type __kernel_ssize_t = ::std::os::raw::c_long; +pub type __kernel_old_dev_t = ::std::os::raw::c_ushort; +pub type __kernel_ino_t = ::std::os::raw::c_uint; +pub type __kernel_mode_t = ::std::os::raw::c_uint; +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_ptrdiff_t = ::std::os::raw::c_long; +pub type __kernel_sigset_t = ::std::os::raw::c_ulong; +pub type __kernel_long_t = ::std::os::raw::c_long; +pub type __kernel_ulong_t = ::std::os::raw::c_ulong; +pub type __kernel_pid_t = ::std::os::raw::c_int; +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; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct __kernel_fsid_t { + pub val: [::std::os::raw::c_int; 2usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __kernel_fsid_t"][::std::mem::size_of::<__kernel_fsid_t>() - 8usize]; + ["Alignment of __kernel_fsid_t"][::std::mem::align_of::<__kernel_fsid_t>() - 4usize]; + ["Offset of field: __kernel_fsid_t::val"] + [::std::mem::offset_of!(__kernel_fsid_t, val) - 0usize]; +}; +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 kvm_s390_skeys { + pub start_gfn: __u64, + pub count: __u64, + pub skeydata_addr: __u64, + pub flags: __u32, + pub reserved: [__u32; 9usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_skeys"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_skeys"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_skeys::start_gfn"] + [::std::mem::offset_of!(kvm_s390_skeys, start_gfn) - 0usize]; + ["Offset of field: kvm_s390_skeys::count"] + [::std::mem::offset_of!(kvm_s390_skeys, count) - 8usize]; + ["Offset of field: kvm_s390_skeys::skeydata_addr"] + [::std::mem::offset_of!(kvm_s390_skeys, skeydata_addr) - 16usize]; + ["Offset of field: kvm_s390_skeys::flags"] + [::std::mem::offset_of!(kvm_s390_skeys, flags) - 24usize]; + ["Offset of field: kvm_s390_skeys::reserved"] + [::std::mem::offset_of!(kvm_s390_skeys, reserved) - 28usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_cmma_log__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_s390_cmma_log__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_cmma_log__bindgen_ty_1::remaining"] + [::std::mem::offset_of!(kvm_s390_cmma_log__bindgen_ty_1, remaining) - 0usize]; + ["Offset of field: kvm_s390_cmma_log__bindgen_ty_1::mask"] + [::std::mem::offset_of!(kvm_s390_cmma_log__bindgen_ty_1, mask) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_cmma_log"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_s390_cmma_log"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_cmma_log::start_gfn"] + [::std::mem::offset_of!(kvm_s390_cmma_log, start_gfn) - 0usize]; + ["Offset of field: kvm_s390_cmma_log::count"] + [::std::mem::offset_of!(kvm_s390_cmma_log, count) - 8usize]; + ["Offset of field: kvm_s390_cmma_log::flags"] + [::std::mem::offset_of!(kvm_s390_cmma_log, flags) - 12usize]; + ["Offset of field: kvm_s390_cmma_log::values"] + [::std::mem::offset_of!(kvm_s390_cmma_log, values) - 24usize]; +}; +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_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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1::ar"] + [::std::mem::offset_of!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1, ar) - 0usize]; + ["Offset of field: kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1::key"] + [::std::mem::offset_of!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1, key) - 1usize]; + ["Offset of field: kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1::pad1"] + [::std::mem::offset_of!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1, pad1) - 2usize]; + ["Offset of field: kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1::old_addr"] + [::std::mem::offset_of!(kvm_s390_mem_op__bindgen_ty_1__bindgen_ty_1, old_addr) - 8usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_mem_op__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_s390_mem_op__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_mem_op__bindgen_ty_1::sida_offset"] + [::std::mem::offset_of!(kvm_s390_mem_op__bindgen_ty_1, sida_offset) - 0usize]; + ["Offset of field: kvm_s390_mem_op__bindgen_ty_1::reserved"] + [::std::mem::offset_of!(kvm_s390_mem_op__bindgen_ty_1, reserved) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_mem_op"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_mem_op"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_mem_op::gaddr"] + [::std::mem::offset_of!(kvm_s390_mem_op, gaddr) - 0usize]; + ["Offset of field: kvm_s390_mem_op::flags"] + [::std::mem::offset_of!(kvm_s390_mem_op, flags) - 8usize]; + ["Offset of field: kvm_s390_mem_op::size"] + [::std::mem::offset_of!(kvm_s390_mem_op, size) - 16usize]; + ["Offset of field: kvm_s390_mem_op::op"][::std::mem::offset_of!(kvm_s390_mem_op, op) - 20usize]; + ["Offset of field: kvm_s390_mem_op::buf"] + [::std::mem::offset_of!(kvm_s390_mem_op, buf) - 24usize]; +}; +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_s390_psw { + pub mask: __u64, + pub addr: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_psw"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_psw"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_psw::mask"][::std::mem::offset_of!(kvm_s390_psw, mask) - 0usize]; + ["Offset of field: kvm_s390_psw::addr"][::std::mem::offset_of!(kvm_s390_psw, addr) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_interrupt { + pub type_: __u32, + pub parm: __u32, + pub parm64: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_interrupt"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_interrupt"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_interrupt::type_"] + [::std::mem::offset_of!(kvm_s390_interrupt, type_) - 0usize]; + ["Offset of field: kvm_s390_interrupt::parm"] + [::std::mem::offset_of!(kvm_s390_interrupt, parm) - 4usize]; + ["Offset of field: kvm_s390_interrupt::parm64"] + [::std::mem::offset_of!(kvm_s390_interrupt, parm64) - 8usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_io_info"][::std::mem::size_of::() - 12usize]; + ["Alignment of kvm_s390_io_info"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_s390_io_info::subchannel_id"] + [::std::mem::offset_of!(kvm_s390_io_info, subchannel_id) - 0usize]; + ["Offset of field: kvm_s390_io_info::subchannel_nr"] + [::std::mem::offset_of!(kvm_s390_io_info, subchannel_nr) - 2usize]; + ["Offset of field: kvm_s390_io_info::io_int_parm"] + [::std::mem::offset_of!(kvm_s390_io_info, io_int_parm) - 4usize]; + ["Offset of field: kvm_s390_io_info::io_int_word"] + [::std::mem::offset_of!(kvm_s390_io_info, io_int_word) - 8usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_ext_info"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_ext_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_ext_info::ext_params"] + [::std::mem::offset_of!(kvm_s390_ext_info, ext_params) - 0usize]; + ["Offset of field: kvm_s390_ext_info::pad"] + [::std::mem::offset_of!(kvm_s390_ext_info, pad) - 4usize]; + ["Offset of field: kvm_s390_ext_info::ext_params2"] + [::std::mem::offset_of!(kvm_s390_ext_info, ext_params2) - 8usize]; +}; +#[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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pgm_info"][::std::mem::size_of::() - 40usize]; + ["Alignment of kvm_s390_pgm_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pgm_info::trans_exc_code"] + [::std::mem::offset_of!(kvm_s390_pgm_info, trans_exc_code) - 0usize]; + ["Offset of field: kvm_s390_pgm_info::mon_code"] + [::std::mem::offset_of!(kvm_s390_pgm_info, mon_code) - 8usize]; + ["Offset of field: kvm_s390_pgm_info::per_address"] + [::std::mem::offset_of!(kvm_s390_pgm_info, per_address) - 16usize]; + ["Offset of field: kvm_s390_pgm_info::data_exc_code"] + [::std::mem::offset_of!(kvm_s390_pgm_info, data_exc_code) - 24usize]; + ["Offset of field: kvm_s390_pgm_info::code"] + [::std::mem::offset_of!(kvm_s390_pgm_info, code) - 28usize]; + ["Offset of field: kvm_s390_pgm_info::mon_class_nr"] + [::std::mem::offset_of!(kvm_s390_pgm_info, mon_class_nr) - 30usize]; + ["Offset of field: kvm_s390_pgm_info::per_code"] + [::std::mem::offset_of!(kvm_s390_pgm_info, per_code) - 32usize]; + ["Offset of field: kvm_s390_pgm_info::per_atmid"] + [::std::mem::offset_of!(kvm_s390_pgm_info, per_atmid) - 33usize]; + ["Offset of field: kvm_s390_pgm_info::exc_access_id"] + [::std::mem::offset_of!(kvm_s390_pgm_info, exc_access_id) - 34usize]; + ["Offset of field: kvm_s390_pgm_info::per_access_id"] + [::std::mem::offset_of!(kvm_s390_pgm_info, per_access_id) - 35usize]; + ["Offset of field: kvm_s390_pgm_info::op_access_id"] + [::std::mem::offset_of!(kvm_s390_pgm_info, op_access_id) - 36usize]; + ["Offset of field: kvm_s390_pgm_info::flags"] + [::std::mem::offset_of!(kvm_s390_pgm_info, flags) - 37usize]; + ["Offset of field: kvm_s390_pgm_info::pad"] + [::std::mem::offset_of!(kvm_s390_pgm_info, pad) - 38usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_prefix_info { + pub address: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_prefix_info"][::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_s390_prefix_info"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_s390_prefix_info::address"] + [::std::mem::offset_of!(kvm_s390_prefix_info, address) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_extcall_info { + pub code: __u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_extcall_info"][::std::mem::size_of::() - 2usize]; + ["Alignment of kvm_s390_extcall_info"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: kvm_s390_extcall_info::code"] + [::std::mem::offset_of!(kvm_s390_extcall_info, code) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_emerg_info { + pub code: __u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_emerg_info"][::std::mem::size_of::() - 2usize]; + ["Alignment of kvm_s390_emerg_info"][::std::mem::align_of::() - 2usize]; + ["Offset of field: kvm_s390_emerg_info::code"] + [::std::mem::offset_of!(kvm_s390_emerg_info, code) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_stop_info { + pub flags: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_stop_info"][::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_s390_stop_info"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_s390_stop_info::flags"] + [::std::mem::offset_of!(kvm_s390_stop_info, flags) - 0usize]; +}; +#[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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_mchk_info"][::std::mem::size_of::() - 48usize]; + ["Alignment of kvm_s390_mchk_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_mchk_info::cr14"] + [::std::mem::offset_of!(kvm_s390_mchk_info, cr14) - 0usize]; + ["Offset of field: kvm_s390_mchk_info::mcic"] + [::std::mem::offset_of!(kvm_s390_mchk_info, mcic) - 8usize]; + ["Offset of field: kvm_s390_mchk_info::failing_storage_address"] + [::std::mem::offset_of!(kvm_s390_mchk_info, failing_storage_address) - 16usize]; + ["Offset of field: kvm_s390_mchk_info::ext_damage_code"] + [::std::mem::offset_of!(kvm_s390_mchk_info, ext_damage_code) - 24usize]; + ["Offset of field: kvm_s390_mchk_info::pad"] + [::std::mem::offset_of!(kvm_s390_mchk_info, pad) - 28usize]; + ["Offset of field: kvm_s390_mchk_info::fixed_logout"] + [::std::mem::offset_of!(kvm_s390_mchk_info, fixed_logout) - 32usize]; +}; +#[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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_irq__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_irq__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::io"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, io) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::ext"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, ext) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::pgm"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, pgm) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::emerg"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, emerg) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::extcall"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, extcall) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::prefix"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, prefix) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::stop"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, stop) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::mchk"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, mchk) - 0usize]; + ["Offset of field: kvm_s390_irq__bindgen_ty_1::reserved"] + [::std::mem::offset_of!(kvm_s390_irq__bindgen_ty_1, reserved) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_irq"][::std::mem::size_of::() - 72usize]; + ["Alignment of kvm_s390_irq"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_irq::type_"][::std::mem::offset_of!(kvm_s390_irq, type_) - 0usize]; + ["Offset of field: kvm_s390_irq::u"][::std::mem::offset_of!(kvm_s390_irq, u) - 8usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_irq_state"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_s390_irq_state"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_irq_state::buf"] + [::std::mem::offset_of!(kvm_s390_irq_state, buf) - 0usize]; + ["Offset of field: kvm_s390_irq_state::flags"] + [::std::mem::offset_of!(kvm_s390_irq_state, flags) - 8usize]; + ["Offset of field: kvm_s390_irq_state::len"] + [::std::mem::offset_of!(kvm_s390_irq_state, len) - 12usize]; + ["Offset of field: kvm_s390_irq_state::reserved"] + [::std::mem::offset_of!(kvm_s390_irq_state, reserved) - 16usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_ucas_mapping"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_s390_ucas_mapping"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_ucas_mapping::user_addr"] + [::std::mem::offset_of!(kvm_s390_ucas_mapping, user_addr) - 0usize]; + ["Offset of field: kvm_s390_ucas_mapping::vcpu_addr"] + [::std::mem::offset_of!(kvm_s390_ucas_mapping, vcpu_addr) - 8usize]; + ["Offset of field: kvm_s390_ucas_mapping::length"] + [::std::mem::offset_of!(kvm_s390_ucas_mapping, length) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_sec_parm { + pub origin: __u64, + pub length: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_sec_parm"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_pv_sec_parm"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_sec_parm::origin"] + [::std::mem::offset_of!(kvm_s390_pv_sec_parm, origin) - 0usize]; + ["Offset of field: kvm_s390_pv_sec_parm::length"] + [::std::mem::offset_of!(kvm_s390_pv_sec_parm, length) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_pv_unp { + pub addr: __u64, + pub size: __u64, + pub tweak: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_unp"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_s390_pv_unp"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_unp::addr"] + [::std::mem::offset_of!(kvm_s390_pv_unp, addr) - 0usize]; + ["Offset of field: kvm_s390_pv_unp::size"] + [::std::mem::offset_of!(kvm_s390_pv_unp, size) - 8usize]; + ["Offset of field: kvm_s390_pv_unp::tweak"] + [::std::mem::offset_of!(kvm_s390_pv_unp, tweak) - 16usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_dmp"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_pv_dmp"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_dmp::subcmd"] + [::std::mem::offset_of!(kvm_s390_pv_dmp, subcmd) - 0usize]; + ["Offset of field: kvm_s390_pv_dmp::buff_addr"] + [::std::mem::offset_of!(kvm_s390_pv_dmp, buff_addr) - 8usize]; + ["Offset of field: kvm_s390_pv_dmp::buff_len"] + [::std::mem::offset_of!(kvm_s390_pv_dmp, buff_len) - 16usize]; + ["Offset of field: kvm_s390_pv_dmp::gaddr"] + [::std::mem::offset_of!(kvm_s390_pv_dmp, gaddr) - 24usize]; + ["Offset of field: kvm_s390_pv_dmp::reserved"] + [::std::mem::offset_of!(kvm_s390_pv_dmp, reserved) - 32usize]; +}; +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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_info_dump"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_s390_pv_info_dump"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_info_dump::dump_cpu_buffer_len"] + [::std::mem::offset_of!(kvm_s390_pv_info_dump, dump_cpu_buffer_len) - 0usize]; + ["Offset of field: kvm_s390_pv_info_dump::dump_config_mem_buffer_per_1m"] + [::std::mem::offset_of!(kvm_s390_pv_info_dump, dump_config_mem_buffer_per_1m) - 8usize]; + ["Offset of field: kvm_s390_pv_info_dump::dump_config_finalize_len"] + [::std::mem::offset_of!(kvm_s390_pv_info_dump, dump_config_finalize_len) - 16usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_info_vm"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_pv_info_vm"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_info_vm::inst_calls_list"] + [::std::mem::offset_of!(kvm_s390_pv_info_vm, inst_calls_list) - 0usize]; + ["Offset of field: kvm_s390_pv_info_vm::max_cpus"] + [::std::mem::offset_of!(kvm_s390_pv_info_vm, max_cpus) - 32usize]; + ["Offset of field: kvm_s390_pv_info_vm::max_guests"] + [::std::mem::offset_of!(kvm_s390_pv_info_vm, max_guests) - 40usize]; + ["Offset of field: kvm_s390_pv_info_vm::max_guest_addr"] + [::std::mem::offset_of!(kvm_s390_pv_info_vm, max_guest_addr) - 48usize]; + ["Offset of field: kvm_s390_pv_info_vm::feature_indication"] + [::std::mem::offset_of!(kvm_s390_pv_info_vm, feature_indication) - 56usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_info_header"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_pv_info_header"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_s390_pv_info_header::id"] + [::std::mem::offset_of!(kvm_s390_pv_info_header, id) - 0usize]; + ["Offset of field: kvm_s390_pv_info_header::len_max"] + [::std::mem::offset_of!(kvm_s390_pv_info_header, len_max) - 4usize]; + ["Offset of field: kvm_s390_pv_info_header::len_written"] + [::std::mem::offset_of!(kvm_s390_pv_info_header, len_written) - 8usize]; + ["Offset of field: kvm_s390_pv_info_header::reserved"] + [::std::mem::offset_of!(kvm_s390_pv_info_header, reserved) - 12usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_info__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_pv_info__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_info__bindgen_ty_1::dump"] + [::std::mem::offset_of!(kvm_s390_pv_info__bindgen_ty_1, dump) - 0usize]; + ["Offset of field: kvm_s390_pv_info__bindgen_ty_1::vm"] + [::std::mem::offset_of!(kvm_s390_pv_info__bindgen_ty_1, vm) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_pv_info"][::std::mem::size_of::() - 80usize]; + ["Alignment of kvm_s390_pv_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_pv_info::header"] + [::std::mem::offset_of!(kvm_s390_pv_info, header) - 0usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_pv_cmd"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_pv_cmd"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_pv_cmd::cmd"][::std::mem::offset_of!(kvm_pv_cmd, cmd) - 0usize]; + ["Offset of field: kvm_pv_cmd::rc"][::std::mem::offset_of!(kvm_pv_cmd, rc) - 4usize]; + ["Offset of field: kvm_pv_cmd::rrc"][::std::mem::offset_of!(kvm_pv_cmd, rrc) - 6usize]; + ["Offset of field: kvm_pv_cmd::data"][::std::mem::offset_of!(kvm_pv_cmd, data) - 8usize]; + ["Offset of field: kvm_pv_cmd::flags"][::std::mem::offset_of!(kvm_pv_cmd, flags) - 16usize]; + ["Offset of field: kvm_pv_cmd::reserved"] + [::std::mem::offset_of!(kvm_pv_cmd, reserved) - 20usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::ibv"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, ibv) - 0usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::sb"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, sb) - 8usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::flags"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, flags) - 16usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::noi"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, noi) - 20usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::isc"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, isc) - 24usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::sbo"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, sbo) - 25usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1::pad"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1__bindgen_ty_1, pad) - 26usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_zpci_op__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_s390_zpci_op__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1::reg_aen"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1, reg_aen) - 0usize]; + ["Offset of field: kvm_s390_zpci_op__bindgen_ty_1::reserved"] + [::std::mem::offset_of!(kvm_s390_zpci_op__bindgen_ty_1, reserved) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_zpci_op"][::std::mem::size_of::() - 72usize]; + ["Alignment of kvm_s390_zpci_op"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_zpci_op::fh"] + [::std::mem::offset_of!(kvm_s390_zpci_op, fh) - 0usize]; + ["Offset of field: kvm_s390_zpci_op::op"] + [::std::mem::offset_of!(kvm_s390_zpci_op, op) - 4usize]; + ["Offset of field: kvm_s390_zpci_op::pad"] + [::std::mem::offset_of!(kvm_s390_zpci_op, pad) - 5usize]; + ["Offset of field: kvm_s390_zpci_op::u"][::std::mem::offset_of!(kvm_s390_zpci_op, u) - 8usize]; +}; +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 + ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_io_adapter { + pub id: __u32, + pub isc: __u8, + pub maskable: __u8, + pub swap: __u8, + pub flags: __u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_io_adapter"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_s390_io_adapter"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_s390_io_adapter::id"] + [::std::mem::offset_of!(kvm_s390_io_adapter, id) - 0usize]; + ["Offset of field: kvm_s390_io_adapter::isc"] + [::std::mem::offset_of!(kvm_s390_io_adapter, isc) - 4usize]; + ["Offset of field: kvm_s390_io_adapter::maskable"] + [::std::mem::offset_of!(kvm_s390_io_adapter, maskable) - 5usize]; + ["Offset of field: kvm_s390_io_adapter::swap"] + [::std::mem::offset_of!(kvm_s390_io_adapter, swap) - 6usize]; + ["Offset of field: kvm_s390_io_adapter::flags"] + [::std::mem::offset_of!(kvm_s390_io_adapter, flags) - 7usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_ais_req { + pub isc: __u8, + pub mode: __u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_ais_req"][::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_s390_ais_req"][::std::mem::align_of::() - 2usize]; + ["Offset of field: kvm_s390_ais_req::isc"] + [::std::mem::offset_of!(kvm_s390_ais_req, isc) - 0usize]; + ["Offset of field: kvm_s390_ais_req::mode"] + [::std::mem::offset_of!(kvm_s390_ais_req, mode) - 2usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_ais_all { + pub simm: __u8, + pub nimm: __u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_ais_all"][::std::mem::size_of::() - 2usize]; + ["Alignment of kvm_s390_ais_all"][::std::mem::align_of::() - 1usize]; + ["Offset of field: kvm_s390_ais_all::simm"] + [::std::mem::offset_of!(kvm_s390_ais_all, simm) - 0usize]; + ["Offset of field: kvm_s390_ais_all::nimm"] + [::std::mem::offset_of!(kvm_s390_ais_all, nimm) - 1usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_io_adapter_req { + pub id: __u32, + pub type_: __u8, + pub mask: __u8, + pub pad0: __u16, + pub addr: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_io_adapter_req"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_io_adapter_req"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_io_adapter_req::id"] + [::std::mem::offset_of!(kvm_s390_io_adapter_req, id) - 0usize]; + ["Offset of field: kvm_s390_io_adapter_req::type_"] + [::std::mem::offset_of!(kvm_s390_io_adapter_req, type_) - 4usize]; + ["Offset of field: kvm_s390_io_adapter_req::mask"] + [::std::mem::offset_of!(kvm_s390_io_adapter_req, mask) - 5usize]; + ["Offset of field: kvm_s390_io_adapter_req::pad0"] + [::std::mem::offset_of!(kvm_s390_io_adapter_req, pad0) - 6usize]; + ["Offset of field: kvm_s390_io_adapter_req::addr"] + [::std::mem::offset_of!(kvm_s390_io_adapter_req, addr) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_vm_tod_clock { + pub epoch_idx: __u8, + pub tod: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_tod_clock"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_s390_vm_tod_clock"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_vm_tod_clock::epoch_idx"] + [::std::mem::offset_of!(kvm_s390_vm_tod_clock, epoch_idx) - 0usize]; + ["Offset of field: kvm_s390_vm_tod_clock::tod"] + [::std::mem::offset_of!(kvm_s390_vm_tod_clock, tod) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_s390_vm_cpu_processor { + pub cpuid: __u64, + pub ibc: __u16, + pub pad: [__u8; 6usize], + pub fac_list: [__u64; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_processor"] + [::std::mem::size_of::() - 2064usize]; + ["Alignment of kvm_s390_vm_cpu_processor"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_vm_cpu_processor::cpuid"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_processor, cpuid) - 0usize]; + ["Offset of field: kvm_s390_vm_cpu_processor::ibc"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_processor, ibc) - 8usize]; + ["Offset of field: kvm_s390_vm_cpu_processor::pad"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_processor, pad) - 10usize]; + ["Offset of field: kvm_s390_vm_cpu_processor::fac_list"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_processor, fac_list) - 16usize]; +}; +impl Default for kvm_s390_vm_cpu_processor { + 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_s390_vm_cpu_machine { + pub cpuid: __u64, + pub ibc: __u32, + pub pad: [__u8; 4usize], + pub fac_mask: [__u64; 256usize], + pub fac_list: [__u64; 256usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_machine"] + [::std::mem::size_of::() - 4112usize]; + ["Alignment of kvm_s390_vm_cpu_machine"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_vm_cpu_machine::cpuid"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_machine, cpuid) - 0usize]; + ["Offset of field: kvm_s390_vm_cpu_machine::ibc"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_machine, ibc) - 8usize]; + ["Offset of field: kvm_s390_vm_cpu_machine::pad"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_machine, pad) - 12usize]; + ["Offset of field: kvm_s390_vm_cpu_machine::fac_mask"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_machine, fac_mask) - 16usize]; + ["Offset of field: kvm_s390_vm_cpu_machine::fac_list"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_machine, fac_list) - 2064usize]; +}; +impl Default for kvm_s390_vm_cpu_machine { + 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_s390_vm_cpu_feat { + pub feat: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_feat"][::std::mem::size_of::() - 128usize]; + ["Alignment of kvm_s390_vm_cpu_feat"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_vm_cpu_feat::feat"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_feat, feat) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_s390_vm_cpu_subfunc { + pub plo: [__u8; 32usize], + pub ptff: [__u8; 16usize], + pub kmac: [__u8; 16usize], + pub kmc: [__u8; 16usize], + pub km: [__u8; 16usize], + pub kimd: [__u8; 16usize], + pub klmd: [__u8; 16usize], + pub pckmo: [__u8; 16usize], + pub kmctr: [__u8; 16usize], + pub kmf: [__u8; 16usize], + pub kmo: [__u8; 16usize], + pub pcc: [__u8; 16usize], + pub ppno: [__u8; 16usize], + pub kma: [__u8; 16usize], + pub kdsa: [__u8; 16usize], + pub sortl: [__u8; 32usize], + pub dfltcc: [__u8; 32usize], + pub pfcr: [__u8; 16usize], + pub reserved: [__u8; 1712usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_subfunc"] + [::std::mem::size_of::() - 2048usize]; + ["Alignment of kvm_s390_vm_cpu_subfunc"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::plo"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, plo) - 0usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::ptff"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, ptff) - 32usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kmac"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kmac) - 48usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kmc"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kmc) - 64usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::km"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, km) - 80usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kimd"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kimd) - 96usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::klmd"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, klmd) - 112usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::pckmo"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, pckmo) - 128usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kmctr"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kmctr) - 144usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kmf"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kmf) - 160usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kmo"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kmo) - 176usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::pcc"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, pcc) - 192usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::ppno"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, ppno) - 208usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kma"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kma) - 224usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::kdsa"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, kdsa) - 240usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::sortl"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, sortl) - 256usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::dfltcc"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, dfltcc) - 288usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::pfcr"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, pfcr) - 320usize]; + ["Offset of field: kvm_s390_vm_cpu_subfunc::reserved"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_subfunc, reserved) - 336usize]; +}; +impl Default for kvm_s390_vm_cpu_subfunc { + 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(Copy, Clone)] +pub struct kvm_s390_vm_cpu_uv_feat { + pub __bindgen_anon_1: kvm_s390_vm_cpu_uv_feat__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_s390_vm_cpu_uv_feat__bindgen_ty_1 { + pub __bindgen_anon_1: kvm_s390_vm_cpu_uv_feat__bindgen_ty_1__bindgen_ty_1, + pub feat: __u64, +} +#[repr(C)] +#[repr(align(8))] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_s390_vm_cpu_uv_feat__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_uv_feat__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_s390_vm_cpu_uv_feat__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; +}; +impl kvm_s390_vm_cpu_uv_feat__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn ap(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_ap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ap_raw(this: *const Self) -> __u64 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ap_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn ap_intr(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_ap_intr(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn ap_intr_raw(this: *const Self) -> __u64 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u64) + } + } + #[inline] + pub unsafe fn set_ap_intr_raw(this: *mut Self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(ap: __u64, ap_intr: __u64) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let ap: u64 = unsafe { ::std::mem::transmute(ap) }; + ap as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let ap_intr: u64 = unsafe { ::std::mem::transmute(ap_intr) }; + ap_intr as u64 + }); + __bindgen_bitfield_unit + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_uv_feat__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_s390_vm_cpu_uv_feat__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_s390_vm_cpu_uv_feat__bindgen_ty_1::feat"] + [::std::mem::offset_of!(kvm_s390_vm_cpu_uv_feat__bindgen_ty_1, feat) - 0usize]; +}; +impl Default for kvm_s390_vm_cpu_uv_feat__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_vm_cpu_uv_feat__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_s390_vm_cpu_uv_feat__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_s390_vm_cpu_uv_feat"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_s390_vm_cpu_uv_feat"] + [::std::mem::align_of::() - 8usize]; +}; +impl Default for kvm_s390_vm_cpu_uv_feat { + 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_vm_cpu_uv_feat { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_s390_vm_cpu_uv_feat {{ __bindgen_anon_1: {:?} }}", + self.__bindgen_anon_1 + ) + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_regs { + pub gprs: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_regs"][::std::mem::size_of::() - 128usize]; + ["Alignment of kvm_regs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_regs::gprs"][::std::mem::offset_of!(kvm_regs, gprs) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sregs { + pub acrs: [__u32; 16usize], + pub crs: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_sregs"][::std::mem::size_of::() - 192usize]; + ["Alignment of kvm_sregs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_sregs::acrs"][::std::mem::offset_of!(kvm_sregs, acrs) - 0usize]; + ["Offset of field: kvm_sregs::crs"][::std::mem::offset_of!(kvm_sregs, crs) - 64usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_fpu { + pub fpc: __u32, + pub fprs: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_fpu"][::std::mem::size_of::() - 136usize]; + ["Alignment of kvm_fpu"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_fpu::fpc"][::std::mem::offset_of!(kvm_fpu, fpc) - 0usize]; + ["Offset of field: kvm_fpu::fprs"][::std::mem::offset_of!(kvm_fpu, fprs) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_debug_exit_arch { + pub addr: __u64, + pub type_: __u8, + pub pad: [__u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_debug_exit_arch"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_debug_exit_arch"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_debug_exit_arch::addr"] + [::std::mem::offset_of!(kvm_debug_exit_arch, addr) - 0usize]; + ["Offset of field: kvm_debug_exit_arch::type_"] + [::std::mem::offset_of!(kvm_debug_exit_arch, type_) - 8usize]; + ["Offset of field: kvm_debug_exit_arch::pad"] + [::std::mem::offset_of!(kvm_debug_exit_arch, pad) - 9usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_hw_breakpoint { + pub addr: __u64, + pub phys_addr: __u64, + pub len: __u64, + pub type_: __u8, + pub pad: [__u8; 7usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_hw_breakpoint"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_hw_breakpoint"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_hw_breakpoint::addr"] + [::std::mem::offset_of!(kvm_hw_breakpoint, addr) - 0usize]; + ["Offset of field: kvm_hw_breakpoint::phys_addr"] + [::std::mem::offset_of!(kvm_hw_breakpoint, phys_addr) - 8usize]; + ["Offset of field: kvm_hw_breakpoint::len"] + [::std::mem::offset_of!(kvm_hw_breakpoint, len) - 16usize]; + ["Offset of field: kvm_hw_breakpoint::type_"] + [::std::mem::offset_of!(kvm_hw_breakpoint, type_) - 24usize]; + ["Offset of field: kvm_hw_breakpoint::pad"] + [::std::mem::offset_of!(kvm_hw_breakpoint, pad) - 25usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_guest_debug_arch { + pub nr_hw_bp: __u32, + pub pad: __u32, + pub hw_bp: *mut kvm_hw_breakpoint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_guest_debug_arch"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_guest_debug_arch"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_guest_debug_arch::nr_hw_bp"] + [::std::mem::offset_of!(kvm_guest_debug_arch, nr_hw_bp) - 0usize]; + ["Offset of field: kvm_guest_debug_arch::pad"] + [::std::mem::offset_of!(kvm_guest_debug_arch, pad) - 4usize]; + ["Offset of field: kvm_guest_debug_arch::hw_bp"] + [::std::mem::offset_of!(kvm_guest_debug_arch, hw_bp) - 8usize]; +}; +impl Default for kvm_guest_debug_arch { + 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(Copy, Clone)] +pub struct kvm_sync_regs { + pub prefix: __u64, + pub gprs: [__u64; 16usize], + pub acrs: [__u32; 16usize], + pub crs: [__u64; 16usize], + pub todpr: __u64, + pub cputm: __u64, + pub ckc: __u64, + pub pp: __u64, + pub gbea: __u64, + pub pft: __u64, + pub pfs: __u64, + pub pfc: __u64, + pub __bindgen_anon_1: kvm_sync_regs__bindgen_ty_1, + pub reserved: [__u8; 512usize], + pub fpc: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub padding1: [__u8; 51usize], + pub riccb: [__u8; 64usize], + pub diag318: __u64, + pub padding2: [__u8; 184usize], + pub __bindgen_anon_2: kvm_sync_regs__bindgen_ty_2, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_sync_regs__bindgen_ty_1 { + pub vrs: [[__u64; 2usize]; 32usize], + pub fprs: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_sync_regs__bindgen_ty_1"] + [::std::mem::size_of::() - 512usize]; + ["Alignment of kvm_sync_regs__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_1::vrs"] + [::std::mem::offset_of!(kvm_sync_regs__bindgen_ty_1, vrs) - 0usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_1::fprs"] + [::std::mem::offset_of!(kvm_sync_regs__bindgen_ty_1, fprs) - 0usize]; +}; +impl Default for kvm_sync_regs__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_sync_regs__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_sync_regs__bindgen_ty_1 {{ union }}") + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_sync_regs__bindgen_ty_2 { + pub sdnx: [__u8; 256usize], + pub __bindgen_anon_1: kvm_sync_regs__bindgen_ty_2__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_sync_regs__bindgen_ty_2__bindgen_ty_1 { + pub reserved1: [__u64; 2usize], + pub gscb: [__u64; 4usize], + pub etoken: __u64, + pub etoken_extension: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_sync_regs__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_sync_regs__bindgen_ty_2__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_2__bindgen_ty_1::reserved1"] + [::std::mem::offset_of!(kvm_sync_regs__bindgen_ty_2__bindgen_ty_1, reserved1) - 0usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_2__bindgen_ty_1::gscb"] + [::std::mem::offset_of!(kvm_sync_regs__bindgen_ty_2__bindgen_ty_1, gscb) - 16usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_2__bindgen_ty_1::etoken"] + [::std::mem::offset_of!(kvm_sync_regs__bindgen_ty_2__bindgen_ty_1, etoken) - 48usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_2__bindgen_ty_1::etoken_extension"][::std::mem::offset_of!( + kvm_sync_regs__bindgen_ty_2__bindgen_ty_1, + etoken_extension + ) - 56usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_sync_regs__bindgen_ty_2"] + [::std::mem::size_of::() - 256usize]; + ["Alignment of kvm_sync_regs__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_sync_regs__bindgen_ty_2::sdnx"] + [::std::mem::offset_of!(kvm_sync_regs__bindgen_ty_2, sdnx) - 0usize]; +}; +impl Default for kvm_sync_regs__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_sync_regs__bindgen_ty_2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "kvm_sync_regs__bindgen_ty_2 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_sync_regs"][::std::mem::size_of::() - 1984usize]; + ["Alignment of kvm_sync_regs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_sync_regs::prefix"] + [::std::mem::offset_of!(kvm_sync_regs, prefix) - 0usize]; + ["Offset of field: kvm_sync_regs::gprs"][::std::mem::offset_of!(kvm_sync_regs, gprs) - 8usize]; + ["Offset of field: kvm_sync_regs::acrs"] + [::std::mem::offset_of!(kvm_sync_regs, acrs) - 136usize]; + ["Offset of field: kvm_sync_regs::crs"][::std::mem::offset_of!(kvm_sync_regs, crs) - 200usize]; + ["Offset of field: kvm_sync_regs::todpr"] + [::std::mem::offset_of!(kvm_sync_regs, todpr) - 328usize]; + ["Offset of field: kvm_sync_regs::cputm"] + [::std::mem::offset_of!(kvm_sync_regs, cputm) - 336usize]; + ["Offset of field: kvm_sync_regs::ckc"][::std::mem::offset_of!(kvm_sync_regs, ckc) - 344usize]; + ["Offset of field: kvm_sync_regs::pp"][::std::mem::offset_of!(kvm_sync_regs, pp) - 352usize]; + ["Offset of field: kvm_sync_regs::gbea"] + [::std::mem::offset_of!(kvm_sync_regs, gbea) - 360usize]; + ["Offset of field: kvm_sync_regs::pft"][::std::mem::offset_of!(kvm_sync_regs, pft) - 368usize]; + ["Offset of field: kvm_sync_regs::pfs"][::std::mem::offset_of!(kvm_sync_regs, pfs) - 376usize]; + ["Offset of field: kvm_sync_regs::pfc"][::std::mem::offset_of!(kvm_sync_regs, pfc) - 384usize]; + ["Offset of field: kvm_sync_regs::reserved"] + [::std::mem::offset_of!(kvm_sync_regs, reserved) - 904usize]; + ["Offset of field: kvm_sync_regs::fpc"][::std::mem::offset_of!(kvm_sync_regs, fpc) - 1416usize]; + ["Offset of field: kvm_sync_regs::padding1"] + [::std::mem::offset_of!(kvm_sync_regs, padding1) - 1421usize]; + ["Offset of field: kvm_sync_regs::riccb"] + [::std::mem::offset_of!(kvm_sync_regs, riccb) - 1472usize]; + ["Offset of field: kvm_sync_regs::diag318"] + [::std::mem::offset_of!(kvm_sync_regs, diag318) - 1536usize]; + ["Offset of field: kvm_sync_regs::padding2"] + [::std::mem::offset_of!(kvm_sync_regs, padding2) - 1544usize]; +}; +impl Default for kvm_sync_regs { + 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_sync_regs { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_sync_regs {{ prefix: {:?}, gprs: {:?}, acrs: {:?}, crs: {:?}, todpr: {:?}, cputm: {:?}, ckc: {:?}, pp: {:?}, gbea: {:?}, pft: {:?}, pfs: {:?}, pfc: {:?}, __bindgen_anon_1: {:?}, reserved: {:?}, fpc: {:?}, bpbc : {:?}, reserved2 : {:?}, padding1: {:?}, riccb: {:?}, diag318: {:?}, padding2: {:?}, __bindgen_anon_2: {:?} }}", + self.prefix, + self.gprs, + self.acrs, + self.crs, + self.todpr, + self.cputm, + self.ckc, + self.pp, + self.gbea, + self.pft, + self.pfs, + self.pfc, + self.__bindgen_anon_1, + self.reserved, + self.fpc, + self.bpbc(), + self.reserved2(), + self.padding1, + self.riccb, + self.diag318, + self.padding2, + self.__bindgen_anon_2 + ) + } +} +impl kvm_sync_regs { + #[inline] + pub fn bpbc(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_bpbc(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn bpbc_raw(this: *const Self) -> __u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_bpbc_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn reserved2(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u8) } + } + #[inline] + pub fn set_reserved2(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 7u8, val as u64) + } + } + #[inline] + pub unsafe fn reserved2_raw(this: *const Self) -> __u8 { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 1usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 7u8, + ) as u8) + } + } + #[inline] + pub unsafe fn set_reserved2_raw(this: *mut Self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 1usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 7u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(bpbc: __u8, reserved2: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let bpbc: u8 = unsafe { ::std::mem::transmute(bpbc) }; + bpbc as u64 + }); + __bindgen_bitfield_unit.set(1usize, 7u8, { + let reserved2: u8 = unsafe { ::std::mem::transmute(reserved2) }; + reserved2 as u64 + }); + __bindgen_bitfield_unit + } +} +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_userspace_memory_region"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_userspace_memory_region"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_userspace_memory_region::slot"] + [::std::mem::offset_of!(kvm_userspace_memory_region, slot) - 0usize]; + ["Offset of field: kvm_userspace_memory_region::flags"] + [::std::mem::offset_of!(kvm_userspace_memory_region, flags) - 4usize]; + ["Offset of field: kvm_userspace_memory_region::guest_phys_addr"] + [::std::mem::offset_of!(kvm_userspace_memory_region, guest_phys_addr) - 8usize]; + ["Offset of field: kvm_userspace_memory_region::memory_size"] + [::std::mem::offset_of!(kvm_userspace_memory_region, memory_size) - 16usize]; + ["Offset of field: kvm_userspace_memory_region::userspace_addr"] + [::std::mem::offset_of!(kvm_userspace_memory_region, userspace_addr) - 24usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_userspace_memory_region2 { + pub slot: __u32, + pub flags: __u32, + pub guest_phys_addr: __u64, + pub memory_size: __u64, + pub userspace_addr: __u64, + pub guest_memfd_offset: __u64, + pub guest_memfd: __u32, + pub pad1: __u32, + pub pad2: [__u64; 14usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_userspace_memory_region2"] + [::std::mem::size_of::() - 160usize]; + ["Alignment of kvm_userspace_memory_region2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_userspace_memory_region2::slot"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, slot) - 0usize]; + ["Offset of field: kvm_userspace_memory_region2::flags"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, flags) - 4usize]; + ["Offset of field: kvm_userspace_memory_region2::guest_phys_addr"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, guest_phys_addr) - 8usize]; + ["Offset of field: kvm_userspace_memory_region2::memory_size"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, memory_size) - 16usize]; + ["Offset of field: kvm_userspace_memory_region2::userspace_addr"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, userspace_addr) - 24usize]; + ["Offset of field: kvm_userspace_memory_region2::guest_memfd_offset"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, guest_memfd_offset) - 32usize]; + ["Offset of field: kvm_userspace_memory_region2::guest_memfd"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, guest_memfd) - 40usize]; + ["Offset of field: kvm_userspace_memory_region2::pad1"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, pad1) - 44usize]; + ["Offset of field: kvm_userspace_memory_region2::pad2"] + [::std::mem::offset_of!(kvm_userspace_memory_region2, pad2) - 48usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_level__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_irq_level__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_level__bindgen_ty_1::irq"] + [::std::mem::offset_of!(kvm_irq_level__bindgen_ty_1, irq) - 0usize]; + ["Offset of field: kvm_irq_level__bindgen_ty_1::status"] + [::std::mem::offset_of!(kvm_irq_level__bindgen_ty_1, status) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_level"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_irq_level"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_level::level"] + [::std::mem::offset_of!(kvm_irq_level, level) - 4usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irqchip__bindgen_ty_1"] + [::std::mem::size_of::() - 512usize]; + ["Alignment of kvm_irqchip__bindgen_ty_1"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: kvm_irqchip__bindgen_ty_1::dummy"] + [::std::mem::offset_of!(kvm_irqchip__bindgen_ty_1, dummy) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irqchip"][::std::mem::size_of::() - 520usize]; + ["Alignment of kvm_irqchip"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irqchip::chip_id"] + [::std::mem::offset_of!(kvm_irqchip, chip_id) - 0usize]; + ["Offset of field: kvm_irqchip::pad"][::std::mem::offset_of!(kvm_irqchip, pad) - 4usize]; + ["Offset of field: kvm_irqchip::chip"][::std::mem::offset_of!(kvm_irqchip, chip) - 8usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_pit_config"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_pit_config"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_pit_config::flags"] + [::std::mem::offset_of!(kvm_pit_config, flags) - 0usize]; + ["Offset of field: kvm_pit_config::pad"][::std::mem::offset_of!(kvm_pit_config, pad) - 4usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1::msr"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1, msr) - 0usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1::pad2"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1, pad2) - 4usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1::control"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1, control) - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1::evt_page"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1, evt_page) - 16usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1::msg_page"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_1, msg_page) - 24usize]; +}; +#[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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2::input"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2, input) - 0usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2::result"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2, result) - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2::params"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_2, params) - 16usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::msr"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, msr) - 0usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::pad2"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, pad2) - 4usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::control"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, control) - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::status"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, status) - 16usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::send_page"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, send_page) - 24usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::recv_page"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, recv_page) - 32usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3::pending_page"][::std::mem::offset_of!( + kvm_hyperv_exit__bindgen_ty_1__bindgen_ty_3, + pending_page + ) - 40usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_hyperv_exit__bindgen_ty_1"] + [::std::mem::size_of::() - 48usize]; + ["Alignment of kvm_hyperv_exit__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1::synic"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1, synic) - 0usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1::hcall"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1, hcall) - 0usize]; + ["Offset of field: kvm_hyperv_exit__bindgen_ty_1::syndbg"] + [::std::mem::offset_of!(kvm_hyperv_exit__bindgen_ty_1, syndbg) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_hyperv_exit"][::std::mem::size_of::() - 56usize]; + ["Alignment of kvm_hyperv_exit"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_hyperv_exit::type_"] + [::std::mem::offset_of!(kvm_hyperv_exit, type_) - 0usize]; + ["Offset of field: kvm_hyperv_exit::pad1"] + [::std::mem::offset_of!(kvm_hyperv_exit, pad1) - 4usize]; + ["Offset of field: kvm_hyperv_exit::u"][::std::mem::offset_of!(kvm_hyperv_exit, u) - 8usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_xen_exit__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of kvm_xen_exit__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1::longmode"] + [::std::mem::offset_of!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1, longmode) - 0usize]; + ["Offset of field: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1::cpl"] + [::std::mem::offset_of!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1, cpl) - 4usize]; + ["Offset of field: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1::input"] + [::std::mem::offset_of!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1, input) - 8usize]; + ["Offset of field: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1::result"] + [::std::mem::offset_of!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1, result) - 16usize]; + ["Offset of field: kvm_xen_exit__bindgen_ty_1__bindgen_ty_1::params"] + [::std::mem::offset_of!(kvm_xen_exit__bindgen_ty_1__bindgen_ty_1, params) - 24usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_xen_exit__bindgen_ty_1"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of kvm_xen_exit__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_xen_exit__bindgen_ty_1::hcall"] + [::std::mem::offset_of!(kvm_xen_exit__bindgen_ty_1, hcall) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_xen_exit"][::std::mem::size_of::() - 80usize]; + ["Alignment of kvm_xen_exit"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_xen_exit::type_"][::std::mem::offset_of!(kvm_xen_exit, type_) - 0usize]; + ["Offset of field: kvm_xen_exit::u"][::std::mem::offset_of!(kvm_xen_exit, u) - 8usize]; +}; +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 psw_mask: __u64, + pub psw_addr: __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 iocsr_io: kvm_run__bindgen_ty_1__bindgen_ty_7, + pub hypercall: kvm_run__bindgen_ty_1__bindgen_ty_8, + pub tpr_access: kvm_run__bindgen_ty_1__bindgen_ty_9, + pub s390_sieic: kvm_run__bindgen_ty_1__bindgen_ty_10, + pub s390_reset_flags: __u64, + pub s390_ucontrol: kvm_run__bindgen_ty_1__bindgen_ty_11, + pub dcr: kvm_run__bindgen_ty_1__bindgen_ty_12, + pub internal: kvm_run__bindgen_ty_1__bindgen_ty_13, + pub emulation_failure: kvm_run__bindgen_ty_1__bindgen_ty_14, + pub osi: kvm_run__bindgen_ty_1__bindgen_ty_15, + pub papr_hcall: kvm_run__bindgen_ty_1__bindgen_ty_16, + pub s390_tsch: kvm_run__bindgen_ty_1__bindgen_ty_17, + pub epr: kvm_run__bindgen_ty_1__bindgen_ty_18, + pub system_event: kvm_run__bindgen_ty_1__bindgen_ty_19, + pub s390_stsi: kvm_run__bindgen_ty_1__bindgen_ty_20, + pub eoi: kvm_run__bindgen_ty_1__bindgen_ty_21, + pub hyperv: kvm_hyperv_exit, + pub arm_nisv: kvm_run__bindgen_ty_1__bindgen_ty_22, + pub msr: kvm_run__bindgen_ty_1__bindgen_ty_23, + pub xen: kvm_xen_exit, + pub riscv_sbi: kvm_run__bindgen_ty_1__bindgen_ty_24, + pub riscv_csr: kvm_run__bindgen_ty_1__bindgen_ty_25, + pub notify: kvm_run__bindgen_ty_1__bindgen_ty_26, + pub memory_fault: kvm_run__bindgen_ty_1__bindgen_ty_27, + 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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_1::hardware_exit_reason"][::std::mem::offset_of!( + kvm_run__bindgen_ty_1__bindgen_ty_1, + hardware_exit_reason + ) - 0usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_2::hardware_entry_failure_reason"][::std::mem::offset_of!( + kvm_run__bindgen_ty_1__bindgen_ty_2, + hardware_entry_failure_reason + ) + - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_2::cpu"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_2, cpu) - 8usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_3"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_3::exception"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_3, exception) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_3::error_code"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_3, error_code) - 4usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_4"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_4"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_4::direction"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_4, direction) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_4::size"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_4, size) - 1usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_4::port"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_4, port) - 2usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_4::count"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_4, count) - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_4::data_offset"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_4, data_offset) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_5 { + pub arch: kvm_debug_exit_arch, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_5"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_5"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_5::arch"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_5, arch) - 0usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_6"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_6"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_6::phys_addr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_6, phys_addr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_6::data"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_6, data) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_6::len"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_6, len) - 16usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_6::is_write"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_6, is_write) - 20usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_7 { + pub phys_addr: __u64, + pub data: [__u8; 8usize], + pub len: __u32, + pub is_write: __u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_7"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_7"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_7::phys_addr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_7, phys_addr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_7::data"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_7, data) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_7::len"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_7, len) - 16usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_7::is_write"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_7, is_write) - 20usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_8 { + pub nr: __u64, + pub args: [__u64; 6usize], + pub ret: __u64, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1 { + pub longmode: __u32, + pub flags: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1::longmode"][::std::mem::offset_of!( + kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1, + longmode + ) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1::flags"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1, flags) - 0usize]; +}; +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_8__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_8__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_8__bindgen_ty_1 {{ union }}" + ) + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_8"] + [::std::mem::size_of::() - 72usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_8"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_8::nr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_8, nr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_8::args"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_8, args) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_8::ret"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_8, ret) - 56usize]; +}; +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_8 { + 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_8 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_8 {{ 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_9 { + pub rip: __u64, + pub is_write: __u32, + pub pad: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_9"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_9"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_9::rip"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_9, rip) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_9::is_write"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_9, is_write) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_9::pad"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_9, pad) - 12usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_10 { + pub icptcode: __u8, + pub ipa: __u16, + pub ipb: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_10"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_10"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_10::icptcode"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_10, icptcode) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_10::ipa"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_10, ipa) - 2usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_10::ipb"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_10, ipb) - 4usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_11 { + pub trans_exc_code: __u64, + pub pgm_code: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_11"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_11"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_11::trans_exc_code"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_11, trans_exc_code) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_11::pgm_code"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_11, pgm_code) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_12 { + pub dcrn: __u32, + pub data: __u32, + pub is_write: __u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_12"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_12"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_12::dcrn"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_12, dcrn) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_12::data"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_12, data) - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_12::is_write"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_12, is_write) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_13 { + pub suberror: __u32, + pub ndata: __u32, + pub data: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_13"] + [::std::mem::size_of::() - 136usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_13"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_13::suberror"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_13, suberror) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_13::ndata"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_13, ndata) - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_13::data"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_13, data) - 8usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_14 { + pub suberror: __u32, + pub ndata: __u32, + pub flags: __u64, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1 { + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1 { + pub insn_size: __u8, + pub insn_bytes: [__u8; 15usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1"][::std::mem::size_of::< + kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1, + >() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::( + ) - 1usize]; + [ + "Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1::insn_size", + ][::std::mem::offset_of!( + kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1, + insn_size + ) - 0usize]; + [ + "Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1::insn_bytes", + ][::std::mem::offset_of!( + kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1__bindgen_ty_1, + insn_bytes + ) - 1usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1"] + [::std::mem::align_of::() - 1usize]; +}; +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_14__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_14__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_14__bindgen_ty_1 {{ union }}" + ) + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_14"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_14"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_14::suberror"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_14, suberror) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_14::ndata"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_14, ndata) - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_14::flags"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_14, flags) - 8usize]; +}; +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_14 { + 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_14 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_14 {{ 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_15 { + pub gprs: [__u64; 32usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_15"] + [::std::mem::size_of::() - 256usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_15"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_15::gprs"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_15, gprs) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_16 { + pub nr: __u64, + pub ret: __u64, + pub args: [__u64; 9usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_16"] + [::std::mem::size_of::() - 88usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_16"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_16::nr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_16, nr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_16::ret"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_16, ret) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_16::args"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_16, args) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_17 { + pub subchannel_id: __u16, + pub subchannel_nr: __u16, + pub io_int_parm: __u32, + pub io_int_word: __u32, + pub ipb: __u32, + pub dequeued: __u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_17"] + [::std::mem::size_of::() - 20usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_17"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_17::subchannel_id"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_17, subchannel_id) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_17::subchannel_nr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_17, subchannel_nr) - 2usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_17::io_int_parm"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_17, io_int_parm) - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_17::io_int_word"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_17, io_int_word) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_17::ipb"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_17, ipb) - 12usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_17::dequeued"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_17, dequeued) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_18 { + pub epr: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_18"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_18"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_18::epr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_18, epr) - 0usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_19 { + pub type_: __u32, + pub ndata: __u32, + pub __bindgen_anon_1: kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1 { + pub flags: __u64, + pub data: [__u64; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1"] + [::std::mem::size_of::() - 128usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1::flags"][::std::mem::offset_of!( + kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1, + flags + ) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1::data"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1, data) - 0usize]; +}; +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_19__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_19__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_19__bindgen_ty_1 {{ union }}" + ) + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_19"] + [::std::mem::size_of::() - 136usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_19"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_19::type_"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_19, type_) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_19::ndata"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_19, ndata) - 4usize]; +}; +impl Default for kvm_run__bindgen_ty_1__bindgen_ty_19 { + 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_19 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "kvm_run__bindgen_ty_1__bindgen_ty_19 {{ 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_20 { + pub addr: __u64, + pub ar: __u8, + pub reserved: __u8, + pub fc: __u8, + pub sel1: __u8, + pub sel2: __u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_20"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_20"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_20::addr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_20, addr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_20::ar"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_20, ar) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_20::reserved"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_20, reserved) - 9usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_20::fc"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_20, fc) - 10usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_20::sel1"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_20, sel1) - 11usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_20::sel2"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_20, sel2) - 12usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_21 { + pub vector: __u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_21"] + [::std::mem::size_of::() - 1usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_21"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_21::vector"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_21, vector) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_22 { + pub esr_iss: __u64, + pub fault_ipa: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_22"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_22"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_22::esr_iss"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_22, esr_iss) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_22::fault_ipa"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_22, fault_ipa) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_23 { + pub error: __u8, + pub pad: [__u8; 7usize], + pub reason: __u32, + pub index: __u32, + pub data: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_23"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_23"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_23::error"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_23, error) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_23::pad"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_23, pad) - 1usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_23::reason"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_23, reason) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_23::index"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_23, index) - 12usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_23::data"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_23, data) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_24 { + 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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_24"] + [::std::mem::size_of::() - 80usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_24"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_24::extension_id"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_24, extension_id) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_24::function_id"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_24, function_id) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_24::args"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_24, args) - 16usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_24::ret"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_24, ret) - 64usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_25 { + 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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_25"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_25"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_25::csr_num"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_25, csr_num) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_25::new_value"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_25, new_value) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_25::write_mask"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_25, write_mask) - 16usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_25::ret_value"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_25, ret_value) - 24usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_26 { + pub flags: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_26"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_26"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_26::flags"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_26, flags) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_run__bindgen_ty_1__bindgen_ty_27 { + pub flags: __u64, + pub gpa: __u64, + pub size: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1__bindgen_ty_27"] + [::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_run__bindgen_ty_1__bindgen_ty_27"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_27::flags"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_27, flags) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_27::gpa"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_27, gpa) - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1__bindgen_ty_27::size"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1__bindgen_ty_27, size) - 16usize]; +}; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_1"][::std::mem::size_of::() - 256usize]; + ["Alignment of kvm_run__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_1::hw"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, hw) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::fail_entry"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, fail_entry) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::ex"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, ex) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::io"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, io) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::debug"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, debug) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::mmio"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, mmio) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::iocsr_io"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, iocsr_io) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::hypercall"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, hypercall) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::tpr_access"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, tpr_access) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::s390_sieic"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, s390_sieic) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::s390_reset_flags"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, s390_reset_flags) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::s390_ucontrol"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, s390_ucontrol) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::dcr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, dcr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::internal"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, internal) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::emulation_failure"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, emulation_failure) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::osi"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, osi) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::papr_hcall"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, papr_hcall) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::s390_tsch"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, s390_tsch) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::epr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, epr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::system_event"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, system_event) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::s390_stsi"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, s390_stsi) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::eoi"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, eoi) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::hyperv"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, hyperv) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::arm_nisv"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, arm_nisv) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::msr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, msr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::xen"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, xen) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::riscv_sbi"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, riscv_sbi) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::riscv_csr"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, riscv_csr) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::notify"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, notify) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::memory_fault"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, memory_fault) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_1::padding"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_1, padding) - 0usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run__bindgen_ty_2"][::std::mem::size_of::() - 2048usize]; + ["Alignment of kvm_run__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run__bindgen_ty_2::regs"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_2, regs) - 0usize]; + ["Offset of field: kvm_run__bindgen_ty_2::padding"] + [::std::mem::offset_of!(kvm_run__bindgen_ty_2, padding) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_run"][::std::mem::size_of::() - 2368usize]; + ["Alignment of kvm_run"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_run::request_interrupt_window"] + [::std::mem::offset_of!(kvm_run, request_interrupt_window) - 0usize]; + ["Offset of field: kvm_run::immediate_exit"] + [::std::mem::offset_of!(kvm_run, immediate_exit) - 1usize]; + ["Offset of field: kvm_run::padding1"][::std::mem::offset_of!(kvm_run, padding1) - 2usize]; + ["Offset of field: kvm_run::exit_reason"] + [::std::mem::offset_of!(kvm_run, exit_reason) - 8usize]; + ["Offset of field: kvm_run::ready_for_interrupt_injection"] + [::std::mem::offset_of!(kvm_run, ready_for_interrupt_injection) - 12usize]; + ["Offset of field: kvm_run::if_flag"][::std::mem::offset_of!(kvm_run, if_flag) - 13usize]; + ["Offset of field: kvm_run::flags"][::std::mem::offset_of!(kvm_run, flags) - 14usize]; + ["Offset of field: kvm_run::cr8"][::std::mem::offset_of!(kvm_run, cr8) - 16usize]; + ["Offset of field: kvm_run::apic_base"][::std::mem::offset_of!(kvm_run, apic_base) - 24usize]; + ["Offset of field: kvm_run::psw_mask"][::std::mem::offset_of!(kvm_run, psw_mask) - 32usize]; + ["Offset of field: kvm_run::psw_addr"][::std::mem::offset_of!(kvm_run, psw_addr) - 40usize]; + ["Offset of field: kvm_run::kvm_valid_regs"] + [::std::mem::offset_of!(kvm_run, kvm_valid_regs) - 304usize]; + ["Offset of field: kvm_run::kvm_dirty_regs"] + [::std::mem::offset_of!(kvm_run, kvm_dirty_regs) - 312usize]; + ["Offset of field: kvm_run::s"][::std::mem::offset_of!(kvm_run, s) - 320usize]; +}; +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: {:?}, psw_mask: {:?}, psw_addr: {:?}, __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.psw_mask, + self.psw_addr, + 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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_coalesced_mmio_zone__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_coalesced_mmio_zone__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_coalesced_mmio_zone__bindgen_ty_1::pad"] + [::std::mem::offset_of!(kvm_coalesced_mmio_zone__bindgen_ty_1, pad) - 0usize]; + ["Offset of field: kvm_coalesced_mmio_zone__bindgen_ty_1::pio"] + [::std::mem::offset_of!(kvm_coalesced_mmio_zone__bindgen_ty_1, pio) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_coalesced_mmio_zone"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_coalesced_mmio_zone"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_coalesced_mmio_zone::addr"] + [::std::mem::offset_of!(kvm_coalesced_mmio_zone, addr) - 0usize]; + ["Offset of field: kvm_coalesced_mmio_zone::size"] + [::std::mem::offset_of!(kvm_coalesced_mmio_zone, size) - 8usize]; +}; +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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_coalesced_mmio__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_coalesced_mmio__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_coalesced_mmio__bindgen_ty_1::pad"] + [::std::mem::offset_of!(kvm_coalesced_mmio__bindgen_ty_1, pad) - 0usize]; + ["Offset of field: kvm_coalesced_mmio__bindgen_ty_1::pio"] + [::std::mem::offset_of!(kvm_coalesced_mmio__bindgen_ty_1, pio) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_coalesced_mmio"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_coalesced_mmio"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_coalesced_mmio::phys_addr"] + [::std::mem::offset_of!(kvm_coalesced_mmio, phys_addr) - 0usize]; + ["Offset of field: kvm_coalesced_mmio::len"] + [::std::mem::offset_of!(kvm_coalesced_mmio, len) - 8usize]; + ["Offset of field: kvm_coalesced_mmio::data"] + [::std::mem::offset_of!(kvm_coalesced_mmio, data) - 16usize]; +}; +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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_coalesced_mmio_ring"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_coalesced_mmio_ring"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_coalesced_mmio_ring::first"] + [::std::mem::offset_of!(kvm_coalesced_mmio_ring, first) - 0usize]; + ["Offset of field: kvm_coalesced_mmio_ring::last"] + [::std::mem::offset_of!(kvm_coalesced_mmio_ring, last) - 4usize]; + ["Offset of field: kvm_coalesced_mmio_ring::coalesced_mmio"] + [::std::mem::offset_of!(kvm_coalesced_mmio_ring, coalesced_mmio) - 8usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_translation"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_translation"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_translation::linear_address"] + [::std::mem::offset_of!(kvm_translation, linear_address) - 0usize]; + ["Offset of field: kvm_translation::physical_address"] + [::std::mem::offset_of!(kvm_translation, physical_address) - 8usize]; + ["Offset of field: kvm_translation::valid"] + [::std::mem::offset_of!(kvm_translation, valid) - 16usize]; + ["Offset of field: kvm_translation::writeable"] + [::std::mem::offset_of!(kvm_translation, writeable) - 17usize]; + ["Offset of field: kvm_translation::usermode"] + [::std::mem::offset_of!(kvm_translation, usermode) - 18usize]; + ["Offset of field: kvm_translation::pad"] + [::std::mem::offset_of!(kvm_translation, pad) - 19usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_interrupt { + pub irq: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_interrupt"][::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_interrupt"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_interrupt::irq"][::std::mem::offset_of!(kvm_interrupt, irq) - 0usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_dirty_log__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_dirty_log__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_dirty_log__bindgen_ty_1::dirty_bitmap"] + [::std::mem::offset_of!(kvm_dirty_log__bindgen_ty_1, dirty_bitmap) - 0usize]; + ["Offset of field: kvm_dirty_log__bindgen_ty_1::padding2"] + [::std::mem::offset_of!(kvm_dirty_log__bindgen_ty_1, padding2) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_dirty_log"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_dirty_log"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_dirty_log::slot"][::std::mem::offset_of!(kvm_dirty_log, slot) - 0usize]; + ["Offset of field: kvm_dirty_log::padding1"] + [::std::mem::offset_of!(kvm_dirty_log, padding1) - 4usize]; +}; +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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_clear_dirty_log__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_clear_dirty_log__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_clear_dirty_log__bindgen_ty_1::dirty_bitmap"] + [::std::mem::offset_of!(kvm_clear_dirty_log__bindgen_ty_1, dirty_bitmap) - 0usize]; + ["Offset of field: kvm_clear_dirty_log__bindgen_ty_1::padding2"] + [::std::mem::offset_of!(kvm_clear_dirty_log__bindgen_ty_1, padding2) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_clear_dirty_log"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_clear_dirty_log"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_clear_dirty_log::slot"] + [::std::mem::offset_of!(kvm_clear_dirty_log, slot) - 0usize]; + ["Offset of field: kvm_clear_dirty_log::num_pages"] + [::std::mem::offset_of!(kvm_clear_dirty_log, num_pages) - 4usize]; + ["Offset of field: kvm_clear_dirty_log::first_page"] + [::std::mem::offset_of!(kvm_clear_dirty_log, first_page) - 8usize]; +}; +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>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_signal_mask"][::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_signal_mask"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_signal_mask::len"] + [::std::mem::offset_of!(kvm_signal_mask, len) - 0usize]; + ["Offset of field: kvm_signal_mask::sigset"] + [::std::mem::offset_of!(kvm_signal_mask, sigset) - 4usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_tpr_access_ctl { + pub enabled: __u32, + pub flags: __u32, + pub reserved: [__u32; 8usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_tpr_access_ctl"][::std::mem::size_of::() - 40usize]; + ["Alignment of kvm_tpr_access_ctl"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_tpr_access_ctl::enabled"] + [::std::mem::offset_of!(kvm_tpr_access_ctl, enabled) - 0usize]; + ["Offset of field: kvm_tpr_access_ctl::flags"] + [::std::mem::offset_of!(kvm_tpr_access_ctl, flags) - 4usize]; + ["Offset of field: kvm_tpr_access_ctl::reserved"] + [::std::mem::offset_of!(kvm_tpr_access_ctl, reserved) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_vapic_addr { + pub vapic_addr: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_vapic_addr"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_vapic_addr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_vapic_addr::vapic_addr"] + [::std::mem::offset_of!(kvm_vapic_addr, vapic_addr) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_mp_state { + pub mp_state: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_mp_state"][::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_mp_state"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_mp_state::mp_state"] + [::std::mem::offset_of!(kvm_mp_state, mp_state) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialEq)] +pub struct kvm_guest_debug { + pub control: __u32, + pub pad: __u32, + pub arch: kvm_guest_debug_arch, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_guest_debug"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_guest_debug"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_guest_debug::control"] + [::std::mem::offset_of!(kvm_guest_debug, control) - 0usize]; + ["Offset of field: kvm_guest_debug::pad"] + [::std::mem::offset_of!(kvm_guest_debug, pad) - 4usize]; + ["Offset of field: kvm_guest_debug::arch"] + [::std::mem::offset_of!(kvm_guest_debug, arch) - 8usize]; +}; +impl Default for kvm_guest_debug { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_ioeventfd"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_ioeventfd"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_ioeventfd::datamatch"] + [::std::mem::offset_of!(kvm_ioeventfd, datamatch) - 0usize]; + ["Offset of field: kvm_ioeventfd::addr"][::std::mem::offset_of!(kvm_ioeventfd, addr) - 8usize]; + ["Offset of field: kvm_ioeventfd::len"][::std::mem::offset_of!(kvm_ioeventfd, len) - 16usize]; + ["Offset of field: kvm_ioeventfd::fd"][::std::mem::offset_of!(kvm_ioeventfd, fd) - 20usize]; + ["Offset of field: kvm_ioeventfd::flags"] + [::std::mem::offset_of!(kvm_ioeventfd, flags) - 24usize]; + ["Offset of field: kvm_ioeventfd::pad"][::std::mem::offset_of!(kvm_ioeventfd, pad) - 28usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_enable_cap"][::std::mem::size_of::() - 104usize]; + ["Alignment of kvm_enable_cap"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_enable_cap::cap"][::std::mem::offset_of!(kvm_enable_cap, cap) - 0usize]; + ["Offset of field: kvm_enable_cap::flags"] + [::std::mem::offset_of!(kvm_enable_cap, flags) - 4usize]; + ["Offset of field: kvm_enable_cap::args"] + [::std::mem::offset_of!(kvm_enable_cap, args) - 8usize]; + ["Offset of field: kvm_enable_cap::pad"][::std::mem::offset_of!(kvm_enable_cap, pad) - 40usize]; +}; +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, Default, Copy, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_irq_routing_irqchip { + pub irqchip: __u32, + pub pin: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_irqchip"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_irq_routing_irqchip"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_routing_irqchip::irqchip"] + [::std::mem::offset_of!(kvm_irq_routing_irqchip, irqchip) - 0usize]; + ["Offset of field: kvm_irq_routing_irqchip::pin"] + [::std::mem::offset_of!(kvm_irq_routing_irqchip, pin) - 4usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +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)] +#[cfg_attr(feature = "serde", derive(zerocopy::Immutable, zerocopy::FromBytes))] +pub union kvm_irq_routing_msi__bindgen_ty_1 { + pub pad: __u32, + pub devid: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_msi__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of kvm_irq_routing_msi__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_routing_msi__bindgen_ty_1::pad"] + [::std::mem::offset_of!(kvm_irq_routing_msi__bindgen_ty_1, pad) - 0usize]; + ["Offset of field: kvm_irq_routing_msi__bindgen_ty_1::devid"] + [::std::mem::offset_of!(kvm_irq_routing_msi__bindgen_ty_1, devid) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_msi"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_irq_routing_msi"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_routing_msi::address_lo"] + [::std::mem::offset_of!(kvm_irq_routing_msi, address_lo) - 0usize]; + ["Offset of field: kvm_irq_routing_msi::address_hi"] + [::std::mem::offset_of!(kvm_irq_routing_msi, address_hi) - 4usize]; + ["Offset of field: kvm_irq_routing_msi::data"] + [::std::mem::offset_of!(kvm_irq_routing_msi, data) - 8usize]; +}; +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)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_s390_adapter"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_irq_routing_s390_adapter"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_irq_routing_s390_adapter::ind_addr"] + [::std::mem::offset_of!(kvm_irq_routing_s390_adapter, ind_addr) - 0usize]; + ["Offset of field: kvm_irq_routing_s390_adapter::summary_addr"] + [::std::mem::offset_of!(kvm_irq_routing_s390_adapter, summary_addr) - 8usize]; + ["Offset of field: kvm_irq_routing_s390_adapter::ind_offset"] + [::std::mem::offset_of!(kvm_irq_routing_s390_adapter, ind_offset) - 16usize]; + ["Offset of field: kvm_irq_routing_s390_adapter::summary_offset"] + [::std::mem::offset_of!(kvm_irq_routing_s390_adapter, summary_offset) - 24usize]; + ["Offset of field: kvm_irq_routing_s390_adapter::adapter_id"] + [::std::mem::offset_of!(kvm_irq_routing_s390_adapter, adapter_id) - 28usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_irq_routing_hv_sint { + pub vcpu: __u32, + pub sint: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_hv_sint"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_irq_routing_hv_sint"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_routing_hv_sint::vcpu"] + [::std::mem::offset_of!(kvm_irq_routing_hv_sint, vcpu) - 0usize]; + ["Offset of field: kvm_irq_routing_hv_sint::sint"] + [::std::mem::offset_of!(kvm_irq_routing_hv_sint, sint) - 4usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_irq_routing_xen_evtchn { + pub port: __u32, + pub vcpu: __u32, + pub priority: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_xen_evtchn"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of kvm_irq_routing_xen_evtchn"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irq_routing_xen_evtchn::port"] + [::std::mem::offset_of!(kvm_irq_routing_xen_evtchn, port) - 0usize]; + ["Offset of field: kvm_irq_routing_xen_evtchn::vcpu"] + [::std::mem::offset_of!(kvm_irq_routing_xen_evtchn, vcpu) - 4usize]; + ["Offset of field: kvm_irq_routing_xen_evtchn::priority"] + [::std::mem::offset_of!(kvm_irq_routing_xen_evtchn, priority) - 8usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +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)] +#[cfg_attr(feature = "serde", derive(zerocopy::Immutable, zerocopy::FromBytes))] +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_entry__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_irq_routing_entry__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_irq_routing_entry__bindgen_ty_1::irqchip"] + [::std::mem::offset_of!(kvm_irq_routing_entry__bindgen_ty_1, irqchip) - 0usize]; + ["Offset of field: kvm_irq_routing_entry__bindgen_ty_1::msi"] + [::std::mem::offset_of!(kvm_irq_routing_entry__bindgen_ty_1, msi) - 0usize]; + ["Offset of field: kvm_irq_routing_entry__bindgen_ty_1::adapter"] + [::std::mem::offset_of!(kvm_irq_routing_entry__bindgen_ty_1, adapter) - 0usize]; + ["Offset of field: kvm_irq_routing_entry__bindgen_ty_1::hv_sint"] + [::std::mem::offset_of!(kvm_irq_routing_entry__bindgen_ty_1, hv_sint) - 0usize]; + ["Offset of field: kvm_irq_routing_entry__bindgen_ty_1::xen_evtchn"] + [::std::mem::offset_of!(kvm_irq_routing_entry__bindgen_ty_1, xen_evtchn) - 0usize]; + ["Offset of field: kvm_irq_routing_entry__bindgen_ty_1::pad"] + [::std::mem::offset_of!(kvm_irq_routing_entry__bindgen_ty_1, pad) - 0usize]; +}; +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 }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing_entry"][::std::mem::size_of::() - 48usize]; + ["Alignment of kvm_irq_routing_entry"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_irq_routing_entry::gsi"] + [::std::mem::offset_of!(kvm_irq_routing_entry, gsi) - 0usize]; + ["Offset of field: kvm_irq_routing_entry::type_"] + [::std::mem::offset_of!(kvm_irq_routing_entry, type_) - 4usize]; + ["Offset of field: kvm_irq_routing_entry::flags"] + [::std::mem::offset_of!(kvm_irq_routing_entry, flags) - 8usize]; + ["Offset of field: kvm_irq_routing_entry::pad"] + [::std::mem::offset_of!(kvm_irq_routing_entry, pad) - 12usize]; + ["Offset of field: kvm_irq_routing_entry::u"] + [::std::mem::offset_of!(kvm_irq_routing_entry, u) - 16usize]; +}; +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)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_irq_routing { + pub nr: __u32, + pub flags: __u32, + pub entries: __IncompleteArrayField, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irq_routing"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_irq_routing"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_irq_routing::nr"][::std::mem::offset_of!(kvm_irq_routing, nr) - 0usize]; + ["Offset of field: kvm_irq_routing::flags"] + [::std::mem::offset_of!(kvm_irq_routing, flags) - 4usize]; + ["Offset of field: kvm_irq_routing::entries"] + [::std::mem::offset_of!(kvm_irq_routing, entries) - 8usize]; +}; +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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_irqfd"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_irqfd"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_irqfd::fd"][::std::mem::offset_of!(kvm_irqfd, fd) - 0usize]; + ["Offset of field: kvm_irqfd::gsi"][::std::mem::offset_of!(kvm_irqfd, gsi) - 4usize]; + ["Offset of field: kvm_irqfd::flags"][::std::mem::offset_of!(kvm_irqfd, flags) - 8usize]; + ["Offset of field: kvm_irqfd::resamplefd"] + [::std::mem::offset_of!(kvm_irqfd, resamplefd) - 12usize]; + ["Offset of field: kvm_irqfd::pad"][::std::mem::offset_of!(kvm_irqfd, pad) - 16usize]; +}; +#[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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_clock_data"][::std::mem::size_of::() - 48usize]; + ["Alignment of kvm_clock_data"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_clock_data::clock"] + [::std::mem::offset_of!(kvm_clock_data, clock) - 0usize]; + ["Offset of field: kvm_clock_data::flags"] + [::std::mem::offset_of!(kvm_clock_data, flags) - 8usize]; + ["Offset of field: kvm_clock_data::pad0"] + [::std::mem::offset_of!(kvm_clock_data, pad0) - 12usize]; + ["Offset of field: kvm_clock_data::realtime"] + [::std::mem::offset_of!(kvm_clock_data, realtime) - 16usize]; + ["Offset of field: kvm_clock_data::host_tsc"] + [::std::mem::offset_of!(kvm_clock_data, host_tsc) - 24usize]; + ["Offset of field: kvm_clock_data::pad"][::std::mem::offset_of!(kvm_clock_data, pad) - 32usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_config_tlb"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_config_tlb"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_config_tlb::params"] + [::std::mem::offset_of!(kvm_config_tlb, params) - 0usize]; + ["Offset of field: kvm_config_tlb::array"] + [::std::mem::offset_of!(kvm_config_tlb, array) - 8usize]; + ["Offset of field: kvm_config_tlb::mmu_type"] + [::std::mem::offset_of!(kvm_config_tlb, mmu_type) - 16usize]; + ["Offset of field: kvm_config_tlb::array_len"] + [::std::mem::offset_of!(kvm_config_tlb, array_len) - 20usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_dirty_tlb { + pub bitmap: __u64, + pub num_dirty: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_dirty_tlb"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_dirty_tlb"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_dirty_tlb::bitmap"] + [::std::mem::offset_of!(kvm_dirty_tlb, bitmap) - 0usize]; + ["Offset of field: kvm_dirty_tlb::num_dirty"] + [::std::mem::offset_of!(kvm_dirty_tlb, num_dirty) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default)] +pub struct kvm_reg_list { + pub n: __u64, + pub reg: __IncompleteArrayField<__u64>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_reg_list"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_reg_list"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_reg_list::n"][::std::mem::offset_of!(kvm_reg_list, n) - 0usize]; + ["Offset of field: kvm_reg_list::reg"][::std::mem::offset_of!(kvm_reg_list, reg) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +#[cfg_attr( + feature = "serde", + derive(zerocopy::IntoBytes, zerocopy::Immutable, zerocopy::FromBytes) +)] +pub struct kvm_one_reg { + pub id: __u64, + pub addr: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_one_reg"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_one_reg"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_one_reg::id"][::std::mem::offset_of!(kvm_one_reg, id) - 0usize]; + ["Offset of field: kvm_one_reg::addr"][::std::mem::offset_of!(kvm_one_reg, addr) - 8usize]; +}; +#[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], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_msi"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_msi"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_msi::address_lo"][::std::mem::offset_of!(kvm_msi, address_lo) - 0usize]; + ["Offset of field: kvm_msi::address_hi"][::std::mem::offset_of!(kvm_msi, address_hi) - 4usize]; + ["Offset of field: kvm_msi::data"][::std::mem::offset_of!(kvm_msi, data) - 8usize]; + ["Offset of field: kvm_msi::flags"][::std::mem::offset_of!(kvm_msi, flags) - 12usize]; + ["Offset of field: kvm_msi::devid"][::std::mem::offset_of!(kvm_msi, devid) - 16usize]; + ["Offset of field: kvm_msi::pad"][::std::mem::offset_of!(kvm_msi, pad) - 20usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_arm_device_addr { + pub id: __u64, + pub addr: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_arm_device_addr"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_arm_device_addr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_arm_device_addr::id"] + [::std::mem::offset_of!(kvm_arm_device_addr, id) - 0usize]; + ["Offset of field: kvm_arm_device_addr::addr"] + [::std::mem::offset_of!(kvm_arm_device_addr, addr) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_create_device { + pub type_: __u32, + pub fd: __u32, + pub flags: __u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_create_device"][::std::mem::size_of::() - 12usize]; + ["Alignment of kvm_create_device"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_create_device::type_"] + [::std::mem::offset_of!(kvm_create_device, type_) - 0usize]; + ["Offset of field: kvm_create_device::fd"] + [::std::mem::offset_of!(kvm_create_device, fd) - 4usize]; + ["Offset of field: kvm_create_device::flags"] + [::std::mem::offset_of!(kvm_create_device, flags) - 8usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_device_attr"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_device_attr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_device_attr::flags"] + [::std::mem::offset_of!(kvm_device_attr, flags) - 0usize]; + ["Offset of field: kvm_device_attr::group"] + [::std::mem::offset_of!(kvm_device_attr, group) - 4usize]; + ["Offset of field: kvm_device_attr::attr"] + [::std::mem::offset_of!(kvm_device_attr, attr) - 8usize]; + ["Offset of field: kvm_device_attr::addr"] + [::std::mem::offset_of!(kvm_device_attr, addr) - 16usize]; +}; +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_LOONGARCH_IPI: kvm_device_type = 12; +pub const kvm_device_type_KVM_DEV_TYPE_LOONGARCH_EIOINTC: kvm_device_type = 13; +pub const kvm_device_type_KVM_DEV_TYPE_LOONGARCH_PCHPIC: kvm_device_type = 14; +pub const kvm_device_type_KVM_DEV_TYPE_MAX: kvm_device_type = 15; +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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_vfio_spapr_tce"][::std::mem::size_of::() - 8usize]; + ["Alignment of kvm_vfio_spapr_tce"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_vfio_spapr_tce::groupfd"] + [::std::mem::offset_of!(kvm_vfio_spapr_tce, groupfd) - 0usize]; + ["Offset of field: kvm_vfio_spapr_tce::tablefd"] + [::std::mem::offset_of!(kvm_vfio_spapr_tce, tablefd) - 4usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_enc_region { + pub addr: __u64, + pub size: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_enc_region"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_enc_region"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_enc_region::addr"] + [::std::mem::offset_of!(kvm_enc_region, addr) - 0usize]; + ["Offset of field: kvm_enc_region::size"] + [::std::mem::offset_of!(kvm_enc_region, size) - 8usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_dirty_gfn { + pub flags: __u32, + pub slot: __u32, + pub offset: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_dirty_gfn"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_dirty_gfn"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_dirty_gfn::flags"] + [::std::mem::offset_of!(kvm_dirty_gfn, flags) - 0usize]; + ["Offset of field: kvm_dirty_gfn::slot"][::std::mem::offset_of!(kvm_dirty_gfn, slot) - 4usize]; + ["Offset of field: kvm_dirty_gfn::offset"] + [::std::mem::offset_of!(kvm_dirty_gfn, offset) - 8usize]; +}; +#[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, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_stats_header"][::std::mem::size_of::() - 24usize]; + ["Alignment of kvm_stats_header"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_stats_header::flags"] + [::std::mem::offset_of!(kvm_stats_header, flags) - 0usize]; + ["Offset of field: kvm_stats_header::name_size"] + [::std::mem::offset_of!(kvm_stats_header, name_size) - 4usize]; + ["Offset of field: kvm_stats_header::num_desc"] + [::std::mem::offset_of!(kvm_stats_header, num_desc) - 8usize]; + ["Offset of field: kvm_stats_header::id_offset"] + [::std::mem::offset_of!(kvm_stats_header, id_offset) - 12usize]; + ["Offset of field: kvm_stats_header::desc_offset"] + [::std::mem::offset_of!(kvm_stats_header, desc_offset) - 16usize]; + ["Offset of field: kvm_stats_header::data_offset"] + [::std::mem::offset_of!(kvm_stats_header, data_offset) - 20usize]; +}; +#[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>, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_stats_desc"][::std::mem::size_of::() - 16usize]; + ["Alignment of kvm_stats_desc"][::std::mem::align_of::() - 4usize]; + ["Offset of field: kvm_stats_desc::flags"] + [::std::mem::offset_of!(kvm_stats_desc, flags) - 0usize]; + ["Offset of field: kvm_stats_desc::exponent"] + [::std::mem::offset_of!(kvm_stats_desc, exponent) - 4usize]; + ["Offset of field: kvm_stats_desc::size"] + [::std::mem::offset_of!(kvm_stats_desc, size) - 6usize]; + ["Offset of field: kvm_stats_desc::offset"] + [::std::mem::offset_of!(kvm_stats_desc, offset) - 8usize]; + ["Offset of field: kvm_stats_desc::bucket_size"] + [::std::mem::offset_of!(kvm_stats_desc, bucket_size) - 12usize]; + ["Offset of field: kvm_stats_desc::name"] + [::std::mem::offset_of!(kvm_stats_desc, name) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_memory_attributes { + pub address: __u64, + pub size: __u64, + pub attributes: __u64, + pub flags: __u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_memory_attributes"][::std::mem::size_of::() - 32usize]; + ["Alignment of kvm_memory_attributes"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_memory_attributes::address"] + [::std::mem::offset_of!(kvm_memory_attributes, address) - 0usize]; + ["Offset of field: kvm_memory_attributes::size"] + [::std::mem::offset_of!(kvm_memory_attributes, size) - 8usize]; + ["Offset of field: kvm_memory_attributes::attributes"] + [::std::mem::offset_of!(kvm_memory_attributes, attributes) - 16usize]; + ["Offset of field: kvm_memory_attributes::flags"] + [::std::mem::offset_of!(kvm_memory_attributes, flags) - 24usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_create_guest_memfd { + pub size: __u64, + pub flags: __u64, + pub reserved: [__u64; 6usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_create_guest_memfd"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_create_guest_memfd"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_create_guest_memfd::size"] + [::std::mem::offset_of!(kvm_create_guest_memfd, size) - 0usize]; + ["Offset of field: kvm_create_guest_memfd::flags"] + [::std::mem::offset_of!(kvm_create_guest_memfd, flags) - 8usize]; + ["Offset of field: kvm_create_guest_memfd::reserved"] + [::std::mem::offset_of!(kvm_create_guest_memfd, reserved) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialEq)] +pub struct kvm_pre_fault_memory { + pub gpa: __u64, + pub size: __u64, + pub flags: __u64, + pub padding: [__u64; 5usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of kvm_pre_fault_memory"][::std::mem::size_of::() - 64usize]; + ["Alignment of kvm_pre_fault_memory"][::std::mem::align_of::() - 8usize]; + ["Offset of field: kvm_pre_fault_memory::gpa"] + [::std::mem::offset_of!(kvm_pre_fault_memory, gpa) - 0usize]; + ["Offset of field: kvm_pre_fault_memory::size"] + [::std::mem::offset_of!(kvm_pre_fault_memory, size) - 8usize]; + ["Offset of field: kvm_pre_fault_memory::flags"] + [::std::mem::offset_of!(kvm_pre_fault_memory, flags) - 16usize]; + ["Offset of field: kvm_pre_fault_memory::padding"] + [::std::mem::offset_of!(kvm_pre_fault_memory, padding) - 24usize]; +}; diff --git a/kvm-bindings/src/s390x/fam_wrappers.rs b/kvm-bindings/src/s390x/fam_wrappers.rs new file mode 100644 index 00000000..e3699738 --- /dev/null +++ b/kvm-bindings/src/s390x/fam_wrappers.rs @@ -0,0 +1,83 @@ +// Copyright 2025 IBM Corp. All Rights Reserved. +// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use vmm_sys_util::fam::{FamStruct, FamStructWrapper}; +use vmm_sys_util::generate_fam_struct_impl; + +use super::bindings::*; + +// Cap for KVM_GET_REG_LIST on s390; the kernel does not expose a single max constant, +// but lists are typically well below this. +const S390X_REGS_MAX: usize = 512; + +// Implement the FamStruct trait for kvm_reg_list. +generate_fam_struct_impl!(kvm_reg_list, u64, reg, u64, n, S390X_REGS_MAX); + +// Implement the PartialEq trait for kvm_reg_list. +impl PartialEq for kvm_reg_list { + fn eq(&self, other: &kvm_reg_list) -> bool { + self.n == other.n + } +} + +/// Wrapper over the `kvm_reg_list` structure. +/// +/// The `kvm_reg_list` structure contains a flexible array member. For details check the +/// [KVM API KVM_GET_REG_LIST](https://docs.kernel.org/virt/kvm/api.html#kvm-get-reg-list) +/// documentation. To provide safe access to the array elements, this type is +/// implemented using [FamStructWrapper](../vmm_sys_util/fam/struct.FamStructWrapper.html). +pub type RegList = FamStructWrapper; + +// Implement the FamStruct trait for kvm_irq_routing +generate_fam_struct_impl!( + kvm_irq_routing, + kvm_irq_routing_entry, + entries, + u32, + nr, + 1024 +); + +// Implement the PartialEq trait for kvm_irq_routing. +impl PartialEq for kvm_irq_routing { + fn eq(&self, other: &kvm_irq_routing) -> bool { + self.nr == other.nr && self.flags == other.flags + } +} + +/// Wrapper over the `kvm_irq_routing` structure. +/// +/// The `kvm_irq_routing` structure contains a flexible array member. For details check the [KVM +/// API](https://docs.kernel.org/virt/kvm/api.html#kvm-set-gsi-routing) documentation on +/// `kvm_irq_routing`. To provide safe access to the array elements, this type is implemented using +/// [FamStructWrapper](../vmm_sys_util/fam/struct.FamStructWrapper.html). +pub type KvmIrqRouting = FamStructWrapper; + +#[cfg(test)] +mod tests { + use super::KvmIrqRouting; + use super::RegList; + use vmm_sys_util::fam::FamStruct; + + #[test] + fn test_reg_list_eq() { + let mut wrapper = RegList::new(1).unwrap(); + assert_eq!(wrapper.as_slice().len(), 1); + + let mut wrapper2 = wrapper.clone(); + assert!(wrapper == wrapper2); + + wrapper.as_mut_slice()[0] = 1; + assert!(wrapper != wrapper2); + wrapper2.as_mut_slice()[0] = 1; + assert!(wrapper == wrapper2); + } + #[test] + fn test_kvm_irq_routing() { + let wrapper = KvmIrqRouting::new(1).unwrap(); + assert_eq!(wrapper.as_slice().len(), 1); + assert_eq!(wrapper.as_fam_struct_ref().len(), 1); + assert_eq!(wrapper.as_fam_struct_ref().nr, 1); + } +} diff --git a/kvm-bindings/src/s390x/mod.rs b/kvm-bindings/src/s390x/mod.rs new file mode 100644 index 00000000..f724e259 --- /dev/null +++ b/kvm-bindings/src/s390x/mod.rs @@ -0,0 +1,17 @@ +// Copyright 2024 © Institute of Software, CAS. 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)] +pub mod bindings; +#[cfg(feature = "fam-wrappers")] +pub mod fam_wrappers; + +#[cfg(feature = "serde")] +mod serialize; + +pub use self::bindings::*; +pub const KVM_COALESCED_MMIO_PAGE_OFFSET: u32 = 1; +#[cfg(feature = "fam-wrappers")] +pub use self::fam_wrappers::*; diff --git a/kvm-bindings/src/s390x/serialize.rs b/kvm-bindings/src/s390x/serialize.rs new file mode 100644 index 00000000..edb7151c --- /dev/null +++ b/kvm-bindings/src/s390x/serialize.rs @@ -0,0 +1,81 @@ +// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +use super::bindings::{ + kvm_irq_routing, kvm_irq_routing_entry, kvm_irq_routing_entry__bindgen_ty_1, + kvm_irq_routing_msi__bindgen_ty_1, kvm_mp_state, kvm_one_reg, kvm_regs, +}; +use serde::{Deserialize, Deserializer, Serialize, Serializer}; +use zerocopy::{IntoBytes, transmute}; + +serde_impls! { + kvm_mp_state, + kvm_one_reg, + kvm_regs, + kvm_irq_routing, + kvm_irq_routing_entry +} + +// SAFETY: zerocopy's derives explicitly disallow deriving for unions where +// the fields have different sizes, due to the smaller fields having padding. +// Miri however does not complain about these implementations (e.g. about +// reading the "padding" for one union field as valid data for a bigger one) +unsafe impl IntoBytes for kvm_irq_routing_msi__bindgen_ty_1 { + fn only_derive_is_allowed_to_implement_this_trait() + where + Self: Sized, + { + } +} + +// SAFETY: zerocopy's derives explicitly disallow deriving for unions where +// the fields have different sizes, due to the smaller fields having padding. +// Miri however does not complain about these implementations (e.g. about +// reading the "padding" for one union field as valid data for a bigger one) +unsafe impl IntoBytes for kvm_irq_routing_entry__bindgen_ty_1 { + fn only_derive_is_allowed_to_implement_this_trait() + where + Self: Sized, + { + } +} + +#[cfg(test)] +mod tests { + use super::*; + use serde::{Deserialize, Serialize}; + + fn is_serde Deserialize<'de> + Default>() { + let config = bincode::config::standard(); + let serialized = bincode::serde::encode_to_vec(T::default(), config).unwrap(); + let (deserialized, _): (T, _) = + bincode::serde::decode_from_slice(&serialized, config).unwrap(); + let serialized_again = bincode::serde::encode_to_vec(&deserialized, config).unwrap(); + assert_eq!(serialized, serialized_again); + } + + #[test] + fn static_assert_serde_implementations() { + is_serde::(); + is_serde::(); + is_serde::(); + is_serde::(); + is_serde::(); + } + + fn is_serde_json Deserialize<'de> + Default>() { + let serialized = serde_json::to_string(&T::default()).unwrap(); + let deserialized = serde_json::from_str::(serialized.as_ref()).unwrap(); + let serialized_again = serde_json::to_string(&deserialized).unwrap(); + assert_eq!(serialized, serialized_again); + } + + #[test] + fn test_json_serde() { + is_serde_json::(); + is_serde_json::(); + is_serde_json::(); + is_serde_json::(); + is_serde_json::(); + } +}