diff --git a/mshv-bindings/src/arm64/bindings.rs b/mshv-bindings/src/arm64/bindings.rs new file mode 100644 index 00000000..ebc21a64 --- /dev/null +++ b/mshv-bindings/src/arm64/bindings.rs @@ -0,0 +1,21116 @@ +/* automatically generated by rust-bindgen 0.69.4 */ +/* + * Kernel (uapi) headers used for these bindings are as follows: + * include/hyperv/hvgdk_mini.h + * include/hyperv/hvgdk.h + * include/hyperv/hvhdk_mini.h + * include/hyperv/hvhdk.h + * include/linux/mshv.h + */ + +#[repr(C)] +#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] +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] + pub fn get_bit(&self, index: usize) -> bool { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = self.storage.as_ref()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + byte & mask == mask + } + #[inline] + pub fn set_bit(&mut self, index: usize, val: bool) { + debug_assert!(index / 8 < self.storage.as_ref().len()); + let byte_index = index / 8; + let byte = &mut self.storage.as_mut()[byte_index]; + let bit_index = if cfg!(target_endian = "big") { + 7 - (index % 8) + } else { + index % 8 + }; + let mask = 1 << bit_index; + if val { + *byte |= mask; + } else { + *byte &= !mask; + } + } + #[inline] + pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + let mut val = 0; + for i in 0..(bit_width as usize) { + if self.get_bit(i + bit_offset) { + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + val |= 1 << index; + } + } + val + } + #[inline] + pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) { + debug_assert!(bit_width <= 64); + debug_assert!(bit_offset / 8 < self.storage.as_ref().len()); + debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len()); + for i in 0..(bit_width as usize) { + let mask = 1 << i; + let val_bit_is_set = val & mask == mask; + let index = if cfg!(target_endian = "big") { + bit_width as usize - 1 - i + } else { + i + }; + self.set_bit(index + bit_offset, val_bit_is_set); + } + } +} +#[repr(C)] +#[derive(Default)] +pub struct __IncompleteArrayField(::std::marker::PhantomData, [T; 0]); +impl __IncompleteArrayField { + #[inline] + pub const fn new() -> Self { + __IncompleteArrayField(::std::marker::PhantomData, []) + } + #[inline] + pub fn as_ptr(&self) -> *const T { + self as *const _ as *const T + } + #[inline] + pub fn as_mut_ptr(&mut self) -> *mut T { + self as *mut _ as *mut T + } + #[inline] + pub unsafe fn as_slice(&self, len: usize) -> &[T] { + ::std::slice::from_raw_parts(self.as_ptr(), len) + } + #[inline] + pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] { + ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len) + } +} +impl ::std::fmt::Debug for __IncompleteArrayField { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + fmt.write_str("__IncompleteArrayField") + } +} +#[repr(C)] +pub struct __BindgenUnionField(::std::marker::PhantomData); +impl __BindgenUnionField { + #[inline] + pub const fn new() -> Self { + __BindgenUnionField(::std::marker::PhantomData) + } + #[inline] + pub unsafe fn as_ref(&self) -> &T { + ::std::mem::transmute(self) + } + #[inline] + pub unsafe fn as_mut(&mut self) -> &mut T { + ::std::mem::transmute(self) + } +} +impl ::std::default::Default for __BindgenUnionField { + #[inline] + fn default() -> Self { + Self::new() + } +} +impl ::std::clone::Clone for __BindgenUnionField { + #[inline] + fn clone(&self) -> Self { + *self + } +} +impl ::std::marker::Copy for __BindgenUnionField {} +impl ::std::fmt::Debug for __BindgenUnionField { + fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + fmt.write_str("__BindgenUnionField") + } +} +impl ::std::hash::Hash for __BindgenUnionField { + fn hash(&self, _state: &mut H) {} +} +impl ::std::cmp::PartialEq for __BindgenUnionField { + fn eq(&self, _other: &__BindgenUnionField) -> bool { + true + } +} +impl ::std::cmp::Eq for __BindgenUnionField {} +pub const __BITS_PER_LONG: u32 = 64; +pub const __FD_SETSIZE: u32 = 1024; +pub const HVGDK_MINI_H_VERSION: u32 = 25294; +pub const HV_STATUS_SUCCESS: u32 = 0; +pub const HV_STATUS_INVALID_HYPERCALL_CODE: u32 = 2; +pub const HV_STATUS_INVALID_HYPERCALL_INPUT: u32 = 3; +pub const HV_STATUS_INVALID_ALIGNMENT: u32 = 4; +pub const HV_STATUS_INVALID_PARAMETER: u32 = 5; +pub const HV_STATUS_ACCESS_DENIED: u32 = 6; +pub const HV_STATUS_INVALID_PARTITION_STATE: u32 = 7; +pub const HV_STATUS_OPERATION_DENIED: u32 = 8; +pub const HV_STATUS_UNKNOWN_PROPERTY: u32 = 9; +pub const HV_STATUS_PROPERTY_VALUE_OUT_OF_RANGE: u32 = 10; +pub const HV_STATUS_INSUFFICIENT_MEMORY: u32 = 11; +pub const HV_STATUS_INVALID_PARTITION_ID: u32 = 13; +pub const HV_STATUS_INVALID_VP_INDEX: u32 = 14; +pub const HV_STATUS_NOT_FOUND: u32 = 16; +pub const HV_STATUS_INVALID_PORT_ID: u32 = 17; +pub const HV_STATUS_INVALID_CONNECTION_ID: u32 = 18; +pub const HV_STATUS_INSUFFICIENT_BUFFERS: u32 = 19; +pub const HV_STATUS_NOT_ACKNOWLEDGED: u32 = 20; +pub const HV_STATUS_INVALID_VP_STATE: u32 = 21; +pub const HV_STATUS_NO_RESOURCES: u32 = 29; +pub const HV_STATUS_PROCESSOR_FEATURE_NOT_SUPPORTED: u32 = 32; +pub const HV_STATUS_INVALID_LP_INDEX: u32 = 65; +pub const HV_STATUS_INVALID_REGISTER_VALUE: u32 = 80; +pub const HV_STATUS_OPERATION_FAILED: u32 = 113; +pub const HV_STATUS_CALL_PENDING: u32 = 121; +pub const HV_LINUX_VENDOR_ID: u32 = 33024; +pub const HV_HYP_PAGE_SHIFT: u32 = 12; +pub const HV_HYP_PAGE_SIZE: u32 = 4096; +pub const HV_HYP_PAGE_MASK: i32 = -4096; +pub const HV_HYP_LARGE_PAGE_SHIFT: u32 = 21; +pub const HYPERV_CPUID_VENDOR_AND_MAX_FUNCTIONS: u32 = 1073741824; +pub const HYPERV_CPUID_INTERFACE: u32 = 1073741825; +pub const HYPERV_CPUID_VERSION: u32 = 1073741826; +pub const HYPERV_CPUID_FEATURES: u32 = 1073741827; +pub const HYPERV_CPUID_ENLIGHTMENT_INFO: u32 = 1073741828; +pub const HYPERV_CPUID_IMPLEMENT_LIMITS: u32 = 1073741829; +pub const HYPERV_CPUID_CPU_MANAGEMENT_FEATURES: u32 = 1073741831; +pub const HYPERV_CPUID_NESTED_FEATURES: u32 = 1073741834; +pub const HYPERV_CPUID_ISOLATION_CONFIG: u32 = 1073741836; +pub const HYPERV_CPUID_VIRT_STACK_INTERFACE: u32 = 1073741953; +pub const HYPERV_VS_INTERFACE_EAX_SIGNATURE: u32 = 824398678; +pub const HYPERV_CPUID_VIRT_STACK_PROPERTIES: u32 = 1073741954; +pub const HYPERV_VS_PROPERTIES_EAX_EXTENDED_IOAPIC_RTE: u32 = 4; +pub const HYPERV_HYPERVISOR_PRESENT_BIT: u32 = 2147483648; +pub const HYPERV_CPUID_MIN: u32 = 1073741829; +pub const HYPERV_CPUID_MAX: u32 = 1073807359; +pub const HV_MSR_VP_RUNTIME_AVAILABLE: u32 = 1; +pub const HV_MSR_TIME_REF_COUNT_AVAILABLE: u32 = 2; +pub const HV_MSR_SYNIC_AVAILABLE: u32 = 4; +pub const HV_MSR_SYNTIMER_AVAILABLE: u32 = 8; +pub const HV_MSR_APIC_ACCESS_AVAILABLE: u32 = 16; +pub const HV_MSR_HYPERCALL_AVAILABLE: u32 = 32; +pub const HV_MSR_VP_INDEX_AVAILABLE: u32 = 64; +pub const HV_MSR_RESET_AVAILABLE: u32 = 128; +pub const HV_MSR_STAT_PAGES_AVAILABLE: u32 = 256; +pub const HV_MSR_REFERENCE_TSC_AVAILABLE: u32 = 512; +pub const HV_MSR_GUEST_IDLE_AVAILABLE: u32 = 1024; +pub const HV_ACCESS_FREQUENCY_MSRS: u32 = 2048; +pub const HV_ACCESS_REENLIGHTENMENT: u32 = 8192; +pub const HV_ACCESS_TSC_INVARIANT: u32 = 32768; +pub const HV_CREATE_PARTITIONS: u32 = 1; +pub const HV_ACCESS_PARTITION_ID: u32 = 2; +pub const HV_ACCESS_MEMORY_POOL: u32 = 4; +pub const HV_ADJUST_MESSAGE_BUFFERS: u32 = 8; +pub const HV_POST_MESSAGES: u32 = 16; +pub const HV_SIGNAL_EVENTS: u32 = 32; +pub const HV_CREATE_PORT: u32 = 64; +pub const HV_CONNECT_PORT: u32 = 128; +pub const HV_ACCESS_STATS: u32 = 256; +pub const HV_DEBUGGING: u32 = 2048; +pub const HV_CPU_MANAGEMENT: u32 = 4096; +pub const HV_ENABLE_EXTENDED_HYPERCALLS: u32 = 1048576; +pub const HV_ISOLATION: u32 = 4194304; +pub const HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE: u32 = 256; +pub const HV_STIMER_DIRECT_MODE_AVAILABLE: u32 = 8192; +pub const HV_MAXIMUM_PROCESSORS: u32 = 320; +pub const HV_MAX_VP_INDEX: u32 = 319; +pub const HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE: u32 = 2; +pub const HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST: u32 = 3; +pub const HVCALL_GET_LOGICAL_PROCESSOR_RUN_TIME: u32 = 4; +pub const HVCALL_NOTIFY_LONG_SPIN_WAIT: u32 = 8; +pub const HVCALL_SEND_IPI: u32 = 11; +pub const HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX: u32 = 19; +pub const HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX: u32 = 20; +pub const HVCALL_SEND_IPI_EX: u32 = 21; +pub const HVCALL_CREATE_PARTITION: u32 = 64; +pub const HVCALL_INITIALIZE_PARTITION: u32 = 65; +pub const HVCALL_FINALIZE_PARTITION: u32 = 66; +pub const HVCALL_DELETE_PARTITION: u32 = 67; +pub const HVCALL_GET_PARTITION_PROPERTY: u32 = 68; +pub const HVCALL_SET_PARTITION_PROPERTY: u32 = 69; +pub const HVCALL_GET_PARTITION_ID: u32 = 70; +pub const HVCALL_DEPOSIT_MEMORY: u32 = 72; +pub const HVCALL_WITHDRAW_MEMORY: u32 = 73; +pub const HVCALL_MAP_GPA_PAGES: u32 = 75; +pub const HVCALL_UNMAP_GPA_PAGES: u32 = 76; +pub const HVCALL_INSTALL_INTERCEPT: u32 = 77; +pub const HVCALL_CREATE_VP: u32 = 78; +pub const HVCALL_DELETE_VP: u32 = 79; +pub const HVCALL_GET_VP_REGISTERS: u32 = 80; +pub const HVCALL_SET_VP_REGISTERS: u32 = 81; +pub const HVCALL_TRANSLATE_VIRTUAL_ADDRESS: u32 = 82; +pub const HVCALL_READ_GPA: u32 = 83; +pub const HVCALL_WRITE_GPA: u32 = 84; +pub const HVCALL_CLEAR_VIRTUAL_INTERRUPT: u32 = 86; +pub const HVCALL_DELETE_PORT: u32 = 88; +pub const HVCALL_DISCONNECT_PORT: u32 = 91; +pub const HVCALL_POST_MESSAGE: u32 = 92; +pub const HVCALL_SIGNAL_EVENT: u32 = 93; +pub const HVCALL_INITIALIZE_EVENT_LOG_BUFFER_GROUP: u32 = 96; +pub const HVCALL_FINALIZE_EVENT_LOG_BUFFER_GROUP: u32 = 97; +pub const HVCALL_CREATE_EVENT_LOG_BUFFER: u32 = 98; +pub const HVCALL_DELETE_EVENT_LOG_BUFFER: u32 = 99; +pub const HVCALL_MAP_EVENT_LOG_BUFFER: u32 = 100; +pub const HVCALL_UNMAP_EVENT_LOG_BUFFER: u32 = 101; +pub const HVCALL_SET_EVENT_LOG_GROUP_SOURCES: u32 = 102; +pub const HVCALL_RELEASE_EVENT_LOG_BUFFER: u32 = 103; +pub const HVCALL_FLUSH_EVENT_LOG_BUFFER: u32 = 104; +pub const HVCALL_POST_DEBUG_DATA: u32 = 105; +pub const HVCALL_RETRIEVE_DEBUG_DATA: u32 = 106; +pub const HVCALL_RESET_DEBUG_SESSION: u32 = 107; +pub const HVCALL_MAP_STATS_PAGE: u32 = 108; +pub const HVCALL_UNMAP_STATS_PAGE: u32 = 109; +pub const HVCALL_SET_SYSTEM_PROPERTY: u32 = 111; +pub const HVCALL_ADD_LOGICAL_PROCESSOR: u32 = 118; +pub const HVCALL_GET_SYSTEM_PROPERTY: u32 = 123; +pub const HVCALL_MAP_DEVICE_INTERRUPT: u32 = 124; +pub const HVCALL_UNMAP_DEVICE_INTERRUPT: u32 = 125; +pub const HVCALL_RETARGET_INTERRUPT: u32 = 126; +pub const HVCALL_ATTACH_DEVICE: u32 = 130; +pub const HVCALL_DETACH_DEVICE: u32 = 131; +pub const HVCALL_ENTER_SLEEP_STATE: u32 = 132; +pub const HVCALL_NOTIFY_PARTITION_EVENT: u32 = 135; +pub const HVCALL_NOTIFY_PORT_RING_EMPTY: u32 = 139; +pub const HVCALL_REGISTER_INTERCEPT_RESULT: u32 = 145; +pub const HVCALL_ASSERT_VIRTUAL_INTERRUPT: u32 = 148; +pub const HVCALL_CREATE_PORT: u32 = 149; +pub const HVCALL_CONNECT_PORT: u32 = 150; +pub const HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_SPACE: u32 = 175; +pub const HVCALL_FLUSH_GUEST_PHYSICAL_ADDRESS_LIST: u32 = 176; +pub const HVCALL_CREATE_DEVICE_DOMAIN: u32 = 177; +pub const HVCALL_ATTACH_DEVICE_DOMAIN: u32 = 178; +pub const HVCALL_MAP_DEVICE_GPA_PAGES: u32 = 179; +pub const HVCALL_UNMAP_DEVICE_GPA_PAGES: u32 = 180; +pub const HVCALL_SIGNAL_EVENT_DIRECT: u32 = 192; +pub const HVCALL_POST_MESSAGE_DIRECT: u32 = 193; +pub const HVCALL_DISPATCH_VP: u32 = 194; +pub const HVCALL_DETACH_DEVICE_DOMAIN: u32 = 196; +pub const HVCALL_DELETE_DEVICE_DOMAIN: u32 = 197; +pub const HVCALL_QUERY_DEVICE_DOMAIN: u32 = 198; +pub const HVCALL_MAP_SPARSE_DEVICE_GPA_PAGES: u32 = 199; +pub const HVCALL_UNMAP_SPARSE_DEVICE_GPA_PAGES: u32 = 200; +pub const HVCALL_GET_GPA_PAGES_ACCESS_STATES: u32 = 201; +pub const HVCALL_CONFIGURE_DEVICE_DOMAIN: u32 = 206; +pub const HVCALL_FLUSH_DEVICE_DOMAIN: u32 = 208; +pub const HVCALL_ACQUIRE_SPARSE_SPA_PAGE_HOST_ACCESS: u32 = 215; +pub const HVCALL_RELEASE_SPARSE_SPA_PAGE_HOST_ACCESS: u32 = 216; +pub const HVCALL_MAP_VP_STATE_PAGE: u32 = 225; +pub const HVCALL_UNMAP_VP_STATE_PAGE: u32 = 226; +pub const HVCALL_GET_VP_STATE: u32 = 227; +pub const HVCALL_SET_VP_STATE: u32 = 228; +pub const HVCALL_IMPORT_ISOLATED_PAGES: u32 = 239; +pub const HVCALL_COMPLETE_ISOLATED_IMPORT: u32 = 241; +pub const HVCALL_ISSUE_SNP_PSP_GUEST_REQUEST: u32 = 242; +pub const HVCALL_GET_VP_CPUID_VALUES: u32 = 244; +pub const HVCALL_LOG_HYPERVISOR_SYSTEM_CONFIG: u32 = 248; +pub const HVCALL_DISABLE_HYP_EX: u32 = 271; +pub const HV_MAX_FLUSH_PAGES: u32 = 2048; +pub const HV_GPA_PAGE_RANGE_PAGE_SIZE_2MB: u32 = 0; +pub const HV_GPA_PAGE_RANGE_PAGE_SIZE_1GB: u32 = 1; +pub const HV_FLUSH_ALL_PROCESSORS: u32 = 1; +pub const HV_FLUSH_ALL_VIRTUAL_ADDRESS_SPACES: u32 = 2; +pub const HV_FLUSH_NON_GLOBAL_MAPPINGS_ONLY: u32 = 4; +pub const HV_FLUSH_USE_EXTENDED_RANGE_FORMAT: u32 = 8; +pub const HV_SYNIC_SINT_COUNT: u32 = 16; +pub const HV_SYNIC_INTERCEPTION_SINT_INDEX: u32 = 0; +pub const HV_SYNIC_IOMMU_FAULT_SINT_INDEX: u32 = 1; +pub const HV_SYNIC_VMBUS_SINT_INDEX: u32 = 2; +pub const HV_SYNIC_HAL_HV_TIMER_SINT_INDEX: u32 = 3; +pub const HV_SYNIC_HVL_SHARED_SINT_INDEX: u32 = 4; +pub const HV_SYNIC_FIRST_UNUSED_SINT_INDEX: u32 = 5; +pub const HV_SYNIC_DOORBELL_SINT_INDEX: u32 = 5; +pub const HV_INTERRUPT_VECTOR_NONE: u32 = 4294967295; +pub const HV_SYNIC_STIMER_COUNT: u32 = 4; +pub const HV_MESSAGE_SIZE: u32 = 256; +pub const HV_MESSAGE_PAYLOAD_BYTE_COUNT: u32 = 240; +pub const HV_MESSAGE_PAYLOAD_QWORD_COUNT: u32 = 30; +pub const HV_UNMAP_GPA_LARGE_PAGE: u32 = 2; +pub const HV_INTERCEPT_ACCESS_MASK_NONE: u32 = 0; +pub const HV_INTERCEPT_ACCESS_MASK_READ: u32 = 1; +pub const HV_INTERCEPT_ACCESS_MASK_WRITE: u32 = 2; +pub const HV_INTERCEPT_ACCESS_MASK_EXECUTE: u32 = 4; +pub const HV_INTERCEPT_ACCESS_READ: u32 = 0; +pub const HV_INTERCEPT_ACCESS_WRITE: u32 = 1; +pub const HV_INTERCEPT_ACCESS_EXECUTE: u32 = 2; +pub const HVGDK_H_VERSION: u32 = 25125; +pub const HVHVK_MINI_VERSION: u32 = 25294; +pub const HV_DOORBELL_FLAG_TRIGGER_SIZE_MASK: u32 = 7; +pub const HV_DOORBELL_FLAG_TRIGGER_SIZE_ANY: u32 = 0; +pub const HV_DOORBELL_FLAG_TRIGGER_SIZE_BYTE: u32 = 1; +pub const HV_DOORBELL_FLAG_TRIGGER_SIZE_WORD: u32 = 2; +pub const HV_DOORBELL_FLAG_TRIGGER_SIZE_DWORD: u32 = 3; +pub const HV_DOORBELL_FLAG_TRIGGER_SIZE_QWORD: u32 = 4; +pub const HV_DOORBELL_FLAG_TRIGGER_ANY_VALUE: u32 = 2147483648; +pub const HV_GENERIC_SET_SHIFT: u32 = 6; +pub const HV_GENERIC_SET_MASK: u32 = 63; +pub const HV_PFN_RNG_PAGEBITS: u32 = 24; +pub const HV_MAP_GPA_PERMISSIONS_NONE: u32 = 0; +pub const HV_MAP_GPA_READABLE: u32 = 1; +pub const HV_MAP_GPA_WRITABLE: u32 = 2; +pub const HV_MAP_GPA_KERNEL_EXECUTABLE: u32 = 4; +pub const HV_MAP_GPA_USER_EXECUTABLE: u32 = 8; +pub const HV_MAP_GPA_EXECUTABLE: u32 = 12; +pub const HV_MAP_GPA_PERMISSIONS_MASK: u32 = 15; +pub const HV_MAP_GPA_ADJUSTABLE: u32 = 32768; +pub const HV_MAP_GPA_NOT_CACHED: u32 = 2097152; +pub const HV_MAP_GPA_LARGE_PAGE: u32 = 2147483648; +pub const HV_SOURCE_SHADOW_NONE: u32 = 0; +pub const HV_SOURCE_SHADOW_BRIDGE_BUS_RANGE: u32 = 1; +pub const HV_DEVICE_DOMAIN_TYPE_S2: u32 = 0; +pub const HV_DEVICE_DOMAIN_TYPE_S1: u32 = 1; +pub const HV_DEVICE_DOMAIN_TYPE_SOC: u32 = 2; +pub const HV_DEVICE_DOMAIN_ID_S2_DEFAULT: u32 = 0; +pub const HV_DEVICE_DOMAIN_ID_S2_NULL: u32 = 4294967295; +pub const HVHDK_H_VERSION: u32 = 25212; +pub const HV_X64_REGISTER_CLASS_GENERAL: u32 = 0; +pub const HV_X64_REGISTER_CLASS_IP: u32 = 1; +pub const HV_X64_REGISTER_CLASS_XMM: u32 = 2; +pub const HV_X64_REGISTER_CLASS_SEGMENT: u32 = 3; +pub const HV_X64_REGISTER_CLASS_FLAGS: u32 = 4; +pub const HV_VP_REGISTER_PAGE_VERSION_1: u32 = 1; +pub const HV_VP_REGISTER_PAGE_MAX_VECTOR_COUNT: u32 = 7; +pub const HV_PARTITION_PROCESSOR_FEATURES_BANKS: u32 = 1; +pub const HV_PARTITION_SYNTHETIC_PROCESSOR_FEATURES_BANKS: u32 = 1; +pub const HV_PARTITION_ISOLATION_TYPE_NONE: u32 = 0; +pub const HV_PARTITION_ISOLATION_TYPE_VBS: u32 = 1; +pub const HV_PARTITION_ISOLATION_TYPE_SNP: u32 = 2; +pub const HV_PARTITION_ISOLATION_TYPE_TDX: u32 = 3; +pub const HV_PARTITION_ISOLATION_HOST_TYPE_NONE: u32 = 0; +pub const HV_PARTITION_ISOLATION_HOST_TYPE_HARDWARE: u32 = 1; +pub const HV_PARTITION_ISOLATION_HOST_TYPE_RESERVED: u32 = 2; +pub const HV_PARTITION_CREATION_FLAG_EXO_PARTITION: u32 = 256; +pub const HV_PARTITION_CREATION_FLAG_LAPIC_ENABLED: u32 = 8192; +pub const HV_PARTITION_CREATION_FLAG_INTERCEPT_MESSAGE_PAGE_ENABLED: u32 = 524288; +pub const HV_PARTITION_CREATION_FLAG_X2APIC_CAPABLE: u32 = 4194304; +pub const HV_TRANSLATE_GVA_VALIDATE_READ: u32 = 1; +pub const HV_TRANSLATE_GVA_VALIDATE_WRITE: u32 = 2; +pub const HV_TRANSLATE_GVA_VALIDATE_EXECUTE: u32 = 4; +pub const HV_TRANSLATE_GVA_SET_PAGE_TABLE_BITS: u32 = 16; +pub const HV_TRANSLATE_GVA_TLB_FLUSH_INHIBIT: u32 = 32; +pub const HV_TRANSLATE_GVA_SUPERVISOR_ACCESS: u32 = 64; +pub const HV_TRANSLATE_GVA_USER_ACCESS: u32 = 128; +pub const HV_TRANSLATE_GVA_PAN_SET: u32 = 256; +pub const HV_TRANSLATE_GVA_PAN_CLEAR: u32 = 512; +pub const HV_SYNIC_EVENT_RING_MESSAGE_COUNT: u32 = 63; +pub const HV_ROOT_SCHEDULER_MAX_VPS_PER_CHILD_PARTITION: u32 = 1024; +pub const HV_EVENTLOG_BUFFER_INDEX_NONE: u32 = 4294967295; +pub const HV_DISPATCH_VP_FLAG_CLEAR_INTERCEPT_SUSPEND: u32 = 1; +pub const HV_DISPATCH_VP_FLAG_ENABLE_CALLER_INTERRUPTS: u32 = 2; +pub const HV_DISPATCH_VP_FLAG_SET_CALLER_SPEC_CTRL: u32 = 4; +pub const HV_DISPATCH_VP_FLAG_SKIP_VP_SPEC_FLUSH: u32 = 8; +pub const HV_DISPATCH_VP_FLAG_SKIP_CALLER_SPEC_FLUSH: u32 = 16; +pub const HV_DISPATCH_VP_FLAG_SKIP_CALLER_USER_SPEC_FLUSH: u32 = 32; +pub const HV_DISPATCH_VP_FLAG_SCAN_INTERRUPT_INJECTION: u32 = 64; +pub const HV_MODIFY_SPA_PAGE_HOST_ACCESS_MAKE_EXCLUSIVE: u32 = 1; +pub const HV_MODIFY_SPA_PAGE_HOST_ACCESS_MAKE_SHARED: u32 = 2; +pub const HV_MODIFY_SPA_PAGE_HOST_ACCESS_LARGE_PAGE: u32 = 4; +pub const HV_MODIFY_SPA_PAGE_HOST_ACCESS_HUGE_PAGE: u32 = 8; +pub const HV_PSP_CPUID_LEAF_COUNT_MAX: u32 = 64; +pub const HV_READ_WRITE_GPA_MAX_SIZE: u32 = 16; +pub const MSHV_IOCTL: u32 = 184; +pub const MSHV_VP_MAX_REGISTERS: u32 = 128; +pub const MSHV_API_VERSION: u32 = 0; +pub const MSHV_IRQFD_FLAG_DEASSIGN: u32 = 1; +pub const MSHV_IRQFD_FLAG_RESAMPLE: u32 = 2; +pub const MSHV_CREATE_DEVICE_TEST: u32 = 1; +pub const MSHV_DEV_VFIO_GROUP: u32 = 1; +pub const MSHV_DEV_VFIO_GROUP_ADD: u32 = 1; +pub const MSHV_DEV_VFIO_GROUP_DEL: u32 = 2; +pub const MSHV_DIAG_IOCTL: u32 = 185; +pub const MSHV_TRACE_IOCTL: u32 = 186; +pub type bool_ = bool; +pub type __s8 = ::std::os::raw::c_schar; +pub type __u8 = ::std::os::raw::c_uchar; +pub type __s16 = ::std::os::raw::c_short; +pub type __u16 = ::std::os::raw::c_ushort; +pub type __s32 = ::std::os::raw::c_int; +pub type __u32 = ::std::os::raw::c_uint; +pub type __s64 = ::std::os::raw::c_longlong; +pub type __u64 = ::std::os::raw::c_ulonglong; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct __kernel_fd_set { + pub fds_bits: [::std::os::raw::c_ulong; 16usize], +} +#[test] +fn bindgen_test_layout___kernel_fd_set() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fd_set> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__kernel_fd_set>(), + 128usize, + concat!("Size of: ", stringify!(__kernel_fd_set)) + ); + assert_eq!( + ::std::mem::align_of::<__kernel_fd_set>(), + 8usize, + concat!("Alignment of ", stringify!(__kernel_fd_set)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fds_bits) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_fd_set), + "::", + stringify!(fds_bits) + ) + ); +} +pub type __kernel_sighandler_t = + ::std::option::Option; +pub type __kernel_key_t = ::std::os::raw::c_int; +pub type __kernel_mqd_t = ::std::os::raw::c_int; +pub type __kernel_old_uid_t = ::std::os::raw::c_ushort; +pub type __kernel_old_gid_t = ::std::os::raw::c_ushort; +pub type __kernel_long_t = ::std::os::raw::c_long; +pub type __kernel_ulong_t = ::std::os::raw::c_ulong; +pub type __kernel_ino_t = __kernel_ulong_t; +pub type __kernel_mode_t = ::std::os::raw::c_uint; +pub type __kernel_pid_t = ::std::os::raw::c_int; +pub type __kernel_ipc_pid_t = ::std::os::raw::c_int; +pub type __kernel_uid_t = ::std::os::raw::c_uint; +pub type __kernel_gid_t = ::std::os::raw::c_uint; +pub type __kernel_suseconds_t = __kernel_long_t; +pub type __kernel_daddr_t = ::std::os::raw::c_int; +pub type __kernel_uid32_t = ::std::os::raw::c_uint; +pub type __kernel_gid32_t = ::std::os::raw::c_uint; +pub type __kernel_old_dev_t = ::std::os::raw::c_uint; +pub type __kernel_size_t = __kernel_ulong_t; +pub type __kernel_ssize_t = __kernel_long_t; +pub type __kernel_ptrdiff_t = __kernel_long_t; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct __kernel_fsid_t { + pub val: [::std::os::raw::c_int; 2usize], +} +#[test] +fn bindgen_test_layout___kernel_fsid_t() { + const UNINIT: ::std::mem::MaybeUninit<__kernel_fsid_t> = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::<__kernel_fsid_t>(), + 8usize, + concat!("Size of: ", stringify!(__kernel_fsid_t)) + ); + assert_eq!( + ::std::mem::align_of::<__kernel_fsid_t>(), + 4usize, + concat!("Alignment of ", stringify!(__kernel_fsid_t)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).val) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(__kernel_fsid_t), + "::", + stringify!(val) + ) + ); +} +pub type __kernel_off_t = __kernel_long_t; +pub type __kernel_loff_t = ::std::os::raw::c_longlong; +pub type __kernel_old_time_t = __kernel_long_t; +pub type __kernel_time_t = __kernel_long_t; +pub type __kernel_time64_t = ::std::os::raw::c_longlong; +pub type __kernel_clock_t = __kernel_long_t; +pub type __kernel_timer_t = ::std::os::raw::c_int; +pub type __kernel_clockid_t = ::std::os::raw::c_int; +pub type __kernel_caddr_t = *mut ::std::os::raw::c_char; +pub type __kernel_uid16_t = ::std::os::raw::c_ushort; +pub type __kernel_gid16_t = ::std::os::raw::c_ushort; +pub type __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; +pub type hv_nano100_time_t = __u64; +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_u128 { + pub low_part: __u64, + pub high_part: __u64, +} +#[test] +fn bindgen_test_layout_hv_u128() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_u128)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_u128)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).low_part) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_u128), + "::", + stringify!(low_part) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).high_part) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_u128), + "::", + stringify!(high_part) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_get_partition_id { + pub partition_id: __u64, +} +#[test] +fn bindgen_test_layout_hv_get_partition_id() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_get_partition_id)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_get_partition_id)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_get_partition_id), + "::", + stringify!(partition_id) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_reference_tsc_msr { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_reference_tsc_msr__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_reference_tsc_msr__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_reference_tsc_msr__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_reference_tsc_msr__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_reference_tsc_msr__bindgen_ty_1) + ) + ); +} +impl hv_reference_tsc_msr__bindgen_ty_1 { + #[inline] + pub fn enable(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn pfn(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_pfn(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + enable: __u64, + reserved: __u64, + pfn: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable: u64 = unsafe { ::std::mem::transmute(enable) }; + enable as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let pfn: u64 = unsafe { ::std::mem::transmute(pfn) }; + pfn as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_reference_tsc_msr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_reference_tsc_msr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_reference_tsc_msr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_reference_tsc_msr), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_reference_tsc_msr { + 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, packed)] +pub struct hv_vpset { + pub format: __u64, + pub valid_bank_mask: __u64, + pub bank_contents: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_vpset() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_vpset)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_vpset)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).format) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vpset), + "::", + stringify!(format) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).valid_bank_mask) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_vpset), + "::", + stringify!(valid_bank_mask) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bank_contents) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_vpset), + "::", + stringify!(bank_contents) + ) + ); +} +impl Default for hv_vpset { + 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 union hv_hypervisor_version_info { + pub __bindgen_anon_1: hv_hypervisor_version_info__bindgen_ty_1, + pub __bindgen_anon_2: hv_hypervisor_version_info__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_hypervisor_version_info__bindgen_ty_1 { + pub build_number: __u32, + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub service_pack: __u32, + pub _bitfield_align_2: [u32; 0], + pub _bitfield_2: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_hypervisor_version_info__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_hypervisor_version_info__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).build_number) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_1), + "::", + stringify!(build_number) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).service_pack) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_1), + "::", + stringify!(service_pack) + ) + ); +} +impl hv_hypervisor_version_info__bindgen_ty_1 { + #[inline] + pub fn minor_version(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 16u8) as u32) } + } + #[inline] + pub fn set_minor_version(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 16u8, val as u64) + } + } + #[inline] + pub fn major_version(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) } + } + #[inline] + pub fn set_major_version(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 16u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + minor_version: __u32, + major_version: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 16u8, { + let minor_version: u32 = unsafe { ::std::mem::transmute(minor_version) }; + minor_version as u64 + }); + __bindgen_bitfield_unit.set(16usize, 16u8, { + let major_version: u32 = unsafe { ::std::mem::transmute(major_version) }; + major_version as u64 + }); + __bindgen_bitfield_unit + } + #[inline] + pub fn service_number(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set_service_number(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub fn service_branch(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_2.get(24usize, 8u8) as u32) } + } + #[inline] + pub fn set_service_branch(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_2.set(24usize, 8u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_2( + service_number: __u32, + service_branch: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let service_number: u32 = unsafe { ::std::mem::transmute(service_number) }; + service_number as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let service_branch: u32 = unsafe { ::std::mem::transmute(service_branch) }; + service_branch as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_hypervisor_version_info__bindgen_ty_2 { + pub eax: __u32, + pub ebx: __u32, + pub ecx: __u32, + pub edx: __u32, +} +#[test] +fn bindgen_test_layout_hv_hypervisor_version_info__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_hypervisor_version_info__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_2), + "::", + stringify!(eax) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_2), + "::", + stringify!(ebx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_2), + "::", + stringify!(ecx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_hypervisor_version_info__bindgen_ty_2), + "::", + stringify!(edx) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_hypervisor_version_info() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_hypervisor_version_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_hypervisor_version_info)) + ); +} +impl Default for hv_hypervisor_version_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() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_vp_assist_msr_contents { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_vp_assist_msr_contents__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_vp_assist_msr_contents__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_vp_assist_msr_contents__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_vp_assist_msr_contents__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_vp_assist_msr_contents__bindgen_ty_1) + ) + ); +} +impl hv_vp_assist_msr_contents__bindgen_ty_1 { + #[inline] + pub fn enable(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn pfn(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_pfn(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + enable: __u64, + reserved: __u64, + pfn: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable: u64 = unsafe { ::std::mem::transmute(enable) }; + enable as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let pfn: u64 = unsafe { ::std::mem::transmute(pfn) }; + pfn as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_vp_assist_msr_contents() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_vp_assist_msr_contents)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_vp_assist_msr_contents)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_msr_contents), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_vp_assist_msr_contents { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_guest_mapping_flush { + pub address_space: __u64, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_hv_guest_mapping_flush() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_guest_mapping_flush)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_guest_mapping_flush)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_space) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_guest_mapping_flush), + "::", + stringify!(address_space) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_guest_mapping_flush), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_gpa_page_range { + pub address_space: __u64, + pub page: hv_gpa_page_range__bindgen_ty_1, + pub __bindgen_anon_1: hv_gpa_page_range__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_gpa_page_range__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_gpa_page_range__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_gpa_page_range__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_gpa_page_range__bindgen_ty_1)) + ); +} +impl hv_gpa_page_range__bindgen_ty_1 { + #[inline] + pub fn additional_pages(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 11u8) as u64) } + } + #[inline] + pub fn set_additional_pages(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 11u8, val as u64) + } + } + #[inline] + pub fn largepage(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_largepage(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn basepfn(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_basepfn(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + additional_pages: __u64, + largepage: __u64, + basepfn: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 11u8, { + let additional_pages: u64 = unsafe { ::std::mem::transmute(additional_pages) }; + additional_pages as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let largepage: u64 = unsafe { ::std::mem::transmute(largepage) }; + largepage as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let basepfn: u64 = unsafe { ::std::mem::transmute(basepfn) }; + basepfn as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_gpa_page_range__bindgen_ty_2 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_gpa_page_range__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_gpa_page_range__bindgen_ty_2)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_gpa_page_range__bindgen_ty_2)) + ); +} +impl hv_gpa_page_range__bindgen_ty_2 { + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 12u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 12u8, val as u64) + } + } + #[inline] + pub fn page_size(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_page_size(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 8u8) as u64) } + } + #[inline] + pub fn set_reserved1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 8u8, val as u64) + } + } + #[inline] + pub fn base_large_pfn(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 43u8) as u64) } + } + #[inline] + pub fn set_base_large_pfn(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 43u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + reserved: __u64, + page_size: __u64, + reserved1: __u64, + base_large_pfn: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 12u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let page_size: u64 = unsafe { ::std::mem::transmute(page_size) }; + page_size as u64 + }); + __bindgen_bitfield_unit.set(13usize, 8u8, { + let reserved1: u64 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit.set(21usize, 43u8, { + let base_large_pfn: u64 = unsafe { ::std::mem::transmute(base_large_pfn) }; + base_large_pfn as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_gpa_page_range() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_gpa_page_range)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_gpa_page_range)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_space) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_gpa_page_range), + "::", + stringify!(address_space) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_gpa_page_range), + "::", + stringify!(page) + ) + ); +} +impl Default for hv_gpa_page_range { + 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 hv_interrupt_type_HV_ARM64_INTERRUPT_TYPE_FIXED: hv_interrupt_type = 0; +pub const hv_interrupt_type_HV_ARM64_INTERRUPT_TYPE_MAXIMUM: hv_interrupt_type = 8; +pub type hv_interrupt_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_synic_sint { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_synic_sint__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_sint__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_synic_sint__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_sint__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_sint__bindgen_ty_1)) + ); +} +impl hv_synic_sint__bindgen_ty_1 { + #[inline] + pub fn vector(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } + } + #[inline] + pub fn set_vector(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub fn reserved1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) } + } + #[inline] + pub fn set_reserved1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) + } + } + #[inline] + pub fn masked(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u64) } + } + #[inline] + pub fn set_masked(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn auto_eoi(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_auto_eoi(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn polling(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_polling(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn as_intercept(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_as_intercept(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn proxy(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_proxy(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved2(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 43u8) as u64) } + } + #[inline] + pub fn set_reserved2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 43u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + vector: __u64, + reserved1: __u64, + masked: __u64, + auto_eoi: __u64, + polling: __u64, + as_intercept: __u64, + proxy: __u64, + reserved2: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let vector: u64 = unsafe { ::std::mem::transmute(vector) }; + vector as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let reserved1: u64 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let masked: u64 = unsafe { ::std::mem::transmute(masked) }; + masked as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let auto_eoi: u64 = unsafe { ::std::mem::transmute(auto_eoi) }; + auto_eoi as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let polling: u64 = unsafe { ::std::mem::transmute(polling) }; + polling as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let as_intercept: u64 = unsafe { ::std::mem::transmute(as_intercept) }; + as_intercept as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let proxy: u64 = unsafe { ::std::mem::transmute(proxy) }; + proxy as u64 + }); + __bindgen_bitfield_unit.set(21usize, 43u8, { + let reserved2: u64 = unsafe { ::std::mem::transmute(reserved2) }; + reserved2 as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_synic_sint() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_sint)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_synic_sint)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_sint), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_synic_sint { + 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 union hv_x64_xsave_xfem_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_x64_xsave_xfem_register__bindgen_ty_1, + pub __bindgen_anon_2: hv_x64_xsave_xfem_register__bindgen_ty_2, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_xsave_xfem_register__bindgen_ty_1 { + pub low_uint32: __u32, + pub high_uint32: __u32, +} +#[test] +fn bindgen_test_layout_hv_x64_xsave_xfem_register__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_xsave_xfem_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_xsave_xfem_register__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).low_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xsave_xfem_register__bindgen_ty_1), + "::", + stringify!(low_uint32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).high_uint32) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xsave_xfem_register__bindgen_ty_1), + "::", + stringify!(high_uint32) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_xsave_xfem_register__bindgen_ty_2 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_xsave_xfem_register__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_xsave_xfem_register__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_xsave_xfem_register__bindgen_ty_2) + ) + ); +} +impl hv_x64_xsave_xfem_register__bindgen_ty_2 { + #[inline] + pub fn legacy_x87(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_legacy_x87(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn legacy_sse(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_legacy_sse(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn avx(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_avx(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn mpx_bndreg(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_mpx_bndreg(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn mpx_bndcsr(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_mpx_bndcsr(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn avx_512_op_mask(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_avx_512_op_mask(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn avx_512_zmmhi(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_avx_512_zmmhi(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn avx_512_zmm16_31(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_avx_512_zmm16_31(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn rsvd8_9(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u64) } + } + #[inline] + pub fn set_rsvd8_9(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 2u8, val as u64) + } + } + #[inline] + pub fn pasid(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_pasid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn cet_u(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_cet_u(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn cet_s(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_cet_s(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn rsvd13_16(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 4u8) as u64) } + } + #[inline] + pub fn set_rsvd13_16(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 4u8, val as u64) + } + } + #[inline] + pub fn xtile_cfg(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_xtile_cfg(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn xtile_data(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_xtile_data(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn rsvd19_63(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 45u8) as u64) } + } + #[inline] + pub fn set_rsvd19_63(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 45u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + legacy_x87: __u64, + legacy_sse: __u64, + avx: __u64, + mpx_bndreg: __u64, + mpx_bndcsr: __u64, + avx_512_op_mask: __u64, + avx_512_zmmhi: __u64, + avx_512_zmm16_31: __u64, + rsvd8_9: __u64, + pasid: __u64, + cet_u: __u64, + cet_s: __u64, + rsvd13_16: __u64, + xtile_cfg: __u64, + xtile_data: __u64, + rsvd19_63: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let legacy_x87: u64 = unsafe { ::std::mem::transmute(legacy_x87) }; + legacy_x87 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let legacy_sse: u64 = unsafe { ::std::mem::transmute(legacy_sse) }; + legacy_sse as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let avx: u64 = unsafe { ::std::mem::transmute(avx) }; + avx as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let mpx_bndreg: u64 = unsafe { ::std::mem::transmute(mpx_bndreg) }; + mpx_bndreg as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let mpx_bndcsr: u64 = unsafe { ::std::mem::transmute(mpx_bndcsr) }; + mpx_bndcsr as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let avx_512_op_mask: u64 = unsafe { ::std::mem::transmute(avx_512_op_mask) }; + avx_512_op_mask as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let avx_512_zmmhi: u64 = unsafe { ::std::mem::transmute(avx_512_zmmhi) }; + avx_512_zmmhi as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let avx_512_zmm16_31: u64 = unsafe { ::std::mem::transmute(avx_512_zmm16_31) }; + avx_512_zmm16_31 as u64 + }); + __bindgen_bitfield_unit.set(8usize, 2u8, { + let rsvd8_9: u64 = unsafe { ::std::mem::transmute(rsvd8_9) }; + rsvd8_9 as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let pasid: u64 = unsafe { ::std::mem::transmute(pasid) }; + pasid as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let cet_u: u64 = unsafe { ::std::mem::transmute(cet_u) }; + cet_u as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let cet_s: u64 = unsafe { ::std::mem::transmute(cet_s) }; + cet_s as u64 + }); + __bindgen_bitfield_unit.set(13usize, 4u8, { + let rsvd13_16: u64 = unsafe { ::std::mem::transmute(rsvd13_16) }; + rsvd13_16 as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let xtile_cfg: u64 = unsafe { ::std::mem::transmute(xtile_cfg) }; + xtile_cfg as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let xtile_data: u64 = unsafe { ::std::mem::transmute(xtile_data) }; + xtile_data as u64 + }); + __bindgen_bitfield_unit.set(19usize, 45u8, { + let rsvd19_63: u64 = unsafe { ::std::mem::transmute(rsvd19_63) }; + rsvd19_63 as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_xsave_xfem_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_x64_xsave_xfem_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_x64_xsave_xfem_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xsave_xfem_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_x64_xsave_xfem_register { + 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 union hv_stimer_config { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_stimer_config__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stimer_config__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_stimer_config__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_stimer_config__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_stimer_config__bindgen_ty_1)) + ); +} +impl hv_stimer_config__bindgen_ty_1 { + #[inline] + pub fn enable(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn periodic(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_periodic(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn lazy(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_lazy(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn auto_enable(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_auto_enable(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn apic_vector(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 8u8) as u64) } + } + #[inline] + pub fn set_apic_vector(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 8u8, val as u64) + } + } + #[inline] + pub fn direct_mode(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_direct_mode(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z0(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u64) } + } + #[inline] + pub fn set_reserved_z0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 3u8, val as u64) + } + } + #[inline] + pub fn sintx(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 4u8) as u64) } + } + #[inline] + pub fn set_sintx(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 4u8, val as u64) + } + } + #[inline] + pub fn reserved_z1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 44u8) as u64) } + } + #[inline] + pub fn set_reserved_z1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 44u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + enable: __u64, + periodic: __u64, + lazy: __u64, + auto_enable: __u64, + apic_vector: __u64, + direct_mode: __u64, + reserved_z0: __u64, + sintx: __u64, + reserved_z1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable: u64 = unsafe { ::std::mem::transmute(enable) }; + enable as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let periodic: u64 = unsafe { ::std::mem::transmute(periodic) }; + periodic as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let lazy: u64 = unsafe { ::std::mem::transmute(lazy) }; + lazy as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let auto_enable: u64 = unsafe { ::std::mem::transmute(auto_enable) }; + auto_enable as u64 + }); + __bindgen_bitfield_unit.set(4usize, 8u8, { + let apic_vector: u64 = unsafe { ::std::mem::transmute(apic_vector) }; + apic_vector as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let direct_mode: u64 = unsafe { ::std::mem::transmute(direct_mode) }; + direct_mode as u64 + }); + __bindgen_bitfield_unit.set(13usize, 3u8, { + let reserved_z0: u64 = unsafe { ::std::mem::transmute(reserved_z0) }; + reserved_z0 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 4u8, { + let sintx: u64 = unsafe { ::std::mem::transmute(sintx) }; + sintx as u64 + }); + __bindgen_bitfield_unit.set(20usize, 44u8, { + let reserved_z1: u64 = unsafe { ::std::mem::transmute(reserved_z1) }; + reserved_z1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_stimer_config() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_stimer_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_stimer_config)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_config), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_stimer_config { + 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 union hv_port_id { + pub as__u32: __u32, + pub u: hv_port_id__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_port_id__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_port_id__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_port_id__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_port_id__bindgen_ty_1)) + ); +} +impl hv_port_id__bindgen_ty_1 { + #[inline] + pub fn id(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set_id(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 8u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1(id: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let id: u32 = unsafe { ::std::mem::transmute(id) }; + id as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_port_id() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_port_id)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_port_id)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as__u32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_id), + "::", + stringify!(as__u32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_id), + "::", + stringify!(u) + ) + ); +} +impl Default for hv_port_id { + 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 hv_message_type_HVMSG_NONE: hv_message_type = 0; +pub const hv_message_type_HVMSG_UNMAPPED_GPA: hv_message_type = 2147483648; +pub const hv_message_type_HVMSG_GPA_INTERCEPT: hv_message_type = 2147483649; +pub const hv_message_type_HVMSG_UNACCEPTED_GPA: hv_message_type = 2147483651; +pub const hv_message_type_HVMSG_GPA_ATTRIBUTE_INTERCEPT: hv_message_type = 2147483652; +pub const hv_message_type_HVMSG_TIMER_EXPIRED: hv_message_type = 2147483664; +pub const hv_message_type_HVMSG_INVALID_VP_REGISTER_VALUE: hv_message_type = 2147483680; +pub const hv_message_type_HVMSG_UNRECOVERABLE_EXCEPTION: hv_message_type = 2147483681; +pub const hv_message_type_HVMSG_UNSUPPORTED_FEATURE: hv_message_type = 2147483682; +pub const hv_message_type_HVMSG_OPAQUE_INTERCEPT: hv_message_type = 2147483711; +pub const hv_message_type_HVMSG_EVENTLOG_BUFFERCOMPLETE: hv_message_type = 2147483712; +pub const hv_message_type_HVMSG_HYPERCALL_INTERCEPT: hv_message_type = 2147483728; +pub const hv_message_type_HVMSG_SYNIC_EVENT_INTERCEPT: hv_message_type = 2147483744; +pub const hv_message_type_HVMSG_SYNIC_SINT_INTERCEPT: hv_message_type = 2147483745; +pub const hv_message_type_HVMSG_SYNIC_SINT_DELIVERABLE: hv_message_type = 2147483746; +pub const hv_message_type_HVMSG_ASYNC_CALL_COMPLETION: hv_message_type = 2147483760; +pub const hv_message_type_HVMSG_SCHEDULER_VP_SIGNAL_BITSET: hv_message_type = 2147483904; +pub const hv_message_type_HVMSG_SCHEDULER_VP_SIGNAL_PAIR: hv_message_type = 2147483905; +pub const hv_message_type_HVMSG_X64_IO_PORT_INTERCEPT: hv_message_type = 2147549184; +pub const hv_message_type_HVMSG_X64_MSR_INTERCEPT: hv_message_type = 2147549185; +pub const hv_message_type_HVMSG_X64_CPUID_INTERCEPT: hv_message_type = 2147549186; +pub const hv_message_type_HVMSG_X64_EXCEPTION_INTERCEPT: hv_message_type = 2147549187; +pub const hv_message_type_HVMSG_X64_APIC_EOI: hv_message_type = 2147549188; +pub const hv_message_type_HVMSG_X64_LEGACY_FP_ERROR: hv_message_type = 2147549189; +pub const hv_message_type_HVMSG_X64_IOMMU_PRQ: hv_message_type = 2147549190; +pub const hv_message_type_HVMSG_X64_HALT: hv_message_type = 2147549191; +pub const hv_message_type_HVMSG_X64_INTERRUPTION_DELIVERABLE: hv_message_type = 2147549192; +pub const hv_message_type_HVMSG_X64_SIPI_INTERCEPT: hv_message_type = 2147549193; +pub const hv_message_type_HVMSG_X64_SEV_VMGEXIT_INTERCEPT: hv_message_type = 2147549203; +pub type hv_message_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_synic_simp { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_synic_simp__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_simp__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_synic_simp__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_simp__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_simp__bindgen_ty_1)) + ); +} +impl hv_synic_simp__bindgen_ty_1 { + #[inline] + pub fn simp_enabled(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_simp_enabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn preserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_preserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn base_simp_gpa(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_base_simp_gpa(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + simp_enabled: __u64, + preserved: __u64, + base_simp_gpa: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let simp_enabled: u64 = unsafe { ::std::mem::transmute(simp_enabled) }; + simp_enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let preserved: u64 = unsafe { ::std::mem::transmute(preserved) }; + preserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let base_simp_gpa: u64 = unsafe { ::std::mem::transmute(base_simp_gpa) }; + base_simp_gpa as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_synic_simp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_simp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_synic_simp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_simp), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_synic_simp { + 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 union hv_message_flags { + pub asu8: __u8, + pub __bindgen_anon_1: hv_message_flags__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_message_flags__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +#[test] +fn bindgen_test_layout_hv_message_flags__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(hv_message_flags__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_message_flags__bindgen_ty_1)) + ); +} +impl hv_message_flags__bindgen_ty_1 { + #[inline] + pub fn msg_pending(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_msg_pending(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 7u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 7u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + msg_pending: __u8, + reserved: __u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let msg_pending: u8 = unsafe { ::std::mem::transmute(msg_pending) }; + msg_pending as u64 + }); + __bindgen_bitfield_unit.set(1usize, 7u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_message_flags() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(hv_message_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_message_flags)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).asu8) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message_flags), + "::", + stringify!(asu8) + ) + ); +} +impl Default for hv_message_flags { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_message_header { + pub message_type: __u32, + pub payload_size: __u8, + pub message_flags: hv_message_flags, + pub reserved: [__u8; 2usize], + pub __bindgen_anon_1: hv_message_header__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_message_header__bindgen_ty_1 { + pub sender: __u64, + pub port: hv_port_id, +} +#[test] +fn bindgen_test_layout_hv_message_header__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_message_header__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_message_header__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sender) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message_header__bindgen_ty_1), + "::", + stringify!(sender) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message_header__bindgen_ty_1), + "::", + stringify!(port) + ) + ); +} +impl Default for hv_message_header__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_message_header() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_message_header)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_message_header)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).message_type) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message_header), + "::", + stringify!(message_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).payload_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_message_header), + "::", + stringify!(payload_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).message_flags) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(hv_message_header), + "::", + stringify!(message_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(hv_message_header), + "::", + stringify!(reserved) + ) + ); +} +impl Default for hv_message_header { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_notification_message_payload { + pub sint_index: __u32, +} +#[test] +fn bindgen_test_layout_hv_notification_message_payload() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_notification_message_payload)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_notification_message_payload)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_notification_message_payload), + "::", + stringify!(sint_index) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_message { + pub header: hv_message_header, + pub u: hv_message__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_message__bindgen_ty_1 { + pub payload: [__u64; 30usize], +} +#[test] +fn bindgen_test_layout_hv_message__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 240usize, + concat!("Size of: ", stringify!(hv_message__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_message__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).payload) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message__bindgen_ty_1), + "::", + stringify!(payload) + ) + ); +} +impl Default for hv_message__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_message() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(hv_message)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_message)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message), + "::", + stringify!(header) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_message), + "::", + stringify!(u) + ) + ); +} +impl Default for hv_message { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_message_page { + pub sint_message: [hv_message; 16usize], +} +#[test] +fn bindgen_test_layout_hv_message_page() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4096usize, + concat!("Size of: ", stringify!(hv_message_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_message_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint_message) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_message_page), + "::", + stringify!(sint_message) + ) + ); +} +impl Default for hv_message_page { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_x64_segment_register { + pub base: __u64, + pub limit: __u32, + pub selector: __u16, + pub __bindgen_anon_1: hv_x64_segment_register__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_x64_segment_register__bindgen_ty_1 { + pub __bindgen_anon_1: hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1, + pub attributes: __u16, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!( + "Size of: ", + stringify!(hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1) + ) + ); +} +impl hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn segment_type(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) } + } + #[inline] + pub fn set_segment_type(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub fn non_system_segment(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) } + } + #[inline] + pub fn set_non_system_segment(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn descriptor_privilege_level(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u16) } + } + #[inline] + pub fn set_descriptor_privilege_level(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 2u8, val as u64) + } + } + #[inline] + pub fn present(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u16) } + } + #[inline] + pub fn set_present(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u16) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 4u8, val as u64) + } + } + #[inline] + pub fn available(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) } + } + #[inline] + pub fn set_available(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn _long(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) } + } + #[inline] + pub fn set__long(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn _default(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u16) } + } + #[inline] + pub fn set__default(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn granularity(&self) -> __u16 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u16) } + } + #[inline] + pub fn set_granularity(&mut self, val: __u16) { + unsafe { + let val: u16 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + segment_type: __u16, + non_system_segment: __u16, + descriptor_privilege_level: __u16, + present: __u16, + reserved: __u16, + available: __u16, + _long: __u16, + _default: __u16, + granularity: __u16, + ) -> __BindgenBitfieldUnit<[u8; 2usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let segment_type: u16 = unsafe { ::std::mem::transmute(segment_type) }; + segment_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let non_system_segment: u16 = unsafe { ::std::mem::transmute(non_system_segment) }; + non_system_segment as u64 + }); + __bindgen_bitfield_unit.set(5usize, 2u8, { + let descriptor_privilege_level: u16 = + unsafe { ::std::mem::transmute(descriptor_privilege_level) }; + descriptor_privilege_level as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let present: u16 = unsafe { ::std::mem::transmute(present) }; + present as u64 + }); + __bindgen_bitfield_unit.set(8usize, 4u8, { + let reserved: u16 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let available: u16 = unsafe { ::std::mem::transmute(available) }; + available as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let _long: u16 = unsafe { ::std::mem::transmute(_long) }; + _long as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let _default: u16 = unsafe { ::std::mem::transmute(_default) }; + _default as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let granularity: u16 = unsafe { ::std::mem::transmute(granularity) }; + granularity as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_segment_register__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!( + "Size of: ", + stringify!(hv_x64_segment_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 2usize, + concat!( + "Alignment of ", + stringify!(hv_x64_segment_register__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).attributes) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_segment_register__bindgen_ty_1), + "::", + stringify!(attributes) + ) + ); +} +impl Default for hv_x64_segment_register__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_x64_segment_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_x64_segment_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_x64_segment_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_segment_register), + "::", + stringify!(base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_segment_register), + "::", + stringify!(limit) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).selector) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_segment_register), + "::", + stringify!(selector) + ) + ); +} +impl Default for hv_x64_segment_register { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_table_register { + pub pad: [__u16; 3usize], + pub limit: __u16, + pub base: __u64, +} +#[test] +fn bindgen_test_layout_hv_x64_table_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_x64_table_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_x64_table_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_table_register), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_table_register), + "::", + stringify!(limit) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_table_register), + "::", + stringify!(base) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_x64_fp_control_status_register { + pub as_uint128: hv_u128, + pub __bindgen_anon_1: hv_x64_fp_control_status_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_x64_fp_control_status_register__bindgen_ty_1 { + pub fp_control: __u16, + pub fp_status: __u16, + pub fp_tag: __u8, + pub reserved: __u8, + pub last_fp_op: __u16, + pub __bindgen_anon_1: hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1 { + pub last_fp_rip: __u64, + pub __bindgen_anon_1: + hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { + pub last_fp_eip: __u32, + pub last_fp_cs: __u16, + pub padding: __u16, +} +#[test] +fn bindgen_test_layout_hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() +{ + const UNINIT: ::std::mem::MaybeUninit< + hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::< + hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + >(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_eip) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(last_fp_eip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_cs) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(last_fp_cs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(padding) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_rip) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(last_fp_rip) + ) + ); +} +impl Default for hv_x64_fp_control_status_register__bindgen_ty_1__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_x64_fp_control_status_register__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fp_control) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1), + "::", + stringify!(fp_control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fp_status) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1), + "::", + stringify!(fp_status) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fp_tag) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1), + "::", + stringify!(fp_tag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_op) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register__bindgen_ty_1), + "::", + stringify!(last_fp_op) + ) + ); +} +impl Default for hv_x64_fp_control_status_register__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_x64_fp_control_status_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_x64_fp_control_status_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_fp_control_status_register) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint128) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_control_status_register), + "::", + stringify!(as_uint128) + ) + ); +} +impl Default for hv_x64_fp_control_status_register { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_x64_xmm_control_status_register { + pub as_uint128: hv_u128, + pub __bindgen_anon_1: hv_x64_xmm_control_status_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_x64_xmm_control_status_register__bindgen_ty_1 { + pub __bindgen_anon_1: hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1, + pub xmm_status_control: __u32, + pub xmm_status_control_mask: __u32, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1 { + pub last_fp_rdp: __u64, + pub __bindgen_anon_1: + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 { + pub last_fp_dp: __u32, + pub last_fp_ds: __u16, + pub padding: __u16, +} +#[test] +fn bindgen_test_layout_hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1( +) { + const UNINIT: ::std::mem::MaybeUninit< + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::< + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + >(), + 8usize, + concat!( + "Size of: ", + stringify!( + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 + ) + ) + ); + assert_eq!( + ::std::mem::align_of::< + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1, + >(), + 1usize, + concat!( + "Alignment of ", + stringify!( + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 + ) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_dp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!( + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(last_fp_dp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_ds) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!( + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(last_fp_ds) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!( + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 + ), + "::", + stringify!(padding) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).last_fp_rdp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(last_fp_rdp) + ) + ); +} +impl Default for hv_x64_xmm_control_status_register__bindgen_ty_1__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_x64_xmm_control_status_register__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xmm_status_control) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1), + "::", + stringify!(xmm_status_control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xmm_status_control_mask) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1), + "::", + stringify!(xmm_status_control_mask) + ) + ); +} +impl Default for hv_x64_xmm_control_status_register__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_x64_xmm_control_status_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_x64_xmm_control_status_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_xmm_control_status_register) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint128) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_xmm_control_status_register), + "::", + stringify!(as_uint128) + ) + ); +} +impl Default for hv_x64_xmm_control_status_register { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_x64_fp_register { + pub as_uint128: hv_u128, + pub __bindgen_anon_1: hv_x64_fp_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_fp_register__bindgen_ty_1 { + pub mantissa: __u64, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_fp_register__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_x64_fp_register__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_fp_register__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mantissa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_register__bindgen_ty_1), + "::", + stringify!(mantissa) + ) + ); +} +impl hv_x64_fp_register__bindgen_ty_1 { + #[inline] + pub fn biased_exponent(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 15u8) as u64) } + } + #[inline] + pub fn set_biased_exponent(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 15u8, val as u64) + } + } + #[inline] + pub fn sign(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u64) } + } + #[inline] + pub fn set_sign(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 48u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 48u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + biased_exponent: __u64, + sign: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 15u8, { + let biased_exponent: u64 = unsafe { ::std::mem::transmute(biased_exponent) }; + biased_exponent as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let sign: u64 = unsafe { ::std::mem::transmute(sign) }; + sign as u64 + }); + __bindgen_bitfield_unit.set(16usize, 48u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_fp_register() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_x64_fp_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_x64_fp_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint128) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_fp_register), + "::", + stringify!(as_uint128) + ) + ); +} +impl Default for hv_x64_fp_register { + 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 union hv_x64_msr_npiep_config_contents { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_x64_msr_npiep_config_contents__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_msr_npiep_config_contents__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_msr_npiep_config_contents__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_msr_npiep_config_contents__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_msr_npiep_config_contents__bindgen_ty_1) + ) + ); +} +impl hv_x64_msr_npiep_config_contents__bindgen_ty_1 { + #[inline] + pub fn prevents_gdt(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_prevents_gdt(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn prevents_idt(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_prevents_idt(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn prevents_ldt(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_prevents_ldt(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn prevents_tr(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_prevents_tr(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 60u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 60u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + prevents_gdt: __u64, + prevents_idt: __u64, + prevents_ldt: __u64, + prevents_tr: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let prevents_gdt: u64 = unsafe { ::std::mem::transmute(prevents_gdt) }; + prevents_gdt as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let prevents_idt: u64 = unsafe { ::std::mem::transmute(prevents_idt) }; + prevents_idt as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let prevents_ldt: u64 = unsafe { ::std::mem::transmute(prevents_ldt) }; + prevents_ldt as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let prevents_tr: u64 = unsafe { ::std::mem::transmute(prevents_tr) }; + prevents_tr as u64 + }); + __bindgen_bitfield_unit.set(4usize, 60u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_msr_npiep_config_contents() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_x64_msr_npiep_config_contents)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_x64_msr_npiep_config_contents) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_msr_npiep_config_contents), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_x64_msr_npiep_config_contents { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_input_vtl { + pub as_uint8: __u8, + pub __bindgen_anon_1: hv_input_vtl__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_vtl__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +#[test] +fn bindgen_test_layout_hv_input_vtl__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(hv_input_vtl__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_vtl__bindgen_ty_1)) + ); +} +impl hv_input_vtl__bindgen_ty_1 { + #[inline] + pub fn target_vtl(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) } + } + #[inline] + pub fn set_target_vtl(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub fn use_target_vtl(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) } + } + #[inline] + pub fn set_use_target_vtl(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) } + } + #[inline] + pub fn set_reserved_z(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 3u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + target_vtl: __u8, + use_target_vtl: __u8, + reserved_z: __u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let target_vtl: u8 = unsafe { ::std::mem::transmute(target_vtl) }; + target_vtl as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let use_target_vtl: u8 = unsafe { ::std::mem::transmute(use_target_vtl) }; + use_target_vtl as u64 + }); + __bindgen_bitfield_unit.set(5usize, 3u8, { + let reserved_z: u8 = unsafe { ::std::mem::transmute(reserved_z) }; + reserved_z as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_input_vtl() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(hv_input_vtl)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_vtl)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint8) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_vtl), + "::", + stringify!(as_uint8) + ) + ); +} +impl Default for hv_input_vtl { + 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 union hv_register_vsm_partition_config { + pub as_u64: __u64, + pub __bindgen_anon_1: hv_register_vsm_partition_config__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_register_vsm_partition_config__bindgen_ty_1 { + pub _bitfield_align_1: [u64; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_register_vsm_partition_config__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_register_vsm_partition_config__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_register_vsm_partition_config__bindgen_ty_1) + ) + ); +} +impl hv_register_vsm_partition_config__bindgen_ty_1 { + #[inline] + pub fn enable_vtl_protection(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable_vtl_protection(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn default_vtl_protection_mask(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u64) } + } + #[inline] + pub fn set_default_vtl_protection_mask(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 4u8, val as u64) + } + } + #[inline] + pub fn zero_memory_on_reset(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_zero_memory_on_reset(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn deny_lower_vtl_startup(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_deny_lower_vtl_startup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_acceptance(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_acceptance(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_enable_vtl_protection(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_enable_vtl_protection(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_vp_startup(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_vp_startup(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_cpuid_unimplemented(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_cpuid_unimplemented(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_unrecoverable_exception(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_unrecoverable_exception(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_page(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_page(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_restore_partition_time(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_restore_partition_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn intercept_not_present(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_intercept_not_present(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn mbz(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 49u8) as u64) } + } + #[inline] + pub fn set_mbz(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 49u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + enable_vtl_protection: __u64, + default_vtl_protection_mask: __u64, + zero_memory_on_reset: __u64, + deny_lower_vtl_startup: __u64, + intercept_acceptance: __u64, + intercept_enable_vtl_protection: __u64, + intercept_vp_startup: __u64, + intercept_cpuid_unimplemented: __u64, + intercept_unrecoverable_exception: __u64, + intercept_page: __u64, + intercept_restore_partition_time: __u64, + intercept_not_present: __u64, + mbz: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable_vtl_protection: u64 = + unsafe { ::std::mem::transmute(enable_vtl_protection) }; + enable_vtl_protection as u64 + }); + __bindgen_bitfield_unit.set(1usize, 4u8, { + let default_vtl_protection_mask: u64 = + unsafe { ::std::mem::transmute(default_vtl_protection_mask) }; + default_vtl_protection_mask as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let zero_memory_on_reset: u64 = unsafe { ::std::mem::transmute(zero_memory_on_reset) }; + zero_memory_on_reset as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let deny_lower_vtl_startup: u64 = + unsafe { ::std::mem::transmute(deny_lower_vtl_startup) }; + deny_lower_vtl_startup as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let intercept_acceptance: u64 = unsafe { ::std::mem::transmute(intercept_acceptance) }; + intercept_acceptance as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let intercept_enable_vtl_protection: u64 = + unsafe { ::std::mem::transmute(intercept_enable_vtl_protection) }; + intercept_enable_vtl_protection as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let intercept_vp_startup: u64 = unsafe { ::std::mem::transmute(intercept_vp_startup) }; + intercept_vp_startup as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let intercept_cpuid_unimplemented: u64 = + unsafe { ::std::mem::transmute(intercept_cpuid_unimplemented) }; + intercept_cpuid_unimplemented as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let intercept_unrecoverable_exception: u64 = + unsafe { ::std::mem::transmute(intercept_unrecoverable_exception) }; + intercept_unrecoverable_exception as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let intercept_page: u64 = unsafe { ::std::mem::transmute(intercept_page) }; + intercept_page as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let intercept_restore_partition_time: u64 = + unsafe { ::std::mem::transmute(intercept_restore_partition_time) }; + intercept_restore_partition_time as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let intercept_not_present: u64 = + unsafe { ::std::mem::transmute(intercept_not_present) }; + intercept_not_present as u64 + }); + __bindgen_bitfield_unit.set(15usize, 49u8, { + let mbz: u64 = unsafe { ::std::mem::transmute(mbz) }; + mbz as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_register_vsm_partition_config() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_register_vsm_partition_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_register_vsm_partition_config) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_u64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_vsm_partition_config), + "::", + stringify!(as_u64) + ) + ); +} +impl Default for hv_register_vsm_partition_config { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_nested_enlightenments_control { + pub features: hv_nested_enlightenments_control__bindgen_ty_1, + pub hypercall_controls: hv_nested_enlightenments_control__bindgen_ty_2, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_nested_enlightenments_control__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_nested_enlightenments_control__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_nested_enlightenments_control__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_nested_enlightenments_control__bindgen_ty_1) + ) + ); +} +impl hv_nested_enlightenments_control__bindgen_ty_1 { + #[inline] + pub fn directhypercall(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_directhypercall(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + directhypercall: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let directhypercall: u32 = unsafe { ::std::mem::transmute(directhypercall) }; + directhypercall as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_nested_enlightenments_control__bindgen_ty_2 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_nested_enlightenments_control__bindgen_ty_2() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_nested_enlightenments_control__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_nested_enlightenments_control__bindgen_ty_2) + ) + ); +} +impl hv_nested_enlightenments_control__bindgen_ty_2 { + #[inline] + pub fn inter_partition_comm(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_inter_partition_comm(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + inter_partition_comm: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let inter_partition_comm: u32 = unsafe { ::std::mem::transmute(inter_partition_comm) }; + inter_partition_comm as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_nested_enlightenments_control() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_nested_enlightenments_control)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_nested_enlightenments_control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).features) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_nested_enlightenments_control), + "::", + stringify!(features) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hypercall_controls) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_nested_enlightenments_control), + "::", + stringify!(hypercall_controls) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_vp_assist_page { + pub apic_assist: __u32, + pub reserved1: __u32, + pub vtl_entry_reason: __u32, + pub vtl_reserved: __u32, + pub vtl_ret_x64rax: __u64, + pub vtl_ret_x64rcx: __u64, + pub nested_control: hv_nested_enlightenments_control, + pub enlighten_vmentry: __u8, + pub reserved2: [__u8; 7usize], + pub current_nested_vmcs: __u64, + pub synthetic_time_unhalted_timer_expired: __u8, + pub reserved3: [__u8; 7usize], + pub virtualization_fault_information: [__u8; 40usize], + pub reserved4: [__u8; 8usize], + pub intercept_message: [__u8; 256usize], + pub vtl_ret_actions: [__u8; 256usize], +} +#[test] +fn bindgen_test_layout_hv_vp_assist_page() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 624usize, + concat!("Size of: ", stringify!(hv_vp_assist_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_vp_assist_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).apic_assist) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(apic_assist) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl_entry_reason) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(vtl_entry_reason) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl_reserved) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(vtl_reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl_ret_x64rax) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(vtl_ret_x64rax) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl_ret_x64rcx) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(vtl_ret_x64rcx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nested_control) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(nested_control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).enlighten_vmentry) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(enlighten_vmentry) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 41usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(reserved2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).current_nested_vmcs) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(current_nested_vmcs) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).synthetic_time_unhalted_timer_expired) as usize + - ptr as usize + }, + 56usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(synthetic_time_unhalted_timer_expired) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, + 57usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(reserved3) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).virtualization_fault_information) as usize - ptr as usize + }, + 64usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(virtualization_fault_information) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved4) as usize - ptr as usize }, + 104usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(reserved4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intercept_message) as usize - ptr as usize }, + 112usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(intercept_message) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl_ret_actions) as usize - ptr as usize }, + 368usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_assist_page), + "::", + stringify!(vtl_ret_actions) + ) + ); +} +impl Default for hv_vp_assist_page { + 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 hv_register_name_HV_REGISTER_EXPLICIT_SUSPEND: hv_register_name = 0; +pub const hv_register_name_HV_REGISTER_INTERCEPT_SUSPEND: hv_register_name = 1; +pub const hv_register_name_HV_REGISTER_INSTRUCTION_EMULATION_HINTS: hv_register_name = 2; +pub const hv_register_name_HV_REGISTER_DISPATCH_SUSPEND: hv_register_name = 3; +pub const hv_register_name_HV_REGISTER_INTERNAL_ACTIVITY_STATE: hv_register_name = 4; +pub const hv_register_name_HV_REGISTER_HYPERVISOR_VERSION: hv_register_name = 256; +pub const hv_register_name_HV_REGISTER_PRIVILEGES_AND_FEATURES_INFO: hv_register_name = 512; +pub const hv_register_name_HV_REGISTER_FEATURES_INFO: hv_register_name = 513; +pub const hv_register_name_HV_REGISTER_IMPLEMENTATION_LIMITS_INFO: hv_register_name = 514; +pub const hv_register_name_HV_REGISTER_HARDWARE_FEATURES_INFO: hv_register_name = 515; +pub const hv_register_name_HV_REGISTER_CPU_MANAGEMENT_FEATURES_INFO: hv_register_name = 516; +pub const hv_register_name_HV_REGISTER_SVM_FEATURES_INFO: hv_register_name = 517; +pub const hv_register_name_HV_REGISTER_SKIP_LEVEL_FEATURES_INFO: hv_register_name = 518; +pub const hv_register_name_HV_REGISTER_NESTED_VIRT_FEATURES_INFO: hv_register_name = 519; +pub const hv_register_name_HV_REGISTER_IPT_FEATURES_INFO: hv_register_name = 520; +pub const hv_register_name_HV_REGISTER_GUEST_CRASH_P0: hv_register_name = 528; +pub const hv_register_name_HV_REGISTER_GUEST_CRASH_P1: hv_register_name = 529; +pub const hv_register_name_HV_REGISTER_GUEST_CRASH_P2: hv_register_name = 530; +pub const hv_register_name_HV_REGISTER_GUEST_CRASH_P3: hv_register_name = 531; +pub const hv_register_name_HV_REGISTER_GUEST_CRASH_P4: hv_register_name = 532; +pub const hv_register_name_HV_REGISTER_GUEST_CRASH_CTL: hv_register_name = 533; +pub const hv_register_name_HV_REGISTER_POWER_STATE_CONFIG_C1: hv_register_name = 544; +pub const hv_register_name_HV_REGISTER_POWER_STATE_TRIGGER_C1: hv_register_name = 545; +pub const hv_register_name_HV_REGISTER_POWER_STATE_CONFIG_C2: hv_register_name = 546; +pub const hv_register_name_HV_REGISTER_POWER_STATE_TRIGGER_C2: hv_register_name = 547; +pub const hv_register_name_HV_REGISTER_POWER_STATE_CONFIG_C3: hv_register_name = 548; +pub const hv_register_name_HV_REGISTER_POWER_STATE_TRIGGER_C3: hv_register_name = 549; +pub const hv_register_name_HV_REGISTER_PROCESSOR_CLOCK_FREQUENCY: hv_register_name = 576; +pub const hv_register_name_HV_REGISTER_INTERRUPT_CLOCK_FREQUENCY: hv_register_name = 577; +pub const hv_register_name_HV_REGISTER_GUEST_IDLE: hv_register_name = 592; +pub const hv_register_name_HV_REGISTER_DEBUG_DEVICE_OPTIONS: hv_register_name = 608; +pub const hv_register_name_HV_REGISTER_MEMORY_ZEROING_CONTROL: hv_register_name = 624; +pub const hv_register_name_HV_REGISTER_PENDING_EVENT0: hv_register_name = 65540; +pub const hv_register_name_HV_REGISTER_PENDING_EVENT1: hv_register_name = 65541; +pub const hv_register_name_HV_REGISTER_DELIVERABILITY_NOTIFICATIONS: hv_register_name = 65542; +pub const hv_register_name_HV_REGISTER_VP_RUNTIME: hv_register_name = 589824; +pub const hv_register_name_HV_REGISTER_GUEST_OS_ID: hv_register_name = 589826; +pub const hv_register_name_HV_REGISTER_VP_INDEX: hv_register_name = 589827; +pub const hv_register_name_HV_REGISTER_TIME_REF_COUNT: hv_register_name = 589828; +pub const hv_register_name_HV_REGISTER_CPU_MANAGEMENT_VERSION: hv_register_name = 589831; +pub const hv_register_name_HV_REGISTER_VP_ASSIST_PAGE: hv_register_name = 589843; +pub const hv_register_name_HV_REGISTER_VP_ROOT_SIGNAL_COUNT: hv_register_name = 589844; +pub const hv_register_name_HV_REGISTER_REFERENCE_TSC: hv_register_name = 589847; +pub const hv_register_name_HV_REGISTER_STATS_PARTITION_RETAIL: hv_register_name = 589856; +pub const hv_register_name_HV_REGISTER_STATS_PARTITION_INTERNAL: hv_register_name = 589857; +pub const hv_register_name_HV_REGISTER_STATS_VP_RETAIL: hv_register_name = 589858; +pub const hv_register_name_HV_REGISTER_STATS_VP_INTERNAL: hv_register_name = 589859; +pub const hv_register_name_HV_REGISTER_NESTED_VP_INDEX: hv_register_name = 593923; +pub const hv_register_name_HV_REGISTER_SINT0: hv_register_name = 655360; +pub const hv_register_name_HV_REGISTER_SINT1: hv_register_name = 655361; +pub const hv_register_name_HV_REGISTER_SINT2: hv_register_name = 655362; +pub const hv_register_name_HV_REGISTER_SINT3: hv_register_name = 655363; +pub const hv_register_name_HV_REGISTER_SINT4: hv_register_name = 655364; +pub const hv_register_name_HV_REGISTER_SINT5: hv_register_name = 655365; +pub const hv_register_name_HV_REGISTER_SINT6: hv_register_name = 655366; +pub const hv_register_name_HV_REGISTER_SINT7: hv_register_name = 655367; +pub const hv_register_name_HV_REGISTER_SINT8: hv_register_name = 655368; +pub const hv_register_name_HV_REGISTER_SINT9: hv_register_name = 655369; +pub const hv_register_name_HV_REGISTER_SINT10: hv_register_name = 655370; +pub const hv_register_name_HV_REGISTER_SINT11: hv_register_name = 655371; +pub const hv_register_name_HV_REGISTER_SINT12: hv_register_name = 655372; +pub const hv_register_name_HV_REGISTER_SINT13: hv_register_name = 655373; +pub const hv_register_name_HV_REGISTER_SINT14: hv_register_name = 655374; +pub const hv_register_name_HV_REGISTER_SINT15: hv_register_name = 655375; +pub const hv_register_name_HV_REGISTER_SCONTROL: hv_register_name = 655376; +pub const hv_register_name_HV_REGISTER_SVERSION: hv_register_name = 655377; +pub const hv_register_name_HV_REGISTER_SIEFP: hv_register_name = 655378; +pub const hv_register_name_HV_REGISTER_SIMP: hv_register_name = 655379; +pub const hv_register_name_HV_REGISTER_EOM: hv_register_name = 655380; +pub const hv_register_name_HV_REGISTER_SIRBP: hv_register_name = 655381; +pub const hv_register_name_HV_REGISTER_NESTED_SINT0: hv_register_name = 659456; +pub const hv_register_name_HV_REGISTER_NESTED_SINT1: hv_register_name = 659457; +pub const hv_register_name_HV_REGISTER_NESTED_SINT2: hv_register_name = 659458; +pub const hv_register_name_HV_REGISTER_NESTED_SINT3: hv_register_name = 659459; +pub const hv_register_name_HV_REGISTER_NESTED_SINT4: hv_register_name = 659460; +pub const hv_register_name_HV_REGISTER_NESTED_SINT5: hv_register_name = 659461; +pub const hv_register_name_HV_REGISTER_NESTED_SINT6: hv_register_name = 659462; +pub const hv_register_name_HV_REGISTER_NESTED_SINT7: hv_register_name = 659463; +pub const hv_register_name_HV_REGISTER_NESTED_SINT8: hv_register_name = 659464; +pub const hv_register_name_HV_REGISTER_NESTED_SINT9: hv_register_name = 659465; +pub const hv_register_name_HV_REGISTER_NESTED_SINT10: hv_register_name = 659466; +pub const hv_register_name_HV_REGISTER_NESTED_SINT11: hv_register_name = 659467; +pub const hv_register_name_HV_REGISTER_NESTED_SINT12: hv_register_name = 659468; +pub const hv_register_name_HV_REGISTER_NESTED_SINT13: hv_register_name = 659469; +pub const hv_register_name_HV_REGISTER_NESTED_SINT14: hv_register_name = 659470; +pub const hv_register_name_HV_REGISTER_NESTED_SINT15: hv_register_name = 659471; +pub const hv_register_name_HV_REGISTER_NESTED_SCONTROL: hv_register_name = 659472; +pub const hv_register_name_HV_REGISTER_NESTED_SVERSION: hv_register_name = 659473; +pub const hv_register_name_HV_REGISTER_NESTED_SIFP: hv_register_name = 659474; +pub const hv_register_name_HV_REGISTER_NESTED_SIPP: hv_register_name = 659475; +pub const hv_register_name_HV_REGISTER_NESTED_EOM: hv_register_name = 659476; +pub const hv_register_name_HV_REGISTER_NESTED_SIRBP: hv_register_name = 659477; +pub const hv_register_name_HV_REGISTER_STIMER0_CONFIG: hv_register_name = 720896; +pub const hv_register_name_HV_REGISTER_STIMER0_COUNT: hv_register_name = 720897; +pub const hv_register_name_HV_REGISTER_STIMER1_CONFIG: hv_register_name = 720898; +pub const hv_register_name_HV_REGISTER_STIMER1_COUNT: hv_register_name = 720899; +pub const hv_register_name_HV_REGISTER_STIMER2_CONFIG: hv_register_name = 720900; +pub const hv_register_name_HV_REGISTER_STIMER2_COUNT: hv_register_name = 720901; +pub const hv_register_name_HV_REGISTER_STIMER3_CONFIG: hv_register_name = 720902; +pub const hv_register_name_HV_REGISTER_STIMER3_COUNT: hv_register_name = 720903; +pub const hv_register_name_HV_REGISTER_STIME_UNHALTED_TIMER_CONFIG: hv_register_name = 721152; +pub const hv_register_name_HV_REGISTER_STIME_UNHALTED_TIMER_COUNT: hv_register_name = 721153; +pub const hv_register_name_HV_REGISTER_VSM_CODE_PAGE_OFFSETS: hv_register_name = 851970; +pub const hv_register_name_HV_REGISTER_VSM_VP_STATUS: hv_register_name = 851971; +pub const hv_register_name_HV_REGISTER_VSM_PARTITION_STATUS: hv_register_name = 851972; +pub const hv_register_name_HV_REGISTER_VSM_VINA: hv_register_name = 851973; +pub const hv_register_name_HV_REGISTER_VSM_CAPABILITIES: hv_register_name = 851974; +pub const hv_register_name_HV_REGISTER_VSM_PARTITION_CONFIG: hv_register_name = 851975; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL0: hv_register_name = 851984; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL1: hv_register_name = 851985; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL2: hv_register_name = 851986; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL3: hv_register_name = 851987; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL4: hv_register_name = 851988; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL5: hv_register_name = 851989; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL6: hv_register_name = 851990; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL7: hv_register_name = 851991; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL8: hv_register_name = 851992; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL9: hv_register_name = 851993; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL10: hv_register_name = 851994; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL11: hv_register_name = 851995; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL12: hv_register_name = 851996; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL13: hv_register_name = 851997; +pub const hv_register_name_HV_REGISTER_VSM_VP_SECURE_CONFIG_VTL14: hv_register_name = 851998; +pub const hv_register_name_HV_REGISTER_VSM_VP_WAIT_FOR_TLB_LOCK: hv_register_name = 852000; +pub const hv_register_name_HV_REGISTER_ISOLATION_CAPABILITIES: hv_register_name = 852224; +pub type hv_register_name = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_explicit_suspend_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_explicit_suspend_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_explicit_suspend_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_explicit_suspend_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_explicit_suspend_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_explicit_suspend_register__bindgen_ty_1) + ) + ); +} +impl hv_explicit_suspend_register__bindgen_ty_1 { + #[inline] + pub fn suspended(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_suspended(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 63u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + suspended: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let suspended: u64 = unsafe { ::std::mem::transmute(suspended) }; + suspended as u64 + }); + __bindgen_bitfield_unit.set(1usize, 63u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_explicit_suspend_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_explicit_suspend_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_explicit_suspend_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_explicit_suspend_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_explicit_suspend_register { + 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 union hv_intercept_suspend_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_intercept_suspend_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_intercept_suspend_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_intercept_suspend_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_intercept_suspend_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_intercept_suspend_register__bindgen_ty_1) + ) + ); +} +impl hv_intercept_suspend_register__bindgen_ty_1 { + #[inline] + pub fn suspended(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_suspended(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 63u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + suspended: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let suspended: u64 = unsafe { ::std::mem::transmute(suspended) }; + suspended as u64 + }); + __bindgen_bitfield_unit.set(1usize, 63u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_intercept_suspend_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_intercept_suspend_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_intercept_suspend_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_intercept_suspend_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_intercept_suspend_register { + 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 union hv_dispatch_suspend_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_dispatch_suspend_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_dispatch_suspend_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_dispatch_suspend_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_dispatch_suspend_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_dispatch_suspend_register__bindgen_ty_1) + ) + ); +} +impl hv_dispatch_suspend_register__bindgen_ty_1 { + #[inline] + pub fn suspended(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_suspended(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 63u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + suspended: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let suspended: u64 = unsafe { ::std::mem::transmute(suspended) }; + suspended as u64 + }); + __bindgen_bitfield_unit.set(1usize, 63u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_dispatch_suspend_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_dispatch_suspend_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_dispatch_suspend_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_dispatch_suspend_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_dispatch_suspend_register { + 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 union hv_internal_activity_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_internal_activity_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_internal_activity_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_internal_activity_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_internal_activity_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_internal_activity_register__bindgen_ty_1) + ) + ); +} +impl hv_internal_activity_register__bindgen_ty_1 { + #[inline] + pub fn startup_suspend(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_startup_suspend(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn halt_suspend(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_halt_suspend(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn idle_suspend(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_idle_suspend(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn rsvd_z(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 61u8) as u64) } + } + #[inline] + pub fn set_rsvd_z(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 61u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + startup_suspend: __u64, + halt_suspend: __u64, + idle_suspend: __u64, + rsvd_z: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let startup_suspend: u64 = unsafe { ::std::mem::transmute(startup_suspend) }; + startup_suspend as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let halt_suspend: u64 = unsafe { ::std::mem::transmute(halt_suspend) }; + halt_suspend as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let idle_suspend: u64 = unsafe { ::std::mem::transmute(idle_suspend) }; + idle_suspend as u64 + }); + __bindgen_bitfield_unit.set(3usize, 61u8, { + let rsvd_z: u64 = unsafe { ::std::mem::transmute(rsvd_z) }; + rsvd_z as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_internal_activity_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_internal_activity_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_internal_activity_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_internal_activity_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_internal_activity_register { + 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 union hv_x64_interrupt_state_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_x64_interrupt_state_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_interrupt_state_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_interrupt_state_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_interrupt_state_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_interrupt_state_register__bindgen_ty_1) + ) + ); +} +impl hv_x64_interrupt_state_register__bindgen_ty_1 { + #[inline] + pub fn interrupt_shadow(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_interrupt_shadow(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn nmi_masked(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_nmi_masked(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 62u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 62u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interrupt_shadow: __u64, + nmi_masked: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let interrupt_shadow: u64 = unsafe { ::std::mem::transmute(interrupt_shadow) }; + interrupt_shadow as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let nmi_masked: u64 = unsafe { ::std::mem::transmute(nmi_masked) }; + nmi_masked as u64 + }); + __bindgen_bitfield_unit.set(2usize, 62u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_interrupt_state_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_x64_interrupt_state_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_x64_interrupt_state_register)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_interrupt_state_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_x64_interrupt_state_register { + 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 hv_get_vp_registers_output { + pub __bindgen_anon_1: hv_get_vp_registers_output__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_get_vp_registers_output__bindgen_ty_1 { + pub as32: hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1, + pub as64: hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1 { + pub a: __u32, + pub b: __u32, + pub c: __u32, + pub d: __u32, +} +#[test] +fn bindgen_test_layout_hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(a) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(b) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(c) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).d) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(d) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2 { + pub low: __u64, + pub high: __u64, +} +#[test] +fn bindgen_test_layout_hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).low) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(low) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).high) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(high) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_get_vp_registers_output__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1), + "::", + stringify!(as32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_registers_output__bindgen_ty_1), + "::", + stringify!(as64) + ) + ); +} +impl Default for hv_get_vp_registers_output__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_get_vp_registers_output() { + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_get_vp_registers_output)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_get_vp_registers_output)) + ); +} +impl Default for hv_get_vp_registers_output { + 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 union hv_arm64_pending_synthetic_exception_event { + pub as_uint64: [__u64; 2usize], + pub __bindgen_anon_1: hv_arm64_pending_synthetic_exception_event__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_arm64_pending_synthetic_exception_event__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub exception_type: __u32, + pub context: __u64, +} +#[test] +fn bindgen_test_layout_hv_arm64_pending_synthetic_exception_event__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit< + hv_arm64_pending_synthetic_exception_event__bindgen_ty_1, + > = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 13usize, + concat!( + "Size of: ", + stringify!(hv_arm64_pending_synthetic_exception_event__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_arm64_pending_synthetic_exception_event__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).exception_type) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(hv_arm64_pending_synthetic_exception_event__bindgen_ty_1), + "::", + stringify!(exception_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(hv_arm64_pending_synthetic_exception_event__bindgen_ty_1), + "::", + stringify!(context) + ) + ); +} +impl hv_arm64_pending_synthetic_exception_event__bindgen_ty_1 { + #[inline] + pub fn event_pending(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_event_pending(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn event_type(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u8) } + } + #[inline] + pub fn set_event_type(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 3u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 4u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + event_pending: __u8, + event_type: __u8, + reserved: __u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let event_pending: u8 = unsafe { ::std::mem::transmute(event_pending) }; + event_pending as u64 + }); + __bindgen_bitfield_unit.set(1usize, 3u8, { + let event_type: u8 = unsafe { ::std::mem::transmute(event_type) }; + event_type as u64 + }); + __bindgen_bitfield_unit.set(4usize, 4u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_arm64_pending_synthetic_exception_event() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_arm64_pending_synthetic_exception_event) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_arm64_pending_synthetic_exception_event) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_arm64_pending_synthetic_exception_event), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_arm64_pending_synthetic_exception_event { + 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 union hv_arm64_interrupt_state_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_arm64_interrupt_state_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_arm64_interrupt_state_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_arm64_interrupt_state_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_arm64_interrupt_state_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_arm64_interrupt_state_register__bindgen_ty_1) + ) + ); +} +impl hv_arm64_interrupt_state_register__bindgen_ty_1 { + #[inline] + pub fn interrupt_shadow(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_interrupt_shadow(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 63u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interrupt_shadow: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let interrupt_shadow: u64 = unsafe { ::std::mem::transmute(interrupt_shadow) }; + interrupt_shadow as u64 + }); + __bindgen_bitfield_unit.set(1usize, 63u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_arm64_interrupt_state_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_arm64_interrupt_state_register)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_arm64_interrupt_state_register) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_arm64_interrupt_state_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_arm64_interrupt_state_register { + 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 hv_arm64_pending_interruption_type_HV_ARM64_PENDING_INTERRUPT: + hv_arm64_pending_interruption_type = 0; +pub const hv_arm64_pending_interruption_type_HV_ARM64_PENDING_EXCEPTION: + hv_arm64_pending_interruption_type = 1; +pub type hv_arm64_pending_interruption_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_arm64_pending_interruption_register { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_arm64_pending_interruption_register__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_arm64_pending_interruption_register__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_arm64_pending_interruption_register__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_arm64_pending_interruption_register__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_arm64_pending_interruption_register__bindgen_ty_1) + ) + ); +} +impl hv_arm64_pending_interruption_register__bindgen_ty_1 { + #[inline] + pub fn interruption_pending(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_interruption_pending(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn interruption_type(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_interruption_type(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn error_code(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 32u8) as u64) } + } + #[inline] + pub fn set_error_code(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 32u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + interruption_pending: __u64, + interruption_type: __u64, + reserved: __u64, + error_code: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let interruption_pending: u64 = unsafe { ::std::mem::transmute(interruption_pending) }; + interruption_pending as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let interruption_type: u64 = unsafe { ::std::mem::transmute(interruption_type) }; + interruption_type as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(32usize, 32u8, { + let error_code: u64 = unsafe { ::std::mem::transmute(error_code) }; + error_code as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_arm64_pending_interruption_register() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_arm64_pending_interruption_register) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_arm64_pending_interruption_register) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_arm64_pending_interruption_register), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_arm64_pending_interruption_register { + 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 union hv_register_value { + pub reg128: hv_u128, + pub reg64: __u64, + pub reg32: __u32, + pub reg16: __u16, + pub reg8: __u8, + pub explicit_suspend: hv_explicit_suspend_register, + pub intercept_suspend: hv_intercept_suspend_register, + pub dispatch_suspend: hv_dispatch_suspend_register, + pub internal_activity: hv_internal_activity_register, + pub pending_interruption: hv_arm64_pending_interruption_register, + pub interrupt_state: hv_arm64_interrupt_state_register, + pub pending_synthetic_exception_event: hv_arm64_pending_synthetic_exception_event, +} +#[test] +fn bindgen_test_layout_hv_register_value() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_register_value)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_register_value)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg128) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(reg128) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(reg64) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(reg32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg16) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(reg16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reg8) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(reg8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).explicit_suspend) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(explicit_suspend) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intercept_suspend) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(intercept_suspend) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispatch_suspend) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(dispatch_suspend) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).internal_activity) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(internal_activity) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pending_interruption) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(pending_interruption) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interrupt_state) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(interrupt_state) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).pending_synthetic_exception_event) as usize - ptr as usize + }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_value), + "::", + stringify!(pending_synthetic_exception_event) + ) + ); +} +impl Default for hv_register_value { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_register_assoc { + pub name: __u32, + pub reserved1: __u32, + pub reserved2: __u64, + pub value: hv_register_value, +} +#[test] +fn bindgen_test_layout_hv_register_assoc() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_register_assoc)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_register_assoc)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).name) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_register_assoc), + "::", + stringify!(name) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_register_assoc), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_register_assoc), + "::", + stringify!(reserved2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).value) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_register_assoc), + "::", + stringify!(value) + ) + ); +} +impl Default for hv_register_assoc { + 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, packed)] +pub struct hv_input_get_vp_registers { + pub partition_id: __u64, + pub vp_index: __u32, + pub input_vtl: hv_input_vtl, + pub rsvd_z8: __u8, + pub rsvd_z16: __u16, + pub names: __IncompleteArrayField<__u32>, +} +#[test] +fn bindgen_test_layout_hv_input_get_vp_registers() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_get_vp_registers)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_get_vp_registers)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_registers), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_registers), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).input_vtl) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_registers), + "::", + stringify!(input_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_z8) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_registers), + "::", + stringify!(rsvd_z8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_z16) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_registers), + "::", + stringify!(rsvd_z16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).names) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_registers), + "::", + stringify!(names) + ) + ); +} +impl Default for hv_input_get_vp_registers { + 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, packed)] +pub struct hv_input_set_vp_registers { + pub partition_id: __u64, + pub vp_index: __u32, + pub input_vtl: hv_input_vtl, + pub rsvd_z8: __u8, + pub rsvd_z16: __u16, + pub elements: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_hv_input_set_vp_registers() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_set_vp_registers)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_set_vp_registers)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_vp_registers), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_vp_registers), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).input_vtl) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_vp_registers), + "::", + stringify!(input_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_z8) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_vp_registers), + "::", + stringify!(rsvd_z8) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_z16) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_vp_registers), + "::", + stringify!(rsvd_z16) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).elements) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_vp_registers), + "::", + stringify!(elements) + ) + ); +} +impl Default for hv_input_set_vp_registers { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_send_ipi { + pub vector: __u32, + pub reserved: __u32, + pub cpu_mask: __u64, +} +#[test] +fn bindgen_test_layout_hv_send_ipi() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_send_ipi)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_send_ipi)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_send_ipi), + "::", + stringify!(vector) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_send_ipi), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpu_mask) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_send_ipi), + "::", + stringify!(cpu_mask) + ) + ); +} +pub const hv_intercept_type_HV_INTERCEPT_TYPE_EXCEPTION: hv_intercept_type = 3; +pub const hv_intercept_type_HV_INTERCEPT_TYPE_RESERVED0: hv_intercept_type = 4; +pub const hv_intercept_type_HV_INTERCEPT_TYPE_MMIO: hv_intercept_type = 5; +pub const hv_intercept_type_HV_INTERCEPT_TYPE_HYPERCALL: hv_intercept_type = 8; +pub const hv_intercept_type_HV_INTERCEPT_TYPE_MAX: hv_intercept_type = 9; +pub const hv_intercept_type_HV_INTERCEPT_TYPE_INVALID: hv_intercept_type = 4294967295; +pub type hv_intercept_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_intercept_parameters { + pub as_uint64: __u64, +} +#[test] +fn bindgen_test_layout_hv_intercept_parameters() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_intercept_parameters)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_intercept_parameters)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_intercept_parameters), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_intercept_parameters { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_install_intercept { + pub partition_id: __u64, + pub access_type: __u32, + pub intercept_type: __u32, + pub intercept_parameter: hv_intercept_parameters, +} +#[test] +fn bindgen_test_layout_hv_input_install_intercept() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_install_intercept)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_install_intercept)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_install_intercept), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).access_type) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_install_intercept), + "::", + stringify!(access_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intercept_type) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_install_intercept), + "::", + stringify!(intercept_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intercept_parameter) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_install_intercept), + "::", + stringify!(intercept_parameter) + ) + ); +} +impl Default for hv_input_install_intercept { + 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 hv_eventlog_type_HV_EVENT_LOG_TYPE_GLOBAL_SYSTEM_EVENTS: hv_eventlog_type = 0; +pub const hv_eventlog_type_HV_EVENT_LOG_TYPE_LOCAL_DIAGNOSTICS: hv_eventlog_type = 1; +pub const hv_eventlog_type_HV_EVENT_LOG_TYPE_SYSTEM_DIAGNOSTICS: hv_eventlog_type = 2; +pub type hv_eventlog_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_x64_register_sev_ghcb { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_x64_register_sev_ghcb__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_register_sev_ghcb__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_register_sev_ghcb__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_register_sev_ghcb__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_register_sev_ghcb__bindgen_ty_1) + ) + ); +} +impl hv_x64_register_sev_ghcb__bindgen_ty_1 { + #[inline] + pub fn enabled(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reservedz(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_reservedz(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn page_number(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_page_number(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + enabled: __u64, + reservedz: __u64, + page_number: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enabled: u64 = unsafe { ::std::mem::transmute(enabled) }; + enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let reservedz: u64 = unsafe { ::std::mem::transmute(reservedz) }; + reservedz as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let page_number: u64 = unsafe { ::std::mem::transmute(page_number) }; + page_number as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_register_sev_ghcb() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_x64_register_sev_ghcb)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_x64_register_sev_ghcb)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_register_sev_ghcb), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_x64_register_sev_ghcb { + 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 union hv_x64_register_sev_hv_doorbell { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_x64_register_sev_hv_doorbell__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_register_sev_hv_doorbell__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_x64_register_sev_hv_doorbell__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_x64_register_sev_hv_doorbell__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_x64_register_sev_hv_doorbell__bindgen_ty_1) + ) + ); +} +impl hv_x64_register_sev_hv_doorbell__bindgen_ty_1 { + #[inline] + pub fn enabled(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reservedz(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_reservedz(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn page_number(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_page_number(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + enabled: __u64, + reservedz: __u64, + page_number: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enabled: u64 = unsafe { ::std::mem::transmute(enabled) }; + enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let reservedz: u64 = unsafe { ::std::mem::transmute(reservedz) }; + reservedz as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let page_number: u64 = unsafe { ::std::mem::transmute(page_number) }; + page_number as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_x64_register_sev_hv_doorbell() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_x64_register_sev_hv_doorbell)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_x64_register_sev_hv_doorbell)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_register_sev_hv_doorbell), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_x64_register_sev_hv_doorbell { + 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 union hv_connection_id { + pub asu32: __u32, + pub u: hv_connection_id__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_connection_id__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_connection_id__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_connection_id__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_connection_id__bindgen_ty_1)) + ); +} +impl hv_connection_id__bindgen_ty_1 { + #[inline] + pub fn id(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set_id(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 8u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1(id: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let id: u32 = unsafe { ::std::mem::transmute(id) }; + id as u64 + }); + __bindgen_bitfield_unit.set(24usize, 8u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_connection_id() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_connection_id)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_connection_id)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).asu32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_id), + "::", + stringify!(asu32) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).u) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_id), + "::", + stringify!(u) + ) + ); +} +impl Default for hv_connection_id { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_unmap_gpa_pages { + pub target_partition_id: __u64, + pub target_gpa_base: __u64, + pub unmap_flags: __u32, + pub padding: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_unmap_gpa_pages() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_unmap_gpa_pages)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_unmap_gpa_pages)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_gpa_pages), + "::", + stringify!(target_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_gpa_base) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_gpa_pages), + "::", + stringify!(target_gpa_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).unmap_flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_gpa_pages), + "::", + stringify!(unmap_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_gpa_pages), + "::", + stringify!(padding) + ) + ); +} +pub const hv_generic_set_format_HV_GENERIC_SET_SPARSE_4K: hv_generic_set_format = 0; +pub const hv_generic_set_format_HV_GENERIC_SET_ALL: hv_generic_set_format = 1; +pub type hv_generic_set_format = ::std::os::raw::c_uint; +pub const hv_scheduler_type_HV_SCHEDULER_TYPE_LP: hv_scheduler_type = 1; +pub const hv_scheduler_type_HV_SCHEDULER_TYPE_LP_SMT: hv_scheduler_type = 2; +pub const hv_scheduler_type_HV_SCHEDULER_TYPE_CORE_SMT: hv_scheduler_type = 3; +pub const hv_scheduler_type_HV_SCHEDULER_TYPE_ROOT: hv_scheduler_type = 4; +pub const hv_scheduler_type_HV_SCHEDULER_TYPE_MAX: hv_scheduler_type = 5; +pub type hv_scheduler_type = ::std::os::raw::c_uint; +pub const hv_stats_object_type_HV_STATS_OBJECT_HYPERVISOR: hv_stats_object_type = 1; +pub const hv_stats_object_type_HV_STATS_OBJECT_LOGICAL_PROCESSOR: hv_stats_object_type = 2; +pub const hv_stats_object_type_HV_STATS_OBJECT_PARTITION: hv_stats_object_type = 65537; +pub const hv_stats_object_type_HV_STATS_OBJECT_VP: hv_stats_object_type = 65538; +pub type hv_stats_object_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_stats_object_identity { + pub hv: hv_stats_object_identity__bindgen_ty_1, + pub lp: hv_stats_object_identity__bindgen_ty_2, + pub partition: hv_stats_object_identity__bindgen_ty_3, + pub vp: hv_stats_object_identity__bindgen_ty_4, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stats_object_identity__bindgen_ty_1 { + pub reserved: [__u8; 16usize], +} +#[test] +fn bindgen_test_layout_hv_stats_object_identity__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_stats_object_identity__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_stats_object_identity__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stats_object_identity__bindgen_ty_2 { + pub lp_index: __u32, + pub reserved: [__u8; 12usize], +} +#[test] +fn bindgen_test_layout_hv_stats_object_identity__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_stats_object_identity__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_stats_object_identity__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lp_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_2), + "::", + stringify!(lp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_2), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stats_object_identity__bindgen_ty_3 { + pub partition_id: __u64, + pub reserved: [__u8; 4usize], + pub flags: __u16, + pub reserved1: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_hv_stats_object_identity__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_stats_object_identity__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_stats_object_identity__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_3), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_3), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_3), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_3), + "::", + stringify!(reserved1) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stats_object_identity__bindgen_ty_4 { + pub partition_id: __u64, + pub vp_index: __u32, + pub flags: __u16, + pub reserved: [__u8; 2usize], +} +#[test] +fn bindgen_test_layout_hv_stats_object_identity__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_stats_object_identity__bindgen_ty_4) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_stats_object_identity__bindgen_ty_4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_4), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_4), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_4), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity__bindgen_ty_4), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_stats_object_identity() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_stats_object_identity)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_stats_object_identity)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity), + "::", + stringify!(hv) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity), + "::", + stringify!(lp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity), + "::", + stringify!(partition) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_object_identity), + "::", + stringify!(vp) + ) + ); +} +impl Default for hv_stats_object_identity { + 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 hv_partition_property_code_HV_PARTITION_PROPERTY_PRIVILEGE_FLAGS: + hv_partition_property_code = 65536; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_SYNTHETIC_PROC_FEATURES: + hv_partition_property_code = 65537; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_SUSPEND: hv_partition_property_code = + 131072; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_CPU_RESERVE: hv_partition_property_code = + 131073; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_CPU_CAP: hv_partition_property_code = + 131074; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_CPU_WEIGHT: hv_partition_property_code = + 131075; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_CPU_GROUP_ID: + hv_partition_property_code = 131076; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_TIME_FREEZE: hv_partition_property_code = + 196611; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_REFERENCE_TIME: + hv_partition_property_code = 196613; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_DEBUG_CHANNEL_ID: + hv_partition_property_code = 262144; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_VIRTUAL_TLB_PAGE_COUNT: + hv_partition_property_code = 327680; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_VSM_CONFIG: hv_partition_property_code = + 327681; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_ZERO_MEMORY_ON_RESET: + hv_partition_property_code = 327682; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSORS_PER_SOCKET: + hv_partition_property_code = 327683; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_NESTED_TLB_SIZE: + hv_partition_property_code = 327684; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_GPA_PAGE_ACCESS_TRACKING: + hv_partition_property_code = 327685; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_VSM_PERMISSIONS_DIRTY_SINCE_LAST_QUERY : hv_partition_property_code = 327686 ; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_SGX_LAUNCH_CONTROL_CONFIG: + hv_partition_property_code = 327687; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_DEFAULT_SGX_LAUNCH_CONTROL0: + hv_partition_property_code = 327688; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_DEFAULT_SGX_LAUNCH_CONTROL1: + hv_partition_property_code = 327689; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_DEFAULT_SGX_LAUNCH_CONTROL2: + hv_partition_property_code = 327690; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_DEFAULT_SGX_LAUNCH_CONTROL3: + hv_partition_property_code = 327691; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_ISOLATION_STATE: + hv_partition_property_code = 327692; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_ISOLATION_CONTROL: + hv_partition_property_code = 327693; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_ALLOCATION_ID: + hv_partition_property_code = 327694; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_MONITORING_ID: + hv_partition_property_code = 327695; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_IMPLEMENTED_PHYSICAL_ADDRESS_BITS: + hv_partition_property_code = 327696; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_NON_ARCHITECTURAL_CORE_SHARING: + hv_partition_property_code = 327697; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_HYPERCALL_DOORBELL_PAGE: + hv_partition_property_code = 327698; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_ISOLATION_POLICY: + hv_partition_property_code = 327700; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_UNIMPLEMENTED_MSR_ACTION: + hv_partition_property_code = 327703; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_SEV_VMGEXIT_OFFLOADS: + hv_partition_property_code = 327714; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_VENDOR: + hv_partition_property_code = 393216; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_FEATURES_DEPRECATED: + hv_partition_property_code = 393217; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_XSAVE_FEATURES: + hv_partition_property_code = 393218; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_CL_FLUSH_SIZE: + hv_partition_property_code = 393219; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_ENLIGHTENMENT_MODIFICATIONS: + hv_partition_property_code = 393220; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_COMPATIBILITY_VERSION: + hv_partition_property_code = 393221; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PHYSICAL_ADDRESS_WIDTH: + hv_partition_property_code = 393222; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_XSAVE_STATES: + hv_partition_property_code = 393223; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_MAX_XSAVE_DATA_SIZE: + hv_partition_property_code = 393224; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_CLOCK_FREQUENCY: + hv_partition_property_code = 393225; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_FEATURES0: + hv_partition_property_code = 393226; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_FEATURES1: + hv_partition_property_code = 393227; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_GUEST_OS_ID: hv_partition_property_code = + 458752; +pub const hv_partition_property_code_HV_PARTITION_PROPERTY_PROCESSOR_VIRTUALIZATION_FEATURES: + hv_partition_property_code = 524288; +pub type hv_partition_property_code = ::std::os::raw::c_uint; +pub const hv_sleep_state_HV_SLEEP_STATE_S1: hv_sleep_state = 1; +pub const hv_sleep_state_HV_SLEEP_STATE_S2: hv_sleep_state = 2; +pub const hv_sleep_state_HV_SLEEP_STATE_S3: hv_sleep_state = 3; +pub const hv_sleep_state_HV_SLEEP_STATE_S4: hv_sleep_state = 4; +pub const hv_sleep_state_HV_SLEEP_STATE_S5: hv_sleep_state = 5; +pub const hv_sleep_state_HV_SLEEP_STATE_LOCK: hv_sleep_state = 6; +pub type hv_sleep_state = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_enter_sleep_state { + pub sleep_state: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_enter_sleep_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_input_enter_sleep_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_enter_sleep_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sleep_state) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_enter_sleep_state), + "::", + stringify!(sleep_state) + ) + ); +} +pub const hv_system_property_HV_SYSTEM_PROPERTY_SLEEP_STATE: hv_system_property = 3; +pub const hv_system_property_HV_SYSTEM_PROPERTY_SCHEDULER_TYPE: hv_system_property = 15; +pub const hv_system_property_HV_DYNAMIC_PROCESSOR_FEATURE_PROPERTY: hv_system_property = 21; +pub const hv_system_property_HV_SYSTEM_PROPERTY_DIAGOSTICS_LOG_BUFFERS: hv_system_property = 28; +pub const hv_system_property_HV_SYSTEM_PROPERTY_CRASHDUMPAREA: hv_system_property = 47; +pub const hv_system_property_HV_SYSTEM_PROPERTY_DEVIRT_TRAMP_PA: hv_system_property = 52; +pub type hv_system_property = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_pfn_range { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_pfn_range__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_pfn_range__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_pfn_range__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_pfn_range__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_pfn_range__bindgen_ty_1)) + ); +} +impl hv_pfn_range__bindgen_ty_1 { + #[inline] + pub fn base_pfn(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 40u8) as u64) } + } + #[inline] + pub fn set_base_pfn(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 40u8, val as u64) + } + } + #[inline] + pub fn add_pfns(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 24u8) as u64) } + } + #[inline] + pub fn set_add_pfns(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(40usize, 24u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1(base_pfn: __u64, add_pfns: __u64) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 40u8, { + let base_pfn: u64 = unsafe { ::std::mem::transmute(base_pfn) }; + base_pfn as u64 + }); + __bindgen_bitfield_unit.set(40usize, 24u8, { + let add_pfns: u64 = unsafe { ::std::mem::transmute(add_pfns) }; + add_pfns as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_pfn_range() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_pfn_range)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_pfn_range)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_pfn_range), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_pfn_range { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_sleep_state_info { + pub sleep_state: __u32, + pub pm1a_slp_typ: __u8, + pub pm1b_slp_typ: __u8, +} +#[test] +fn bindgen_test_layout_hv_sleep_state_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 6usize, + concat!("Size of: ", stringify!(hv_sleep_state_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_sleep_state_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sleep_state) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_sleep_state_info), + "::", + stringify!(sleep_state) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pm1a_slp_typ) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_sleep_state_info), + "::", + stringify!(pm1a_slp_typ) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pm1b_slp_typ) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(hv_sleep_state_info), + "::", + stringify!(pm1b_slp_typ) + ) + ); +} +pub const hv_snp_status_HV_SNP_STATUS_NONE: hv_snp_status = 0; +pub const hv_snp_status_HV_SNP_STATUS_AVAILABLE: hv_snp_status = 1; +pub const hv_snp_status_HV_SNP_STATUS_INCOMPATIBLE: hv_snp_status = 2; +pub const hv_snp_status_HV_SNP_STATUS_PSP_UNAVAILABLE: hv_snp_status = 3; +pub const hv_snp_status_HV_SNP_STATUS_PSP_INIT_FAILED: hv_snp_status = 4; +pub const hv_snp_status_HV_SNP_STATUS_PSP_BAD_FW_VERSION: hv_snp_status = 5; +pub const hv_snp_status_HV_SNP_STATUS_BAD_CONFIGURATION: hv_snp_status = 6; +pub const hv_snp_status_HV_SNP_STATUS_PSP_FW_UPDATE_IN_PROGRESS: hv_snp_status = 7; +pub const hv_snp_status_HV_SNP_STATUS_PSP_RB_INIT_FAILED: hv_snp_status = 8; +pub const hv_snp_status_HV_SNP_STATUS_PSP_PLATFORM_STATUS_FAILED: hv_snp_status = 9; +pub const hv_snp_status_HV_SNP_STATUS_PSP_INIT_LATE_FAILED: hv_snp_status = 10; +pub type hv_snp_status = ::std::os::raw::c_uint; +pub const hv_dynamic_processor_feature_property_HV_X64_DYNAMIC_PROCESSOR_FEATURE_MAX_ENCRYPTED_PARTITIONS : hv_dynamic_processor_feature_property = 13 ; +pub const hv_dynamic_processor_feature_property_HV_X64_DYNAMIC_PROCESSOR_FEATURE_SNP_STATUS: + hv_dynamic_processor_feature_property = 16; +pub type hv_dynamic_processor_feature_property = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_get_system_property { + pub property_id: __u32, + pub reserved: __u32, + pub __bindgen_anon_1: hv_input_get_system_property__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_input_get_system_property__bindgen_ty_1 { + pub as_uint64: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_get_system_property__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_input_get_system_property__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_input_get_system_property__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_system_property__bindgen_ty_1), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_input_get_system_property__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_input_get_system_property() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_get_system_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_get_system_property)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_system_property), + "::", + stringify!(property_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_system_property), + "::", + stringify!(reserved) + ) + ); +} +impl Default for hv_input_get_system_property { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_system_diag_log_buffer_config { + pub buffer_count: __u32, + pub buffer_size_in_pages: __u32, +} +#[test] +fn bindgen_test_layout_hv_system_diag_log_buffer_config() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_system_diag_log_buffer_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_system_diag_log_buffer_config) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buffer_count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_system_diag_log_buffer_config), + "::", + stringify!(buffer_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buffer_size_in_pages) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_system_diag_log_buffer_config), + "::", + stringify!(buffer_size_in_pages) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_output_get_system_property { + pub __bindgen_anon_1: hv_output_get_system_property__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_output_get_system_property__bindgen_ty_1 { + pub scheduler_type: __u32, + pub hv_diagbuf_info: hv_system_diag_log_buffer_config, + pub hv_cda_info: hv_pfn_range, + pub hv_tramp_pa: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_get_system_property__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_output_get_system_property__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_output_get_system_property__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).scheduler_type) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_system_property__bindgen_ty_1), + "::", + stringify!(scheduler_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_diagbuf_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_system_property__bindgen_ty_1), + "::", + stringify!(hv_diagbuf_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_cda_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_system_property__bindgen_ty_1), + "::", + stringify!(hv_cda_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_tramp_pa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_system_property__bindgen_ty_1), + "::", + stringify!(hv_tramp_pa) + ) + ); +} +impl Default for hv_output_get_system_property__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_output_get_system_property() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_get_system_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_get_system_property)) + ); +} +impl Default for hv_output_get_system_property { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_set_system_property { + pub property_id: __u32, + pub reserved: __u32, + pub __bindgen_anon_1: hv_input_set_system_property__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_input_set_system_property__bindgen_ty_1 { + pub set_sleep_state_info: hv_sleep_state_info, +} +#[test] +fn bindgen_test_layout_hv_input_set_system_property__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 6usize, + concat!( + "Size of: ", + stringify!(hv_input_set_system_property__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_set_system_property__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).set_sleep_state_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_system_property__bindgen_ty_1), + "::", + stringify!(set_sleep_state_info) + ) + ); +} +impl Default for hv_input_set_system_property__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_input_set_system_property() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 14usize, + concat!("Size of: ", stringify!(hv_input_set_system_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_set_system_property)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_system_property), + "::", + stringify!(property_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_system_property), + "::", + stringify!(reserved) + ) + ); +} +impl Default for hv_input_set_system_property { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_map_stats_page { + pub type_: __u32, + pub padding: __u32, + pub identity: hv_stats_object_identity, +} +#[test] +fn bindgen_test_layout_hv_input_map_stats_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_map_stats_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_map_stats_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_stats_page), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_stats_page), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).identity) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_stats_page), + "::", + stringify!(identity) + ) + ); +} +impl Default for hv_input_map_stats_page { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_map_stats_page { + pub map_location: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_map_stats_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_map_stats_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_map_stats_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).map_location) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_map_stats_page), + "::", + stringify!(map_location) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_unmap_stats_page { + pub type_: __u32, + pub padding: __u32, + pub identity: hv_stats_object_identity, +} +#[test] +fn bindgen_test_layout_hv_input_unmap_stats_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_unmap_stats_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_unmap_stats_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_stats_page), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_stats_page), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).identity) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_stats_page), + "::", + stringify!(identity) + ) + ); +} +impl Default for hv_input_unmap_stats_page { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_proximity_domain_flags { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_proximity_domain_flags() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_proximity_domain_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_proximity_domain_flags)) + ); +} +impl hv_proximity_domain_flags { + #[inline] + pub fn proximity_preferred(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_proximity_preferred(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 30u8, val as u64) + } + } + #[inline] + pub fn proximity_info_valid(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u32) } + } + #[inline] + pub fn set_proximity_info_valid(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + proximity_preferred: __u32, + reserved: __u32, + proximity_info_valid: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let proximity_preferred: u32 = unsafe { ::std::mem::transmute(proximity_preferred) }; + proximity_preferred as u64 + }); + __bindgen_bitfield_unit.set(1usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let proximity_info_valid: u32 = unsafe { ::std::mem::transmute(proximity_info_valid) }; + proximity_info_valid as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_proximity_domain_info { + pub __bindgen_anon_1: hv_proximity_domain_info__bindgen_ty_1, + pub as_uint64: __u64, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_proximity_domain_info__bindgen_ty_1 { + pub domain_id: __u32, + pub flags: hv_proximity_domain_flags, +} +#[test] +fn bindgen_test_layout_hv_proximity_domain_info__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_proximity_domain_info__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_proximity_domain_info__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).domain_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_proximity_domain_info__bindgen_ty_1), + "::", + stringify!(domain_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_proximity_domain_info__bindgen_ty_1), + "::", + stringify!(flags) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_proximity_domain_info() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_proximity_domain_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_proximity_domain_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_proximity_domain_info), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_proximity_domain_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() + } + } +} +#[repr(C, packed)] +pub struct hv_deposit_memory { + pub partition_id: __u64, + pub gpa_page_list: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_deposit_memory() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_deposit_memory)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_deposit_memory)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_deposit_memory), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa_page_list) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_deposit_memory), + "::", + stringify!(gpa_page_list) + ) + ); +} +impl Default for hv_deposit_memory { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_withdraw_memory { + pub partition_id: __u64, + pub proximity_domain_info: hv_proximity_domain_info, +} +#[test] +fn bindgen_test_layout_hv_input_withdraw_memory() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_withdraw_memory)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_withdraw_memory)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_withdraw_memory), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).proximity_domain_info) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_withdraw_memory), + "::", + stringify!(proximity_domain_info) + ) + ); +} +impl Default for hv_input_withdraw_memory { + 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, packed)] +pub struct hv_output_withdraw_memory { + pub gpa_page_list: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_output_withdraw_memory() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 0usize, + concat!("Size of: ", stringify!(hv_output_withdraw_memory)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_withdraw_memory)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa_page_list) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_withdraw_memory), + "::", + stringify!(gpa_page_list) + ) + ); +} +impl Default for hv_output_withdraw_memory { + 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, packed)] +pub struct hv_input_map_gpa_pages { + pub target_partition_id: __u64, + pub target_gpa_base: __u64, + pub map_flags: __u32, + pub padding: __u32, + pub source_gpa_page_list: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_input_map_gpa_pages() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_map_gpa_pages)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_map_gpa_pages)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_gpa_pages), + "::", + stringify!(target_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_gpa_base) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_gpa_pages), + "::", + stringify!(target_gpa_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).map_flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_gpa_pages), + "::", + stringify!(map_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_gpa_pages), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).source_gpa_page_list) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_gpa_pages), + "::", + stringify!(source_gpa_page_list) + ) + ); +} +impl Default for hv_input_map_gpa_pages { + 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 union hv_gpa_page_access_state_flags { + pub __bindgen_anon_1: hv_gpa_page_access_state_flags__bindgen_ty_1, + pub as_uint64: __u64, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_gpa_page_access_state_flags__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_gpa_page_access_state_flags__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_gpa_page_access_state_flags__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_gpa_page_access_state_flags__bindgen_ty_1) + ) + ); +} +impl hv_gpa_page_access_state_flags__bindgen_ty_1 { + #[inline] + pub fn clear_accessed(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_clear_accessed(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn set_access(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_set_access(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn clear_dirty(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_clear_dirty(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn set_dirty(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_set_dirty(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 60u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 60u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + clear_accessed: __u64, + set_access: __u64, + clear_dirty: __u64, + set_dirty: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let clear_accessed: u64 = unsafe { ::std::mem::transmute(clear_accessed) }; + clear_accessed as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let set_access: u64 = unsafe { ::std::mem::transmute(set_access) }; + set_access as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let clear_dirty: u64 = unsafe { ::std::mem::transmute(clear_dirty) }; + clear_dirty as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let set_dirty: u64 = unsafe { ::std::mem::transmute(set_dirty) }; + set_dirty as u64 + }); + __bindgen_bitfield_unit.set(4usize, 60u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_gpa_page_access_state_flags() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_gpa_page_access_state_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_gpa_page_access_state_flags)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_gpa_page_access_state_flags), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_gpa_page_access_state_flags { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_get_gpa_pages_access_state { + pub partition_id: __u64, + pub flags: hv_gpa_page_access_state_flags, + pub hv_gpa_page_number: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_get_gpa_pages_access_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_get_gpa_pages_access_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_get_gpa_pages_access_state) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_gpa_pages_access_state), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_gpa_pages_access_state), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_gpa_page_number) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_gpa_pages_access_state), + "::", + stringify!(hv_gpa_page_number) + ) + ); +} +impl Default for hv_input_get_gpa_pages_access_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_gpa_page_access_state { + pub __bindgen_anon_1: hv_gpa_page_access_state__bindgen_ty_1, + pub as_uint8: __u8, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_gpa_page_access_state__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, +} +#[test] +fn bindgen_test_layout_hv_gpa_page_access_state__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!( + "Size of: ", + stringify!(hv_gpa_page_access_state__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_gpa_page_access_state__bindgen_ty_1) + ) + ); +} +impl hv_gpa_page_access_state__bindgen_ty_1 { + #[inline] + pub fn accessed(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) } + } + #[inline] + pub fn set_accessed(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn dirty(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) } + } + #[inline] + pub fn set_dirty(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 6u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + accessed: __u8, + dirty: __u8, + reserved: __u8, + ) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let accessed: u8 = unsafe { ::std::mem::transmute(accessed) }; + accessed as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let dirty: u8 = unsafe { ::std::mem::transmute(dirty) }; + dirty as u64 + }); + __bindgen_bitfield_unit.set(2usize, 6u8, { + let reserved: u8 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_gpa_page_access_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 1usize, + concat!("Size of: ", stringify!(hv_gpa_page_access_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_gpa_page_access_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint8) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_gpa_page_access_state), + "::", + stringify!(as_uint8) + ) + ); +} +impl Default for hv_gpa_page_access_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_snp_guest_policy { + pub __bindgen_anon_1: hv_snp_guest_policy__bindgen_ty_1, + pub as_uint64: __u64, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_snp_guest_policy__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_snp_guest_policy__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_snp_guest_policy__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_snp_guest_policy__bindgen_ty_1) + ) + ); +} +impl hv_snp_guest_policy__bindgen_ty_1 { + #[inline] + pub fn minor_version(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } + } + #[inline] + pub fn set_minor_version(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub fn major_version(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u64) } + } + #[inline] + pub fn set_major_version(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 8u8, val as u64) + } + } + #[inline] + pub fn smt_allowed(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u64) } + } + #[inline] + pub fn set_smt_allowed(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn vmpls_required(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_vmpls_required(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn migration_agent_allowed(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_migration_agent_allowed(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn debug_allowed(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_debug_allowed(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 44u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 44u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + minor_version: __u64, + major_version: __u64, + smt_allowed: __u64, + vmpls_required: __u64, + migration_agent_allowed: __u64, + debug_allowed: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let minor_version: u64 = unsafe { ::std::mem::transmute(minor_version) }; + minor_version as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let major_version: u64 = unsafe { ::std::mem::transmute(major_version) }; + major_version as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let smt_allowed: u64 = unsafe { ::std::mem::transmute(smt_allowed) }; + smt_allowed as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let vmpls_required: u64 = unsafe { ::std::mem::transmute(vmpls_required) }; + vmpls_required as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let migration_agent_allowed: u64 = + unsafe { ::std::mem::transmute(migration_agent_allowed) }; + migration_agent_allowed as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let debug_allowed: u64 = unsafe { ::std::mem::transmute(debug_allowed) }; + debug_allowed as u64 + }); + __bindgen_bitfield_unit.set(20usize, 44u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_snp_guest_policy() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_snp_guest_policy)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_snp_guest_policy)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_guest_policy), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_snp_guest_policy { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_snp_id_block { + pub launch_digest: [__u8; 48usize], + pub family_id: [__u8; 16usize], + pub image_id: [__u8; 16usize], + pub version: __u32, + pub guest_svn: __u32, + pub policy: hv_snp_guest_policy, +} +#[test] +fn bindgen_test_layout_hv_snp_id_block() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 96usize, + concat!("Size of: ", stringify!(hv_snp_id_block)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_snp_id_block)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).launch_digest) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_block), + "::", + stringify!(launch_digest) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).family_id) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_block), + "::", + stringify!(family_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).image_id) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_block), + "::", + stringify!(image_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, + 80usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_block), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_svn) as usize - ptr as usize }, + 84usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_block), + "::", + stringify!(guest_svn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).policy) as usize - ptr as usize }, + 88usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_block), + "::", + stringify!(policy) + ) + ); +} +impl Default for hv_snp_id_block { + 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, packed)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_snp_id_auth_info { + pub id_key_algorithm: __u32, + pub auth_key_algorithm: __u32, + pub reserved0: [__u8; 56usize], + pub id_block_signature: [__u8; 512usize], + pub id_key: [__u8; 1028usize], + pub reserved1: [__u8; 60usize], + pub id_key_signature: [__u8; 512usize], + pub author_key: [__u8; 1028usize], +} +#[test] +fn bindgen_test_layout_hv_snp_id_auth_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 3204usize, + concat!("Size of: ", stringify!(hv_snp_id_auth_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_snp_id_auth_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_key_algorithm) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(id_key_algorithm) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).auth_key_algorithm) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(auth_key_algorithm) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved0) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(reserved0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_block_signature) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(id_block_signature) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_key) as usize - ptr as usize }, + 576usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(id_key) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 1604usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_key_signature) as usize - ptr as usize }, + 1664usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(id_key_signature) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).author_key) as usize - ptr as usize }, + 2176usize, + concat!( + "Offset of field: ", + stringify!(hv_snp_id_auth_info), + "::", + stringify!(author_key) + ) + ); +} +impl Default for hv_snp_id_auth_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() + } + } +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_psp_launch_finish_data { + pub id_block: hv_snp_id_block, + pub id_auth_info: hv_snp_id_auth_info, + pub host_data: [__u8; 32usize], + pub id_block_enabled: __u8, + pub author_key_enabled: __u8, +} +#[test] +fn bindgen_test_layout_hv_psp_launch_finish_data() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 3334usize, + concat!("Size of: ", stringify!(hv_psp_launch_finish_data)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_psp_launch_finish_data)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_block) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_launch_finish_data), + "::", + stringify!(id_block) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_auth_info) as usize - ptr as usize }, + 96usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_launch_finish_data), + "::", + stringify!(id_auth_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).host_data) as usize - ptr as usize }, + 3300usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_launch_finish_data), + "::", + stringify!(host_data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id_block_enabled) as usize - ptr as usize }, + 3332usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_launch_finish_data), + "::", + stringify!(id_block_enabled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).author_key_enabled) as usize - ptr as usize }, + 3333usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_launch_finish_data), + "::", + stringify!(author_key_enabled) + ) + ); +} +impl Default for hv_psp_launch_finish_data { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_partition_complete_isolated_import_data { + pub reserved: __u64, + pub psp_parameters: hv_psp_launch_finish_data, +} +#[test] +fn bindgen_test_layout_hv_partition_complete_isolated_import_data() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 3334usize, + concat!( + "Size of: ", + stringify!(hv_partition_complete_isolated_import_data) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_complete_isolated_import_data) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_complete_isolated_import_data), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).psp_parameters) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_complete_isolated_import_data), + "::", + stringify!(psp_parameters) + ) + ); +} +impl Default for hv_partition_complete_isolated_import_data { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_complete_isolated_import { + pub partition_id: __u64, + pub import_data: hv_partition_complete_isolated_import_data, +} +#[test] +fn bindgen_test_layout_hv_input_complete_isolated_import() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 3342usize, + concat!("Size of: ", stringify!(hv_input_complete_isolated_import)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_complete_isolated_import) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_complete_isolated_import), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).import_data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_complete_isolated_import), + "::", + stringify!(import_data) + ) + ); +} +impl Default for hv_input_complete_isolated_import { + 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 hv_crashdump_action_HV_CRASHDUMP_NONE: hv_crashdump_action = 0; +pub const hv_crashdump_action_HV_CRASHDUMP_SUSPEND_ALL_VPS: hv_crashdump_action = 1; +pub const hv_crashdump_action_HV_CRASHDUMP_PREPARE_FOR_STATE_SAVE: hv_crashdump_action = 2; +pub const hv_crashdump_action_HV_CRASHDUMP_STATE_SAVED: hv_crashdump_action = 3; +pub const hv_crashdump_action_HV_CRASHDUMP_ENTRY: hv_crashdump_action = 4; +pub type hv_crashdump_action = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_event_root_crashdump_input { + pub crashdump_action: __u32, +} +#[test] +fn bindgen_test_layout_hv_partition_event_root_crashdump_input() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_partition_event_root_crashdump_input) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_event_root_crashdump_input) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).crashdump_action) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_event_root_crashdump_input), + "::", + stringify!(crashdump_action) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_disable_hyp_ex { + pub rip: __u64, + pub arg: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_disable_hyp_ex() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_disable_hyp_ex)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_disable_hyp_ex)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_disable_hyp_ex), + "::", + stringify!(rip) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).arg) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_disable_hyp_ex), + "::", + stringify!(arg) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_crashdump_area { + pub version: __u32, + pub __bindgen_anon_1: hv_crashdump_area__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_crashdump_area__bindgen_ty_1 { + pub flags_as_uint32: __u32, + pub __bindgen_anon_1: hv_crashdump_area__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_crashdump_area__bindgen_ty_1__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_crashdump_area__bindgen_ty_1__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_crashdump_area__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_crashdump_area__bindgen_ty_1__bindgen_ty_1) + ) + ); +} +impl hv_crashdump_area__bindgen_ty_1__bindgen_ty_1 { + #[inline] + pub fn cda_valid(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_cda_valid(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn cda_unused(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_cda_unused(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + cda_valid: __u32, + cda_unused: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let cda_valid: u32 = unsafe { ::std::mem::transmute(cda_valid) }; + cda_valid as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let cda_unused: u32 = unsafe { ::std::mem::transmute(cda_unused) }; + cda_unused as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_crashdump_area__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_crashdump_area__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_crashdump_area__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags_as_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_crashdump_area__bindgen_ty_1), + "::", + stringify!(flags_as_uint32) + ) + ); +} +impl Default for hv_crashdump_area__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_crashdump_area() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_crashdump_area)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_crashdump_area)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_crashdump_area), + "::", + stringify!(version) + ) + ); +} +impl Default for hv_crashdump_area { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_event_commit_processor_indices_input { + pub schedulable_processor_count: __u32, +} +#[test] +fn bindgen_test_layout_hv_partition_event_commit_processor_indices_input() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_partition_event_commit_processor_indices_input) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_event_commit_processor_indices_input) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).schedulable_processor_count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_event_commit_processor_indices_input), + "::", + stringify!(schedulable_processor_count) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_partition_event_input { + pub crashdump_input: hv_partition_event_root_crashdump_input, + pub commit_lp_indices_input: hv_partition_event_commit_processor_indices_input, +} +#[test] +fn bindgen_test_layout_hv_partition_event_input() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_partition_event_input)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_partition_event_input)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).crashdump_input) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_event_input), + "::", + stringify!(crashdump_input) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).commit_lp_indices_input) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_event_input), + "::", + stringify!(commit_lp_indices_input) + ) + ); +} +impl Default for hv_partition_event_input { + 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 hv_partition_event_HV_PARTITION_EVENT_DEBUG_DEVICE_AVAILABLE: hv_partition_event = 1; +pub const hv_partition_event_HV_PARTITION_EVENT_ROOT_CRASHDUMP: hv_partition_event = 2; +pub const hv_partition_event_HV_PARTITION_EVENT_ACPI_REENABLED: hv_partition_event = 3; +pub const hv_partition_event_HV_PARTITION_ALL_LOGICAL_PROCESSORS_STARTED: hv_partition_event = 4; +pub const hv_partition_event_HV_PARTITION_COMMIT_LP_INDICES: hv_partition_event = 5; +pub type hv_partition_event = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_notify_partition_event { + pub event: __u32, + pub input: hv_partition_event_input, +} +#[test] +fn bindgen_test_layout_hv_input_notify_partition_event() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_input_notify_partition_event)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_notify_partition_event)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_notify_partition_event), + "::", + stringify!(event) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).input) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_notify_partition_event), + "::", + stringify!(input) + ) + ); +} +impl Default for hv_input_notify_partition_event { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_lp_startup_status { + pub hv_status: __u64, + pub substatus1: __u64, + pub substatus2: __u64, + pub substatus3: __u64, + pub substatus4: __u64, + pub substatus5: __u64, + pub substatus6: __u64, +} +#[test] +fn bindgen_test_layout_hv_lp_startup_status() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(hv_lp_startup_status)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_lp_startup_status)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_status) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(hv_status) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).substatus1) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(substatus1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).substatus2) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(substatus2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).substatus3) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(substatus3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).substatus4) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(substatus4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).substatus5) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(substatus5) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).substatus6) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(hv_lp_startup_status), + "::", + stringify!(substatus6) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_add_logical_processor { + pub lp_index: __u32, + pub apic_id: __u32, + pub proximity_domain_info: hv_proximity_domain_info, +} +#[test] +fn bindgen_test_layout_hv_input_add_logical_processor() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_add_logical_processor)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_add_logical_processor)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lp_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_add_logical_processor), + "::", + stringify!(lp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).apic_id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_add_logical_processor), + "::", + stringify!(apic_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).proximity_domain_info) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_add_logical_processor), + "::", + stringify!(proximity_domain_info) + ) + ); +} +impl Default for hv_input_add_logical_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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_add_logical_processor { + pub startup_status: hv_lp_startup_status, +} +#[test] +fn bindgen_test_layout_hv_output_add_logical_processor() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(hv_output_add_logical_processor)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_add_logical_processor)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).startup_status) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_add_logical_processor), + "::", + stringify!(startup_status) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_get_logical_processor_run_time { + pub lp_index: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_get_logical_processor_run_time() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_input_get_logical_processor_run_time) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_get_logical_processor_run_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lp_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_logical_processor_run_time), + "::", + stringify!(lp_index) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_get_logical_processor_run_time { + pub global_time: __u64, + pub local_run_time: __u64, + pub rsvdz0: __u64, + pub hypervisor_time: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_get_logical_processor_run_time() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!( + "Size of: ", + stringify!(hv_output_get_logical_processor_run_time) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_output_get_logical_processor_run_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).global_time) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_logical_processor_run_time), + "::", + stringify!(global_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).local_run_time) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_logical_processor_run_time), + "::", + stringify!(local_run_time) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz0) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_logical_processor_run_time), + "::", + stringify!(rsvdz0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hypervisor_time) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_logical_processor_run_time), + "::", + stringify!(hypervisor_time) + ) + ); +} +pub const HvSubnodeAny: _bindgen_ty_1 = 0; +pub const HvSubnodeSocket: _bindgen_ty_1 = 1; +pub const HvSubnodeCluster: _bindgen_ty_1 = 2; +pub const HvSubnodeL3: _bindgen_ty_1 = 3; +pub const HvSubnodeCount: _bindgen_ty_1 = 4; +pub const HvSubnodeInvalid: _bindgen_ty_1 = -1; +pub type _bindgen_ty_1 = ::std::os::raw::c_int; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_create_vp { + pub partition_id: __u64, + pub vp_index: __u32, + pub padding: [__u8; 3usize], + pub subnode_type: __u8, + pub subnode_id: __u64, + pub proximity_domain_info: hv_proximity_domain_info, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_hv_create_vp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(hv_create_vp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_create_vp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subnode_type) as usize - ptr as usize }, + 15usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(subnode_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subnode_id) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(subnode_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).proximity_domain_info) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(proximity_domain_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_create_vp), + "::", + stringify!(flags) + ) + ); +} +impl Default for hv_create_vp { + 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, packed)] +pub struct hv_send_ipi_ex { + pub vector: __u32, + pub reserved: __u32, + pub vp_set: hv_vpset, +} +#[test] +fn bindgen_test_layout_hv_send_ipi_ex() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_send_ipi_ex)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_send_ipi_ex)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_send_ipi_ex), + "::", + stringify!(vector) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_send_ipi_ex), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_set) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_send_ipi_ex), + "::", + stringify!(vp_set) + ) + ); +} +impl Default for hv_send_ipi_ex { + 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 union hv_attdev_flags { + pub __bindgen_anon_1: hv_attdev_flags__bindgen_ty_1, + pub as_uint32: __u32, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_attdev_flags__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_attdev_flags__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_attdev_flags__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_attdev_flags__bindgen_ty_1)) + ); +} +impl hv_attdev_flags__bindgen_ty_1 { + #[inline] + pub fn logical_id(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_logical_id(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn resvd0(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_resvd0(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn ats_enabled(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_ats_enabled(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn virt_func(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_virt_func(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn shared_irq_child(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_shared_irq_child(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn virt_dev(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_virt_dev(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ats_supported(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u32) } + } + #[inline] + pub fn set_ats_supported(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn small_irt(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u32) } + } + #[inline] + pub fn set_small_irt(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn resvd(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u32) } + } + #[inline] + pub fn set_resvd(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 24u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + logical_id: __u32, + resvd0: __u32, + ats_enabled: __u32, + virt_func: __u32, + shared_irq_child: __u32, + virt_dev: __u32, + ats_supported: __u32, + small_irt: __u32, + resvd: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let logical_id: u32 = unsafe { ::std::mem::transmute(logical_id) }; + logical_id as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let resvd0: u32 = unsafe { ::std::mem::transmute(resvd0) }; + resvd0 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let ats_enabled: u32 = unsafe { ::std::mem::transmute(ats_enabled) }; + ats_enabled as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let virt_func: u32 = unsafe { ::std::mem::transmute(virt_func) }; + virt_func as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let shared_irq_child: u32 = unsafe { ::std::mem::transmute(shared_irq_child) }; + shared_irq_child as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let virt_dev: u32 = unsafe { ::std::mem::transmute(virt_dev) }; + virt_dev as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ats_supported: u32 = unsafe { ::std::mem::transmute(ats_supported) }; + ats_supported as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let small_irt: u32 = unsafe { ::std::mem::transmute(small_irt) }; + small_irt as u64 + }); + __bindgen_bitfield_unit.set(8usize, 24u8, { + let resvd: u32 = unsafe { ::std::mem::transmute(resvd) }; + resvd as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_attdev_flags() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_attdev_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_attdev_flags)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_attdev_flags), + "::", + stringify!(as_uint32) + ) + ); +} +impl Default for hv_attdev_flags { + 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 union hv_dev_pci_caps { + pub __bindgen_anon_1: hv_dev_pci_caps__bindgen_ty_1, + pub as_uint32: __u32, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_dev_pci_caps__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_dev_pci_caps__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_dev_pci_caps__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_dev_pci_caps__bindgen_ty_1)) + ); +} +impl hv_dev_pci_caps__bindgen_ty_1 { + #[inline] + pub fn max_pasid_width(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_max_pasid_width(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn invalidate_qdepth(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_invalidate_qdepth(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn global_inval(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_global_inval(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn prg_response_req(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_prg_response_req(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn resvd(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 24u8) as u32) } + } + #[inline] + pub fn set_resvd(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 24u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + max_pasid_width: __u32, + invalidate_qdepth: __u32, + global_inval: __u32, + prg_response_req: __u32, + resvd: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let max_pasid_width: u32 = unsafe { ::std::mem::transmute(max_pasid_width) }; + max_pasid_width as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let invalidate_qdepth: u32 = unsafe { ::std::mem::transmute(invalidate_qdepth) }; + invalidate_qdepth as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let global_inval: u32 = unsafe { ::std::mem::transmute(global_inval) }; + global_inval as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let prg_response_req: u32 = unsafe { ::std::mem::transmute(prg_response_req) }; + prg_response_req as u64 + }); + __bindgen_bitfield_unit.set(4usize, 24u8, { + let resvd: u32 = unsafe { ::std::mem::transmute(resvd) }; + resvd as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_dev_pci_caps() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_dev_pci_caps)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_dev_pci_caps)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_dev_pci_caps), + "::", + stringify!(as_uint32) + ) + ); +} +impl Default for hv_dev_pci_caps { + 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 type hv_pci_rid = __u16; +pub type hv_pci_segment = __u16; +pub type hv_logical_device_id = __u64; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_pci_bdf { + pub as_uint16: __u16, + pub __bindgen_anon_1: hv_pci_bdf__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_pci_bdf__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>, + pub bus: __u8, +} +#[test] +fn bindgen_test_layout_hv_pci_bdf__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(hv_pci_bdf__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_pci_bdf__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bus) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(hv_pci_bdf__bindgen_ty_1), + "::", + stringify!(bus) + ) + ); +} +impl hv_pci_bdf__bindgen_ty_1 { + #[inline] + pub fn function(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) } + } + #[inline] + pub fn set_function(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 3u8, val as u64) + } + } + #[inline] + pub fn device(&self) -> __u8 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 5u8) as u8) } + } + #[inline] + pub fn set_device(&mut self, val: __u8) { + unsafe { + let val: u8 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 5u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1(function: __u8, device: __u8) -> __BindgenBitfieldUnit<[u8; 1usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 3u8, { + let function: u8 = unsafe { ::std::mem::transmute(function) }; + function as u64 + }); + __bindgen_bitfield_unit.set(3usize, 5u8, { + let device: u8 = unsafe { ::std::mem::transmute(device) }; + device as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_pci_bdf() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(hv_pci_bdf)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_pci_bdf)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint16) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_pci_bdf), + "::", + stringify!(as_uint16) + ) + ); +} +impl Default for hv_pci_bdf { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_pci_bus_range { + pub as_uint16: __u16, + pub __bindgen_anon_1: hv_pci_bus_range__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_pci_bus_range__bindgen_ty_1 { + pub subordinate_bus: __u8, + pub secondary_bus: __u8, +} +#[test] +fn bindgen_test_layout_hv_pci_bus_range__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(hv_pci_bus_range__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_pci_bus_range__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).subordinate_bus) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_pci_bus_range__bindgen_ty_1), + "::", + stringify!(subordinate_bus) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).secondary_bus) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(hv_pci_bus_range__bindgen_ty_1), + "::", + stringify!(secondary_bus) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_pci_bus_range() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 2usize, + concat!("Size of: ", stringify!(hv_pci_bus_range)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_pci_bus_range)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint16) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_pci_bus_range), + "::", + stringify!(as_uint16) + ) + ); +} +impl Default for hv_pci_bus_range { + 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 hv_device_type_HV_DEVICE_TYPE_LOGICAL: hv_device_type = 0; +pub const hv_device_type_HV_DEVICE_TYPE_PCI: hv_device_type = 1; +pub const hv_device_type_HV_DEVICE_TYPE_IOAPIC: hv_device_type = 2; +pub const hv_device_type_HV_DEVICE_TYPE_ACPI: hv_device_type = 3; +pub type hv_device_type = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_detach_device { + pub partition_id: __u64, + pub logical_devid: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_detach_device() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_detach_device)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_detach_device)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_detach_device), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).logical_devid) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_detach_device), + "::", + stringify!(logical_devid) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_device_domain_id { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_device_domain_id__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_device_domain_id__bindgen_ty_1 { + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub id: __u32, +} +#[test] +fn bindgen_test_layout_hv_device_domain_id__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_device_domain_id__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_device_domain_id__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).id) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_device_domain_id__bindgen_ty_1), + "::", + stringify!(id) + ) + ); +} +impl hv_device_domain_id__bindgen_ty_1 { + #[inline] + pub fn type_(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u32) } + } + #[inline] + pub fn set_type(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 4u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 28u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 28u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1(type_: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 4u8, { + let type_: u32 = unsafe { ::std::mem::transmute(type_) }; + type_ as u64 + }); + __bindgen_bitfield_unit.set(4usize, 28u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_device_domain_id() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_device_domain_id)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_device_domain_id)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_device_domain_id), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_device_domain_id { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_device_domain { + pub partition_id: __u64, + pub owner_vtl: hv_input_vtl, + pub padding: [__u8; 7usize], + pub domain_id: hv_device_domain_id, +} +#[test] +fn bindgen_test_layout_hv_input_device_domain() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_device_domain)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_device_domain)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_device_domain), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).owner_vtl) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_device_domain), + "::", + stringify!(owner_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 9usize, + concat!( + "Offset of field: ", + stringify!(hv_input_device_domain), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).domain_id) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_device_domain), + "::", + stringify!(domain_id) + ) + ); +} +impl Default for hv_input_device_domain { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_create_device_domain_flags { + pub as_uint32: __u32, + pub __bindgen_anon_1: hv_create_device_domain_flags__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_create_device_domain_flags__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_create_device_domain_flags__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_create_device_domain_flags__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_create_device_domain_flags__bindgen_ty_1) + ) + ); +} +impl hv_create_device_domain_flags__bindgen_ty_1 { + #[inline] + pub fn forward_progress_required(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_forward_progress_required(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn inherit_owning_vtl(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_inherit_owning_vtl(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + forward_progress_required: __u32, + inherit_owning_vtl: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let forward_progress_required: u32 = + unsafe { ::std::mem::transmute(forward_progress_required) }; + forward_progress_required as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let inherit_owning_vtl: u32 = unsafe { ::std::mem::transmute(inherit_owning_vtl) }; + inherit_owning_vtl as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_create_device_domain_flags() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_create_device_domain_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_create_device_domain_flags)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_create_device_domain_flags), + "::", + stringify!(as_uint32) + ) + ); +} +impl Default for hv_create_device_domain_flags { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_create_device_domain { + pub device_domain: hv_input_device_domain, + pub create_device_domain_flags: hv_create_device_domain_flags, +} +#[test] +fn bindgen_test_layout_hv_input_create_device_domain() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 28usize, + concat!("Size of: ", stringify!(hv_input_create_device_domain)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_create_device_domain)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).device_domain) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_device_domain), + "::", + stringify!(device_domain) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).create_device_domain_flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_device_domain), + "::", + stringify!(create_device_domain_flags) + ) + ); +} +impl Default for hv_input_create_device_domain { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_delete_device_domain { + pub device_domain: hv_input_device_domain, +} +#[test] +fn bindgen_test_layout_hv_input_delete_device_domain() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_delete_device_domain)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_delete_device_domain)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).device_domain) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_delete_device_domain), + "::", + stringify!(device_domain) + ) + ); +} +impl Default for hv_input_delete_device_domain { + 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, packed)] +pub struct hv_input_map_device_gpa_pages { + pub device_domain: hv_input_device_domain, + pub target_vtl: hv_input_vtl, + pub padding: [__u8; 3usize], + pub map_flags: __u32, + pub target_device_va_base: __u64, + pub gpa_page_list: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_input_map_device_gpa_pages() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(hv_input_map_device_gpa_pages)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_map_device_gpa_pages)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).device_domain) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_device_gpa_pages), + "::", + stringify!(device_domain) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vtl) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_device_gpa_pages), + "::", + stringify!(target_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 25usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_device_gpa_pages), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).map_flags) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_device_gpa_pages), + "::", + stringify!(map_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_device_va_base) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_device_gpa_pages), + "::", + stringify!(target_device_va_base) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa_page_list) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_device_gpa_pages), + "::", + stringify!(gpa_page_list) + ) + ); +} +impl Default for hv_input_map_device_gpa_pages { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_unmap_device_gpa_pages { + pub device_domain: hv_input_device_domain, + pub target_device_va_base: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_unmap_device_gpa_pages() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_input_unmap_device_gpa_pages)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_unmap_device_gpa_pages)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).device_domain) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_device_gpa_pages), + "::", + stringify!(device_domain) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_device_va_base) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_device_gpa_pages), + "::", + stringify!(target_device_va_base) + ) + ); +} +impl Default for hv_input_unmap_device_gpa_pages { + 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 hv_stats_hypervisor_counters_HvLogicalProcessors: hv_stats_hypervisor_counters = 1; +pub const hv_stats_hypervisor_counters_HvPartitions: hv_stats_hypervisor_counters = 2; +pub const hv_stats_hypervisor_counters_HvTotalPages: hv_stats_hypervisor_counters = 3; +pub const hv_stats_hypervisor_counters_HvVirtualProcessors: hv_stats_hypervisor_counters = 4; +pub const hv_stats_hypervisor_counters_HvMonitoredNotifications: hv_stats_hypervisor_counters = 5; +pub const hv_stats_hypervisor_counters_HvModernStandbyEntries: hv_stats_hypervisor_counters = 6; +pub const hv_stats_hypervisor_counters_HvPlatformIdleTransitions: hv_stats_hypervisor_counters = 7; +pub const hv_stats_hypervisor_counters_HvHypervisorStartupCost: hv_stats_hypervisor_counters = 8; +pub const hv_stats_hypervisor_counters_HvIOSpacePages: hv_stats_hypervisor_counters = 10; +pub const hv_stats_hypervisor_counters_HvNonEssentialPagesForDump: hv_stats_hypervisor_counters = + 11; +pub const hv_stats_hypervisor_counters_HvSubsumedPages: hv_stats_hypervisor_counters = 12; +pub const hv_stats_hypervisor_counters_HvStatsMaxCounter: hv_stats_hypervisor_counters = 13; +pub type hv_stats_hypervisor_counters = ::std::os::raw::c_uint; +pub const hv_stats_partition_counters_PartitionVirtualProcessors: hv_stats_partition_counters = 1; +pub const hv_stats_partition_counters_PartitionTlbSize: hv_stats_partition_counters = 3; +pub const hv_stats_partition_counters_PartitionAddressSpaces: hv_stats_partition_counters = 4; +pub const hv_stats_partition_counters_PartitionDepositedPages: hv_stats_partition_counters = 5; +pub const hv_stats_partition_counters_PartitionGpaPages: hv_stats_partition_counters = 6; +pub const hv_stats_partition_counters_PartitionGpaSpaceModifications: hv_stats_partition_counters = + 7; +pub const hv_stats_partition_counters_PartitionVirtualTlbFlushEntires: hv_stats_partition_counters = + 8; +pub const hv_stats_partition_counters_PartitionRecommendedTlbSize: hv_stats_partition_counters = 9; +pub const hv_stats_partition_counters_PartitionGpaPages4K: hv_stats_partition_counters = 10; +pub const hv_stats_partition_counters_PartitionGpaPages2M: hv_stats_partition_counters = 11; +pub const hv_stats_partition_counters_PartitionGpaPages1G: hv_stats_partition_counters = 12; +pub const hv_stats_partition_counters_PartitionGpaPages512G: hv_stats_partition_counters = 13; +pub const hv_stats_partition_counters_PartitionDevicePages4K: hv_stats_partition_counters = 14; +pub const hv_stats_partition_counters_PartitionDevicePages2M: hv_stats_partition_counters = 15; +pub const hv_stats_partition_counters_PartitionDevicePages1G: hv_stats_partition_counters = 16; +pub const hv_stats_partition_counters_PartitionDevicePages512G: hv_stats_partition_counters = 17; +pub const hv_stats_partition_counters_PartitionAttachedDevices: hv_stats_partition_counters = 18; +pub const hv_stats_partition_counters_PartitionDeviceInterruptMappings: + hv_stats_partition_counters = 19; +pub const hv_stats_partition_counters_PartitionIoTlbFlushes: hv_stats_partition_counters = 20; +pub const hv_stats_partition_counters_PartitionIoTlbFlushCost: hv_stats_partition_counters = 21; +pub const hv_stats_partition_counters_PartitionDeviceInterruptErrors: hv_stats_partition_counters = + 22; +pub const hv_stats_partition_counters_PartitionDeviceDmaErrors: hv_stats_partition_counters = 23; +pub const hv_stats_partition_counters_PartitionDeviceInterruptThrottleEvents: + hv_stats_partition_counters = 24; +pub const hv_stats_partition_counters_PartitionSkippedTimerTicks: hv_stats_partition_counters = 25; +pub const hv_stats_partition_counters_PartitionPartitionId: hv_stats_partition_counters = 26; +pub const hv_stats_partition_counters_PartitionHwpRequestValue: hv_stats_partition_counters = 27; +pub const hv_stats_partition_counters_PartitionStatsMaxCounter: hv_stats_partition_counters = 28; +pub type hv_stats_partition_counters = ::std::os::raw::c_uint; +pub const hv_stats_vp_counters_VpTotalRunTime: hv_stats_vp_counters = 1; +pub const hv_stats_vp_counters_VpHypervisorRunTime: hv_stats_vp_counters = 2; +pub const hv_stats_vp_counters_VpRemoteNodeRunTime: hv_stats_vp_counters = 3; +pub const hv_stats_vp_counters_VpNormalizedRunTime: hv_stats_vp_counters = 4; +pub const hv_stats_vp_counters_VpIdealCpu: hv_stats_vp_counters = 5; +pub const hv_stats_vp_counters_VpHypercallsCount: hv_stats_vp_counters = 7; +pub const hv_stats_vp_counters_VpHypercallsTime: hv_stats_vp_counters = 8; +pub const hv_stats_vp_counters_VpSysRegAccessesCount: hv_stats_vp_counters = 9; +pub const hv_stats_vp_counters_VpSysRegAccessesTime: hv_stats_vp_counters = 10; +pub const hv_stats_vp_counters_VpSmcInstructionsCount: hv_stats_vp_counters = 11; +pub const hv_stats_vp_counters_VpSmcInstructionsTime: hv_stats_vp_counters = 12; +pub const hv_stats_vp_counters_VpOtherInterceptsCount: hv_stats_vp_counters = 13; +pub const hv_stats_vp_counters_VpOtherInterceptsTime: hv_stats_vp_counters = 14; +pub const hv_stats_vp_counters_VpExternalInterruptsCount: hv_stats_vp_counters = 15; +pub const hv_stats_vp_counters_VpExternalInterruptsTime: hv_stats_vp_counters = 16; +pub const hv_stats_vp_counters_VpPendingInterruptsCount: hv_stats_vp_counters = 17; +pub const hv_stats_vp_counters_VpPendingInterruptsTime: hv_stats_vp_counters = 18; +pub const hv_stats_vp_counters_VpGuestPageTableMaps: hv_stats_vp_counters = 19; +pub const hv_stats_vp_counters_VpLargePageTlbFills: hv_stats_vp_counters = 20; +pub const hv_stats_vp_counters_VpSmallPageTlbFills: hv_stats_vp_counters = 21; +pub const hv_stats_vp_counters_VpReflectedGuestPageFaults: hv_stats_vp_counters = 22; +pub const hv_stats_vp_counters_VpMemoryInterceptMessages: hv_stats_vp_counters = 23; +pub const hv_stats_vp_counters_VpOtherMessages: hv_stats_vp_counters = 24; +pub const hv_stats_vp_counters_VpLogicalProcessorMigrations: hv_stats_vp_counters = 25; +pub const hv_stats_vp_counters_VpAddressDomainFlushes: hv_stats_vp_counters = 26; +pub const hv_stats_vp_counters_VpAddressSpaceFlushes: hv_stats_vp_counters = 27; +pub const hv_stats_vp_counters_VpSyntheticInterrupts: hv_stats_vp_counters = 28; +pub const hv_stats_vp_counters_VpVirtualInterrupts: hv_stats_vp_counters = 29; +pub const hv_stats_vp_counters_VpApicSelfIpisSent: hv_stats_vp_counters = 30; +pub const hv_stats_vp_counters_VpGpaSpaceHypercalls: hv_stats_vp_counters = 31; +pub const hv_stats_vp_counters_VpLogicalProcessorHypercalls: hv_stats_vp_counters = 32; +pub const hv_stats_vp_counters_VpLongSpinWaitHypercalls: hv_stats_vp_counters = 33; +pub const hv_stats_vp_counters_VpOtherHypercalls: hv_stats_vp_counters = 34; +pub const hv_stats_vp_counters_VpSyntheticInterruptHypercalls: hv_stats_vp_counters = 35; +pub const hv_stats_vp_counters_VpVirtualInterruptHypercalls: hv_stats_vp_counters = 36; +pub const hv_stats_vp_counters_VpVirtualMmuHypercalls: hv_stats_vp_counters = 37; +pub const hv_stats_vp_counters_VpVirtualProcessorHypercalls: hv_stats_vp_counters = 38; +pub const hv_stats_vp_counters_VpHardwareInterrupts: hv_stats_vp_counters = 39; +pub const hv_stats_vp_counters_VpNestedPageFaultInterceptsCount: hv_stats_vp_counters = 40; +pub const hv_stats_vp_counters_VpNestedPageFaultInterceptsTime: hv_stats_vp_counters = 41; +pub const hv_stats_vp_counters_VpLogicalProcessorDispatches: hv_stats_vp_counters = 42; +pub const hv_stats_vp_counters_VpWaitingForCpuTime: hv_stats_vp_counters = 43; +pub const hv_stats_vp_counters_VpExtendedHypercalls: hv_stats_vp_counters = 44; +pub const hv_stats_vp_counters_VpExtendedHypercallInterceptMessages: hv_stats_vp_counters = 45; +pub const hv_stats_vp_counters_VpMbecNestedPageTableSwitches: hv_stats_vp_counters = 46; +pub const hv_stats_vp_counters_VpOtherReflectedGuestExceptions: hv_stats_vp_counters = 47; +pub const hv_stats_vp_counters_VpGlobalIoTlbFlushes: hv_stats_vp_counters = 48; +pub const hv_stats_vp_counters_VpGlobalIoTlbFlushCost: hv_stats_vp_counters = 49; +pub const hv_stats_vp_counters_VpLocalIoTlbFlushes: hv_stats_vp_counters = 50; +pub const hv_stats_vp_counters_VpLocalIoTlbFlushCost: hv_stats_vp_counters = 51; +pub const hv_stats_vp_counters_VpFlushGuestPhysicalAddressSpaceHypercalls: hv_stats_vp_counters = + 52; +pub const hv_stats_vp_counters_VpFlushGuestPhysicalAddressListHypercalls: hv_stats_vp_counters = 53; +pub const hv_stats_vp_counters_VpPostedInterruptNotifications: hv_stats_vp_counters = 54; +pub const hv_stats_vp_counters_VpPostedInterruptScans: hv_stats_vp_counters = 55; +pub const hv_stats_vp_counters_VpTotalCoreRunTime: hv_stats_vp_counters = 56; +pub const hv_stats_vp_counters_VpMaximumRunTime: hv_stats_vp_counters = 57; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket0: hv_stats_vp_counters = 58; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket1: hv_stats_vp_counters = 59; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket2: hv_stats_vp_counters = 60; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket3: hv_stats_vp_counters = 61; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket4: hv_stats_vp_counters = 62; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket5: hv_stats_vp_counters = 63; +pub const hv_stats_vp_counters_VpWaitingForCpuTimeBucket6: hv_stats_vp_counters = 64; +pub const hv_stats_vp_counters_VpHwpRequestContextSwitches: hv_stats_vp_counters = 65; +pub const hv_stats_vp_counters_VpPlaceholder2: hv_stats_vp_counters = 66; +pub const hv_stats_vp_counters_VpPlaceholder3: hv_stats_vp_counters = 67; +pub const hv_stats_vp_counters_VpPlaceholder4: hv_stats_vp_counters = 68; +pub const hv_stats_vp_counters_VpPlaceholder5: hv_stats_vp_counters = 69; +pub const hv_stats_vp_counters_VpPlaceholder6: hv_stats_vp_counters = 70; +pub const hv_stats_vp_counters_VpPlaceholder7: hv_stats_vp_counters = 71; +pub const hv_stats_vp_counters_VpPlaceholder8: hv_stats_vp_counters = 72; +pub const hv_stats_vp_counters_VpContentionTime: hv_stats_vp_counters = 73; +pub const hv_stats_vp_counters_VpWakeUpTime: hv_stats_vp_counters = 74; +pub const hv_stats_vp_counters_VpSchedulingPriority: hv_stats_vp_counters = 75; +pub const hv_stats_vp_counters_VpVtl1DispatchCount: hv_stats_vp_counters = 76; +pub const hv_stats_vp_counters_VpVtl2DispatchCount: hv_stats_vp_counters = 77; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket0: hv_stats_vp_counters = 78; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket1: hv_stats_vp_counters = 79; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket2: hv_stats_vp_counters = 80; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket3: hv_stats_vp_counters = 81; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket4: hv_stats_vp_counters = 82; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket5: hv_stats_vp_counters = 83; +pub const hv_stats_vp_counters_VpVtl2DispatchBucket6: hv_stats_vp_counters = 84; +pub const hv_stats_vp_counters_VpVtl1RunTime: hv_stats_vp_counters = 85; +pub const hv_stats_vp_counters_VpVtl2RunTime: hv_stats_vp_counters = 86; +pub const hv_stats_vp_counters_VpIommuHypercalls: hv_stats_vp_counters = 87; +pub const hv_stats_vp_counters_VpCpuGroupHypercalls: hv_stats_vp_counters = 88; +pub const hv_stats_vp_counters_VpVsmHypercalls: hv_stats_vp_counters = 89; +pub const hv_stats_vp_counters_VpEventLogHypercalls: hv_stats_vp_counters = 90; +pub const hv_stats_vp_counters_VpDeviceDomainHypercalls: hv_stats_vp_counters = 91; +pub const hv_stats_vp_counters_VpDepositHypercalls: hv_stats_vp_counters = 92; +pub const hv_stats_vp_counters_VpSvmHypercalls: hv_stats_vp_counters = 93; +pub const hv_stats_vp_counters_VpRootDispatchThreadBlocked: hv_stats_vp_counters = 94; +pub const hv_stats_vp_counters_VpStatsMaxCounter: hv_stats_vp_counters = 95; +pub type hv_stats_vp_counters = ::std::os::raw::c_uint; +pub const hv_stats_lp_counters_LpGlobalTime: hv_stats_lp_counters = 1; +pub const hv_stats_lp_counters_LpTotalRunTime: hv_stats_lp_counters = 2; +pub const hv_stats_lp_counters_LpHypervisorRunTime: hv_stats_lp_counters = 3; +pub const hv_stats_lp_counters_LpHardwareInterrupts: hv_stats_lp_counters = 4; +pub const hv_stats_lp_counters_LpContextSwitches: hv_stats_lp_counters = 5; +pub const hv_stats_lp_counters_LpInterProcessorInterrupts: hv_stats_lp_counters = 6; +pub const hv_stats_lp_counters_LpSchedulerInterrupts: hv_stats_lp_counters = 7; +pub const hv_stats_lp_counters_LpTimerInterrupts: hv_stats_lp_counters = 8; +pub const hv_stats_lp_counters_LpInterProcessorInterruptsSent: hv_stats_lp_counters = 9; +pub const hv_stats_lp_counters_LpProcessorHalts: hv_stats_lp_counters = 10; +pub const hv_stats_lp_counters_LpMonitorTransitionCost: hv_stats_lp_counters = 11; +pub const hv_stats_lp_counters_LpContextSwitchTime: hv_stats_lp_counters = 12; +pub const hv_stats_lp_counters_LpC1TransitionsCount: hv_stats_lp_counters = 13; +pub const hv_stats_lp_counters_LpC1RunTime: hv_stats_lp_counters = 14; +pub const hv_stats_lp_counters_LpC2TransitionsCount: hv_stats_lp_counters = 15; +pub const hv_stats_lp_counters_LpC2RunTime: hv_stats_lp_counters = 16; +pub const hv_stats_lp_counters_LpC3TransitionsCount: hv_stats_lp_counters = 17; +pub const hv_stats_lp_counters_LpC3RunTime: hv_stats_lp_counters = 18; +pub const hv_stats_lp_counters_LpRootVpIndex: hv_stats_lp_counters = 19; +pub const hv_stats_lp_counters_LpIdleSequenceNumber: hv_stats_lp_counters = 20; +pub const hv_stats_lp_counters_LpGlobalTscCount: hv_stats_lp_counters = 21; +pub const hv_stats_lp_counters_LpActiveTscCount: hv_stats_lp_counters = 22; +pub const hv_stats_lp_counters_LpIdleAccumulation: hv_stats_lp_counters = 23; +pub const hv_stats_lp_counters_LpReferenceCycleCount0: hv_stats_lp_counters = 24; +pub const hv_stats_lp_counters_LpActualCycleCount0: hv_stats_lp_counters = 25; +pub const hv_stats_lp_counters_LpReferenceCycleCount1: hv_stats_lp_counters = 26; +pub const hv_stats_lp_counters_LpActualCycleCount1: hv_stats_lp_counters = 27; +pub const hv_stats_lp_counters_LpProximityDomainId: hv_stats_lp_counters = 28; +pub const hv_stats_lp_counters_LpPostedInterruptNotifications: hv_stats_lp_counters = 29; +pub const hv_stats_lp_counters_LpBranchPredictorFlushes: hv_stats_lp_counters = 30; +pub const hv_stats_lp_counters_LpCounterRefreshSequenceNumber: hv_stats_lp_counters = 31; +pub const hv_stats_lp_counters_LpCounterRefreshReferenceTime: hv_stats_lp_counters = 32; +pub const hv_stats_lp_counters_LpIdleAccumulationSnapshot: hv_stats_lp_counters = 33; +pub const hv_stats_lp_counters_LpActiveTscCountSnapshot: hv_stats_lp_counters = 34; +pub const hv_stats_lp_counters_LpHwpRequestContextSwitches: hv_stats_lp_counters = 35; +pub const hv_stats_lp_counters_LpPlaceholder2: hv_stats_lp_counters = 36; +pub const hv_stats_lp_counters_LpPlaceholder3: hv_stats_lp_counters = 37; +pub const hv_stats_lp_counters_LpPlaceholder4: hv_stats_lp_counters = 38; +pub const hv_stats_lp_counters_LpPlaceholder5: hv_stats_lp_counters = 39; +pub const hv_stats_lp_counters_LpPlaceholder6: hv_stats_lp_counters = 40; +pub const hv_stats_lp_counters_LpPlaceholder7: hv_stats_lp_counters = 41; +pub const hv_stats_lp_counters_LpPlaceholder8: hv_stats_lp_counters = 42; +pub const hv_stats_lp_counters_LpPlaceholder9: hv_stats_lp_counters = 43; +pub const hv_stats_lp_counters_LpSchLocalRunListSize: hv_stats_lp_counters = 44; +pub const hv_stats_lp_counters_LpReserveGroupId: hv_stats_lp_counters = 45; +pub const hv_stats_lp_counters_LpRunningPriority: hv_stats_lp_counters = 46; +pub const hv_stats_lp_counters_LpStatsMaxCounter: hv_stats_lp_counters = 47; +pub type hv_stats_lp_counters = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_stats_page { + pub __bindgen_anon_1: hv_stats_page__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_stats_page__bindgen_ty_1 { + pub hv_cntrs: [__u64; 13usize], + pub pt_cntrs: [__u64; 28usize], + pub vp_cntrs: [__u64; 95usize], + pub lp_cntrs: [__u64; 47usize], + pub data: [__u8; 4096usize], +} +#[test] +fn bindgen_test_layout_hv_stats_page__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4096usize, + concat!("Size of: ", stringify!(hv_stats_page__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_stats_page__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_cntrs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_page__bindgen_ty_1), + "::", + stringify!(hv_cntrs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pt_cntrs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_page__bindgen_ty_1), + "::", + stringify!(pt_cntrs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_cntrs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_page__bindgen_ty_1), + "::", + stringify!(vp_cntrs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).lp_cntrs) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_page__bindgen_ty_1), + "::", + stringify!(lp_cntrs) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stats_page__bindgen_ty_1), + "::", + stringify!(data) + ) + ); +} +impl Default for hv_stats_page__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_stats_page() { + assert_eq!( + ::std::mem::size_of::(), + 4096usize, + concat!("Size of: ", stringify!(hv_stats_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_stats_page)) + ); +} +impl Default for hv_stats_page { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_vp_register_page_interrupt_vectors { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_vp_register_page_interrupt_vectors__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_vp_register_page_interrupt_vectors__bindgen_ty_1 { + pub vector_count: __u8, + pub vector: [__u8; 7usize], +} +#[test] +fn bindgen_test_layout_hv_vp_register_page_interrupt_vectors__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_vp_register_page_interrupt_vectors__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_vp_register_page_interrupt_vectors__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector_count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page_interrupt_vectors__bindgen_ty_1), + "::", + stringify!(vector_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page_interrupt_vectors__bindgen_ty_1), + "::", + stringify!(vector) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_vp_register_page_interrupt_vectors() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_vp_register_page_interrupt_vectors) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_vp_register_page_interrupt_vectors) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page_interrupt_vectors), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_vp_register_page_interrupt_vectors { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_vp_register_page { + pub version: __u16, + pub isvalid: __u8, + pub rsvdz: __u8, + pub dirty: __u32, +} +#[test] +fn bindgen_test_layout_hv_vp_register_page() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_vp_register_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_vp_register_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page), + "::", + stringify!(version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isvalid) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page), + "::", + stringify!(isvalid) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 3usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page), + "::", + stringify!(rsvdz) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dirty) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_register_page), + "::", + stringify!(dirty) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_partition_processor_features { + pub as_uint64: [__u64; 1usize], + pub __bindgen_anon_1: hv_partition_processor_features__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_processor_features__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_partition_processor_features__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_processor_features__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_processor_features__bindgen_ty_1) + ) + ); +} +impl hv_partition_processor_features__bindgen_ty_1 { + #[inline] + pub fn asid16(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_asid16(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn tgran16(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_tgran16(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn tgran64(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_tgran64(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn haf(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_haf(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn hdbs(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_hdbs(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn pan(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_pan(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn ats1e1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_ats1e1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn uao(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_uao(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn el0aarch32(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_el0aarch32(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn fp(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_fp(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn fphp(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_fphp(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn advsimd(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_advsimd(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn advsimdhp(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_advsimdhp(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn gicv3v4(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_gicv3v4(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn gicv41(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_gicv41(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn ras(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u64) } + } + #[inline] + pub fn set_ras(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn pmuv3(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u64) } + } + #[inline] + pub fn set_pmuv3(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn pmuv3armv81(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_pmuv3armv81(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn pmuv3armv84(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_pmuv3armv84(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn pmuv3armv85(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_pmuv3armv85(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn aes(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_aes(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn polymul(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_polymul(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub fn sha1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_sha1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub fn sha256(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_sha256(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub fn sha512(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_sha512(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub fn crc32(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_crc32(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub fn atomic(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_atomic(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub fn rdm(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_rdm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub fn sha3(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_sha3(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub fn sm3(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_sm3(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub fn sm4(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_sm4(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub fn dp(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_dp(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub fn fhm(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_fhm(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub fn dccvap(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_dccvap(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub fn dccvadp(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 1u8) as u64) } + } + #[inline] + pub fn set_dccvadp(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(34usize, 1u8, val as u64) + } + } + #[inline] + pub fn apabase(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(35usize, 1u8) as u64) } + } + #[inline] + pub fn set_apabase(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(35usize, 1u8, val as u64) + } + } + #[inline] + pub fn apaep(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(36usize, 1u8) as u64) } + } + #[inline] + pub fn set_apaep(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(36usize, 1u8, val as u64) + } + } + #[inline] + pub fn apaep2(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(37usize, 1u8) as u64) } + } + #[inline] + pub fn set_apaep2(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(37usize, 1u8, val as u64) + } + } + #[inline] + pub fn apaep2fp(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(38usize, 1u8) as u64) } + } + #[inline] + pub fn set_apaep2fp(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(38usize, 1u8, val as u64) + } + } + #[inline] + pub fn apaep2fpc(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(39usize, 1u8) as u64) } + } + #[inline] + pub fn set_apaep2fpc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(39usize, 1u8, val as u64) + } + } + #[inline] + pub fn jscvt(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 1u8) as u64) } + } + #[inline] + pub fn set_jscvt(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(40usize, 1u8, val as u64) + } + } + #[inline] + pub fn fcma(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(41usize, 1u8) as u64) } + } + #[inline] + pub fn set_fcma(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(41usize, 1u8, val as u64) + } + } + #[inline] + pub fn rcpcv83(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(42usize, 1u8) as u64) } + } + #[inline] + pub fn set_rcpcv83(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(42usize, 1u8, val as u64) + } + } + #[inline] + pub fn rcpcv84(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(43usize, 1u8) as u64) } + } + #[inline] + pub fn set_rcpcv84(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(43usize, 1u8, val as u64) + } + } + #[inline] + pub fn gpa(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(44usize, 1u8) as u64) } + } + #[inline] + pub fn set_gpa(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(44usize, 1u8, val as u64) + } + } + #[inline] + pub fn l1ippipt(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(45usize, 1u8) as u64) } + } + #[inline] + pub fn set_l1ippipt(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(45usize, 1u8, val as u64) + } + } + #[inline] + pub fn dzpermitted(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(46usize, 1u8) as u64) } + } + #[inline] + pub fn set_dzpermitted(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(46usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(47usize, 17u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(47usize, 17u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + asid16: __u64, + tgran16: __u64, + tgran64: __u64, + haf: __u64, + hdbs: __u64, + pan: __u64, + ats1e1: __u64, + uao: __u64, + el0aarch32: __u64, + fp: __u64, + fphp: __u64, + advsimd: __u64, + advsimdhp: __u64, + gicv3v4: __u64, + gicv41: __u64, + ras: __u64, + pmuv3: __u64, + pmuv3armv81: __u64, + pmuv3armv84: __u64, + pmuv3armv85: __u64, + aes: __u64, + polymul: __u64, + sha1: __u64, + sha256: __u64, + sha512: __u64, + crc32: __u64, + atomic: __u64, + rdm: __u64, + sha3: __u64, + sm3: __u64, + sm4: __u64, + dp: __u64, + fhm: __u64, + dccvap: __u64, + dccvadp: __u64, + apabase: __u64, + apaep: __u64, + apaep2: __u64, + apaep2fp: __u64, + apaep2fpc: __u64, + jscvt: __u64, + fcma: __u64, + rcpcv83: __u64, + rcpcv84: __u64, + gpa: __u64, + l1ippipt: __u64, + dzpermitted: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let asid16: u64 = unsafe { ::std::mem::transmute(asid16) }; + asid16 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let tgran16: u64 = unsafe { ::std::mem::transmute(tgran16) }; + tgran16 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let tgran64: u64 = unsafe { ::std::mem::transmute(tgran64) }; + tgran64 as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let haf: u64 = unsafe { ::std::mem::transmute(haf) }; + haf as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let hdbs: u64 = unsafe { ::std::mem::transmute(hdbs) }; + hdbs as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let pan: u64 = unsafe { ::std::mem::transmute(pan) }; + pan as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let ats1e1: u64 = unsafe { ::std::mem::transmute(ats1e1) }; + ats1e1 as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let uao: u64 = unsafe { ::std::mem::transmute(uao) }; + uao as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let el0aarch32: u64 = unsafe { ::std::mem::transmute(el0aarch32) }; + el0aarch32 as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let fp: u64 = unsafe { ::std::mem::transmute(fp) }; + fp as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let fphp: u64 = unsafe { ::std::mem::transmute(fphp) }; + fphp as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let advsimd: u64 = unsafe { ::std::mem::transmute(advsimd) }; + advsimd as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let advsimdhp: u64 = unsafe { ::std::mem::transmute(advsimdhp) }; + advsimdhp as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let gicv3v4: u64 = unsafe { ::std::mem::transmute(gicv3v4) }; + gicv3v4 as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let gicv41: u64 = unsafe { ::std::mem::transmute(gicv41) }; + gicv41 as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let ras: u64 = unsafe { ::std::mem::transmute(ras) }; + ras as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let pmuv3: u64 = unsafe { ::std::mem::transmute(pmuv3) }; + pmuv3 as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let pmuv3armv81: u64 = unsafe { ::std::mem::transmute(pmuv3armv81) }; + pmuv3armv81 as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let pmuv3armv84: u64 = unsafe { ::std::mem::transmute(pmuv3armv84) }; + pmuv3armv84 as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let pmuv3armv85: u64 = unsafe { ::std::mem::transmute(pmuv3armv85) }; + pmuv3armv85 as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let aes: u64 = unsafe { ::std::mem::transmute(aes) }; + aes as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let polymul: u64 = unsafe { ::std::mem::transmute(polymul) }; + polymul as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let sha1: u64 = unsafe { ::std::mem::transmute(sha1) }; + sha1 as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let sha256: u64 = unsafe { ::std::mem::transmute(sha256) }; + sha256 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let sha512: u64 = unsafe { ::std::mem::transmute(sha512) }; + sha512 as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let crc32: u64 = unsafe { ::std::mem::transmute(crc32) }; + crc32 as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let atomic: u64 = unsafe { ::std::mem::transmute(atomic) }; + atomic as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let rdm: u64 = unsafe { ::std::mem::transmute(rdm) }; + rdm as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let sha3: u64 = unsafe { ::std::mem::transmute(sha3) }; + sha3 as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let sm3: u64 = unsafe { ::std::mem::transmute(sm3) }; + sm3 as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let sm4: u64 = unsafe { ::std::mem::transmute(sm4) }; + sm4 as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let dp: u64 = unsafe { ::std::mem::transmute(dp) }; + dp as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let fhm: u64 = unsafe { ::std::mem::transmute(fhm) }; + fhm as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let dccvap: u64 = unsafe { ::std::mem::transmute(dccvap) }; + dccvap as u64 + }); + __bindgen_bitfield_unit.set(34usize, 1u8, { + let dccvadp: u64 = unsafe { ::std::mem::transmute(dccvadp) }; + dccvadp as u64 + }); + __bindgen_bitfield_unit.set(35usize, 1u8, { + let apabase: u64 = unsafe { ::std::mem::transmute(apabase) }; + apabase as u64 + }); + __bindgen_bitfield_unit.set(36usize, 1u8, { + let apaep: u64 = unsafe { ::std::mem::transmute(apaep) }; + apaep as u64 + }); + __bindgen_bitfield_unit.set(37usize, 1u8, { + let apaep2: u64 = unsafe { ::std::mem::transmute(apaep2) }; + apaep2 as u64 + }); + __bindgen_bitfield_unit.set(38usize, 1u8, { + let apaep2fp: u64 = unsafe { ::std::mem::transmute(apaep2fp) }; + apaep2fp as u64 + }); + __bindgen_bitfield_unit.set(39usize, 1u8, { + let apaep2fpc: u64 = unsafe { ::std::mem::transmute(apaep2fpc) }; + apaep2fpc as u64 + }); + __bindgen_bitfield_unit.set(40usize, 1u8, { + let jscvt: u64 = unsafe { ::std::mem::transmute(jscvt) }; + jscvt as u64 + }); + __bindgen_bitfield_unit.set(41usize, 1u8, { + let fcma: u64 = unsafe { ::std::mem::transmute(fcma) }; + fcma as u64 + }); + __bindgen_bitfield_unit.set(42usize, 1u8, { + let rcpcv83: u64 = unsafe { ::std::mem::transmute(rcpcv83) }; + rcpcv83 as u64 + }); + __bindgen_bitfield_unit.set(43usize, 1u8, { + let rcpcv84: u64 = unsafe { ::std::mem::transmute(rcpcv84) }; + rcpcv84 as u64 + }); + __bindgen_bitfield_unit.set(44usize, 1u8, { + let gpa: u64 = unsafe { ::std::mem::transmute(gpa) }; + gpa as u64 + }); + __bindgen_bitfield_unit.set(45usize, 1u8, { + let l1ippipt: u64 = unsafe { ::std::mem::transmute(l1ippipt) }; + l1ippipt as u64 + }); + __bindgen_bitfield_unit.set(46usize, 1u8, { + let dzpermitted: u64 = unsafe { ::std::mem::transmute(dzpermitted) }; + dzpermitted as u64 + }); + __bindgen_bitfield_unit.set(47usize, 17u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_partition_processor_features() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_partition_processor_features)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_partition_processor_features)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_processor_features), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_partition_processor_features { + 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 union hv_partition_processor_xsave_features { + pub __bindgen_anon_1: hv_partition_processor_xsave_features__bindgen_ty_1, + pub as_uint64: __u64, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_processor_xsave_features__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_partition_processor_xsave_features__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_processor_xsave_features__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_processor_xsave_features__bindgen_ty_1) + ) + ); +} +impl hv_partition_processor_xsave_features__bindgen_ty_1 { + #[inline] + pub fn xsave_support(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_xsave_support(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn xsaveopt_support(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_xsaveopt_support(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn avx_support(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_avx_support(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 61u8) as u64) } + } + #[inline] + pub fn set_reserved1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 61u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + xsave_support: __u64, + xsaveopt_support: __u64, + avx_support: __u64, + reserved1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let xsave_support: u64 = unsafe { ::std::mem::transmute(xsave_support) }; + xsave_support as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let xsaveopt_support: u64 = unsafe { ::std::mem::transmute(xsaveopt_support) }; + xsaveopt_support as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let avx_support: u64 = unsafe { ::std::mem::transmute(avx_support) }; + avx_support as u64 + }); + __bindgen_bitfield_unit.set(3usize, 61u8, { + let reserved1: u64 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_partition_processor_xsave_features() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_processor_xsave_features) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_partition_processor_xsave_features) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_processor_xsave_features), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_partition_processor_xsave_features { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_partition_creation_properties { + pub disabled_processor_features: hv_partition_processor_features, +} +#[test] +fn bindgen_test_layout_hv_partition_creation_properties() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_partition_creation_properties)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_creation_properties) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).disabled_processor_features) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_creation_properties), + "::", + stringify!(disabled_processor_features) + ) + ); +} +impl Default for hv_partition_creation_properties { + 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 hv_partition_isolation_state_HV_PARTITION_ISOLATION_INVALID: + hv_partition_isolation_state = 0; +pub const hv_partition_isolation_state_HV_PARTITION_ISOLATION_INSECURE_CLEAN: + hv_partition_isolation_state = 1; +pub const hv_partition_isolation_state_HV_PARTITION_ISOLATION_INSECURE_DIRTY: + hv_partition_isolation_state = 2; +pub const hv_partition_isolation_state_HV_PARTITION_ISOLATION_SECURE: hv_partition_isolation_state = + 3; +pub const hv_partition_isolation_state_HV_PARTITION_ISOLATION_SECURE_DIRTY: + hv_partition_isolation_state = 4; +pub const hv_partition_isolation_state_HV_PARTITION_ISOLATION_SECURE_TERMINATING: + hv_partition_isolation_state = 5; +pub type hv_partition_isolation_state = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_partition_isolation_control { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_partition_isolation_control__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_isolation_control__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_partition_isolation_control__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_isolation_control__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_isolation_control__bindgen_ty_1) + ) + ); +} +impl hv_partition_isolation_control__bindgen_ty_1 { + #[inline] + pub fn runnable(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_runnable(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } + } + #[inline] + pub fn set_reserved_z(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 63u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + runnable: __u64, + reserved_z: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let runnable: u64 = unsafe { ::std::mem::transmute(runnable) }; + runnable as u64 + }); + __bindgen_bitfield_unit.set(1usize, 63u8, { + let reserved_z: u64 = unsafe { ::std::mem::transmute(reserved_z) }; + reserved_z as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_partition_isolation_control() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_partition_isolation_control)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_partition_isolation_control)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_isolation_control), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_partition_isolation_control { + 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 union hv_partition_synthetic_processor_features { + pub as_uint64: [__u64; 1usize], + pub __bindgen_anon_1: hv_partition_synthetic_processor_features__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_synthetic_processor_features__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_partition_synthetic_processor_features__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_synthetic_processor_features__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_synthetic_processor_features__bindgen_ty_1) + ) + ); +} +impl hv_partition_synthetic_processor_features__bindgen_ty_1 { + #[inline] + pub fn reserved_z0(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_vp_run_time_reg(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_vp_run_time_reg(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_partition_reference_counter(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_partition_reference_counter(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_synic_regs(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_synic_regs(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_synthetic_timer_regs(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_synthetic_timer_regs(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_intr_ctrl_regs(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_intr_ctrl_regs(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_hypercall_regs(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_hypercall_regs(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_vp_index(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_vp_index(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_partition_reference_tsc(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_partition_reference_tsc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z10(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z10(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(10usize, 1u8, val as u64) + } + } + #[inline] + pub fn access_frequency_regs(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u64) } + } + #[inline] + pub fn set_access_frequency_regs(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(11usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z12(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z12(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z13(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z13(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(13usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z14(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z14(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(14usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z15(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z15(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(15usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z16(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z16(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z17(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(17usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z17(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(17usize, 1u8, val as u64) + } + } + #[inline] + pub fn fast_hypercall_output(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(18usize, 1u8) as u64) } + } + #[inline] + pub fn set_fast_hypercall_output(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(18usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z19(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(19usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z19(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(19usize, 1u8, val as u64) + } + } + #[inline] + pub fn start_virtual_processor(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(20usize, 1u8) as u64) } + } + #[inline] + pub fn set_start_virtual_processor(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(20usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z21(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(21usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z21(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(21usize, 1u8, val as u64) + } + } + #[inline] + pub fn direct_synthetic_timers(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 1u8) as u64) } + } + #[inline] + pub fn set_direct_synthetic_timers(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z23(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(23usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z23(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(23usize, 1u8, val as u64) + } + } + #[inline] + pub fn extended_processor_masks(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u64) } + } + #[inline] + pub fn set_extended_processor_masks(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 1u8, val as u64) + } + } + #[inline] + pub fn tb_flush_hypercalls(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u64) } + } + #[inline] + pub fn set_tb_flush_hypercalls(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(25usize, 1u8, val as u64) + } + } + #[inline] + pub fn synthetic_cluster_ipi(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(26usize, 1u8) as u64) } + } + #[inline] + pub fn set_synthetic_cluster_ipi(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(26usize, 1u8, val as u64) + } + } + #[inline] + pub fn notify_long_spin_wait(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(27usize, 1u8) as u64) } + } + #[inline] + pub fn set_notify_long_spin_wait(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(27usize, 1u8, val as u64) + } + } + #[inline] + pub fn query_numa_distance(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 1u8) as u64) } + } + #[inline] + pub fn set_query_numa_distance(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 1u8, val as u64) + } + } + #[inline] + pub fn signal_events(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(29usize, 1u8) as u64) } + } + #[inline] + pub fn set_signal_events(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(29usize, 1u8, val as u64) + } + } + #[inline] + pub fn retarget_device_interrupt(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(30usize, 1u8) as u64) } + } + #[inline] + pub fn set_retarget_device_interrupt(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(30usize, 1u8, val as u64) + } + } + #[inline] + pub fn restore_time(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(31usize, 1u8) as u64) } + } + #[inline] + pub fn set_restore_time(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(31usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved_z32(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_reserved_z32(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 31u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(33usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + reserved_z0: __u64, + reserved_z1: __u64, + access_vp_run_time_reg: __u64, + access_partition_reference_counter: __u64, + access_synic_regs: __u64, + access_synthetic_timer_regs: __u64, + access_intr_ctrl_regs: __u64, + access_hypercall_regs: __u64, + access_vp_index: __u64, + access_partition_reference_tsc: __u64, + reserved_z10: __u64, + access_frequency_regs: __u64, + reserved_z12: __u64, + reserved_z13: __u64, + reserved_z14: __u64, + reserved_z15: __u64, + reserved_z16: __u64, + reserved_z17: __u64, + fast_hypercall_output: __u64, + reserved_z19: __u64, + start_virtual_processor: __u64, + reserved_z21: __u64, + direct_synthetic_timers: __u64, + reserved_z23: __u64, + extended_processor_masks: __u64, + tb_flush_hypercalls: __u64, + synthetic_cluster_ipi: __u64, + notify_long_spin_wait: __u64, + query_numa_distance: __u64, + signal_events: __u64, + retarget_device_interrupt: __u64, + restore_time: __u64, + reserved_z32: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let reserved_z0: u64 = unsafe { ::std::mem::transmute(reserved_z0) }; + reserved_z0 as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let reserved_z1: u64 = unsafe { ::std::mem::transmute(reserved_z1) }; + reserved_z1 as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let access_vp_run_time_reg: u64 = + unsafe { ::std::mem::transmute(access_vp_run_time_reg) }; + access_vp_run_time_reg as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let access_partition_reference_counter: u64 = + unsafe { ::std::mem::transmute(access_partition_reference_counter) }; + access_partition_reference_counter as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let access_synic_regs: u64 = unsafe { ::std::mem::transmute(access_synic_regs) }; + access_synic_regs as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let access_synthetic_timer_regs: u64 = + unsafe { ::std::mem::transmute(access_synthetic_timer_regs) }; + access_synthetic_timer_regs as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let access_intr_ctrl_regs: u64 = + unsafe { ::std::mem::transmute(access_intr_ctrl_regs) }; + access_intr_ctrl_regs as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let access_hypercall_regs: u64 = + unsafe { ::std::mem::transmute(access_hypercall_regs) }; + access_hypercall_regs as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let access_vp_index: u64 = unsafe { ::std::mem::transmute(access_vp_index) }; + access_vp_index as u64 + }); + __bindgen_bitfield_unit.set(9usize, 1u8, { + let access_partition_reference_tsc: u64 = + unsafe { ::std::mem::transmute(access_partition_reference_tsc) }; + access_partition_reference_tsc as u64 + }); + __bindgen_bitfield_unit.set(10usize, 1u8, { + let reserved_z10: u64 = unsafe { ::std::mem::transmute(reserved_z10) }; + reserved_z10 as u64 + }); + __bindgen_bitfield_unit.set(11usize, 1u8, { + let access_frequency_regs: u64 = + unsafe { ::std::mem::transmute(access_frequency_regs) }; + access_frequency_regs as u64 + }); + __bindgen_bitfield_unit.set(12usize, 1u8, { + let reserved_z12: u64 = unsafe { ::std::mem::transmute(reserved_z12) }; + reserved_z12 as u64 + }); + __bindgen_bitfield_unit.set(13usize, 1u8, { + let reserved_z13: u64 = unsafe { ::std::mem::transmute(reserved_z13) }; + reserved_z13 as u64 + }); + __bindgen_bitfield_unit.set(14usize, 1u8, { + let reserved_z14: u64 = unsafe { ::std::mem::transmute(reserved_z14) }; + reserved_z14 as u64 + }); + __bindgen_bitfield_unit.set(15usize, 1u8, { + let reserved_z15: u64 = unsafe { ::std::mem::transmute(reserved_z15) }; + reserved_z15 as u64 + }); + __bindgen_bitfield_unit.set(16usize, 1u8, { + let reserved_z16: u64 = unsafe { ::std::mem::transmute(reserved_z16) }; + reserved_z16 as u64 + }); + __bindgen_bitfield_unit.set(17usize, 1u8, { + let reserved_z17: u64 = unsafe { ::std::mem::transmute(reserved_z17) }; + reserved_z17 as u64 + }); + __bindgen_bitfield_unit.set(18usize, 1u8, { + let fast_hypercall_output: u64 = + unsafe { ::std::mem::transmute(fast_hypercall_output) }; + fast_hypercall_output as u64 + }); + __bindgen_bitfield_unit.set(19usize, 1u8, { + let reserved_z19: u64 = unsafe { ::std::mem::transmute(reserved_z19) }; + reserved_z19 as u64 + }); + __bindgen_bitfield_unit.set(20usize, 1u8, { + let start_virtual_processor: u64 = + unsafe { ::std::mem::transmute(start_virtual_processor) }; + start_virtual_processor as u64 + }); + __bindgen_bitfield_unit.set(21usize, 1u8, { + let reserved_z21: u64 = unsafe { ::std::mem::transmute(reserved_z21) }; + reserved_z21 as u64 + }); + __bindgen_bitfield_unit.set(22usize, 1u8, { + let direct_synthetic_timers: u64 = + unsafe { ::std::mem::transmute(direct_synthetic_timers) }; + direct_synthetic_timers as u64 + }); + __bindgen_bitfield_unit.set(23usize, 1u8, { + let reserved_z23: u64 = unsafe { ::std::mem::transmute(reserved_z23) }; + reserved_z23 as u64 + }); + __bindgen_bitfield_unit.set(24usize, 1u8, { + let extended_processor_masks: u64 = + unsafe { ::std::mem::transmute(extended_processor_masks) }; + extended_processor_masks as u64 + }); + __bindgen_bitfield_unit.set(25usize, 1u8, { + let tb_flush_hypercalls: u64 = unsafe { ::std::mem::transmute(tb_flush_hypercalls) }; + tb_flush_hypercalls as u64 + }); + __bindgen_bitfield_unit.set(26usize, 1u8, { + let synthetic_cluster_ipi: u64 = + unsafe { ::std::mem::transmute(synthetic_cluster_ipi) }; + synthetic_cluster_ipi as u64 + }); + __bindgen_bitfield_unit.set(27usize, 1u8, { + let notify_long_spin_wait: u64 = + unsafe { ::std::mem::transmute(notify_long_spin_wait) }; + notify_long_spin_wait as u64 + }); + __bindgen_bitfield_unit.set(28usize, 1u8, { + let query_numa_distance: u64 = unsafe { ::std::mem::transmute(query_numa_distance) }; + query_numa_distance as u64 + }); + __bindgen_bitfield_unit.set(29usize, 1u8, { + let signal_events: u64 = unsafe { ::std::mem::transmute(signal_events) }; + signal_events as u64 + }); + __bindgen_bitfield_unit.set(30usize, 1u8, { + let retarget_device_interrupt: u64 = + unsafe { ::std::mem::transmute(retarget_device_interrupt) }; + retarget_device_interrupt as u64 + }); + __bindgen_bitfield_unit.set(31usize, 1u8, { + let restore_time: u64 = unsafe { ::std::mem::transmute(restore_time) }; + restore_time as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let reserved_z32: u64 = unsafe { ::std::mem::transmute(reserved_z32) }; + reserved_z32 as u64 + }); + __bindgen_bitfield_unit.set(33usize, 31u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_partition_synthetic_processor_features() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_synthetic_processor_features) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_partition_synthetic_processor_features) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_synthetic_processor_features), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_partition_synthetic_processor_features { + 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 union hv_partition_isolation_properties { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_partition_isolation_properties__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_partition_isolation_properties__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_partition_isolation_properties__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_partition_isolation_properties__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_partition_isolation_properties__bindgen_ty_1) + ) + ); +} +impl hv_partition_isolation_properties__bindgen_ty_1 { + #[inline] + pub fn isolation_type(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u64) } + } + #[inline] + pub fn set_isolation_type(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 5u8, val as u64) + } + } + #[inline] + pub fn isolation_host_type(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 2u8) as u64) } + } + #[inline] + pub fn set_isolation_host_type(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 2u8, val as u64) + } + } + #[inline] + pub fn rsvd_z(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 5u8) as u64) } + } + #[inline] + pub fn set_rsvd_z(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 5u8, val as u64) + } + } + #[inline] + pub fn shared_gpa_boundary_page_number(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_shared_gpa_boundary_page_number(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + isolation_type: __u64, + isolation_host_type: __u64, + rsvd_z: __u64, + shared_gpa_boundary_page_number: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 5u8, { + let isolation_type: u64 = unsafe { ::std::mem::transmute(isolation_type) }; + isolation_type as u64 + }); + __bindgen_bitfield_unit.set(5usize, 2u8, { + let isolation_host_type: u64 = unsafe { ::std::mem::transmute(isolation_host_type) }; + isolation_host_type as u64 + }); + __bindgen_bitfield_unit.set(7usize, 5u8, { + let rsvd_z: u64 = unsafe { ::std::mem::transmute(rsvd_z) }; + rsvd_z as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let shared_gpa_boundary_page_number: u64 = + unsafe { ::std::mem::transmute(shared_gpa_boundary_page_number) }; + shared_gpa_boundary_page_number as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_partition_isolation_properties() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_partition_isolation_properties)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_partition_isolation_properties) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_partition_isolation_properties), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_partition_isolation_properties { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_create_partition { + pub flags: __u64, + pub proximity_domain_info: hv_proximity_domain_info, + pub compatibility_version: __u32, + pub padding: __u32, + pub partition_creation_properties: hv_partition_creation_properties, + pub isolation_properties: hv_partition_isolation_properties, +} +#[test] +fn bindgen_test_layout_hv_input_create_partition() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(hv_input_create_partition)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_create_partition)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_partition), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).proximity_domain_info) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_partition), + "::", + stringify!(proximity_domain_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).compatibility_version) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_partition), + "::", + stringify!(compatibility_version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_partition), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).partition_creation_properties) as usize - ptr as usize + }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_partition), + "::", + stringify!(partition_creation_properties) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isolation_properties) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_partition), + "::", + stringify!(isolation_properties) + ) + ); +} +impl Default for hv_input_create_partition { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_create_partition { + pub partition_id: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_create_partition() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_create_partition)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_create_partition)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_create_partition), + "::", + stringify!(partition_id) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_initialize_partition { + pub partition_id: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_initialize_partition() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_input_initialize_partition)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_initialize_partition)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_initialize_partition), + "::", + stringify!(partition_id) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_finalize_partition { + pub partition_id: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_finalize_partition() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_input_finalize_partition)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_finalize_partition)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_finalize_partition), + "::", + stringify!(partition_id) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_delete_partition { + pub partition_id: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_delete_partition() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_input_delete_partition)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_delete_partition)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_delete_partition), + "::", + stringify!(partition_id) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_get_partition_property { + pub partition_id: __u64, + pub property_code: __u32, + pub padding: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_get_partition_property() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_get_partition_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_get_partition_property)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_partition_property), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_code) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_partition_property), + "::", + stringify!(property_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_partition_property), + "::", + stringify!(padding) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_get_partition_property { + pub property_value: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_get_partition_property() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_get_partition_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_output_get_partition_property) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_value) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_partition_property), + "::", + stringify!(property_value) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_set_partition_property { + pub partition_id: __u64, + pub property_code: __u32, + pub padding: __u32, + pub property_value: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_set_partition_property() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_set_partition_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_set_partition_property)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_partition_property), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_code) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_partition_property), + "::", + stringify!(property_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_partition_property), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_value) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_set_partition_property), + "::", + stringify!(property_value) + ) + ); +} +pub const hv_vp_state_page_type_HV_VP_STATE_PAGE_REGISTERS: hv_vp_state_page_type = 0; +pub const hv_vp_state_page_type_HV_VP_STATE_PAGE_INTERCEPT_MESSAGE: hv_vp_state_page_type = 1; +pub const hv_vp_state_page_type_HV_VP_STATE_PAGE_COUNT: hv_vp_state_page_type = 2; +pub type hv_vp_state_page_type = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_map_vp_state_page { + pub partition_id: __u64, + pub vp_index: __u32, + pub type_: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_map_vp_state_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_map_vp_state_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_map_vp_state_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_vp_state_page), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_vp_state_page), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_map_vp_state_page), + "::", + stringify!(type_) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_map_vp_state_page { + pub map_location: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_map_vp_state_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_map_vp_state_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_map_vp_state_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).map_location) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_map_vp_state_page), + "::", + stringify!(map_location) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_unmap_vp_state_page { + pub partition_id: __u64, + pub vp_index: __u32, + pub type_: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_unmap_vp_state_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_unmap_vp_state_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_unmap_vp_state_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_vp_state_page), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_vp_state_page), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_unmap_vp_state_page), + "::", + stringify!(type_) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_cpuid_leaf_info { + pub eax: __u32, + pub ecx: __u32, + pub xfem: __u64, + pub xss: __u64, +} +#[test] +fn bindgen_test_layout_hv_cpuid_leaf_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_cpuid_leaf_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_cpuid_leaf_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_cpuid_leaf_info), + "::", + stringify!(eax) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_cpuid_leaf_info), + "::", + stringify!(ecx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xfem) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_cpuid_leaf_info), + "::", + stringify!(xfem) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xss) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_cpuid_leaf_info), + "::", + stringify!(xss) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_get_vp_cpuid_values_flags { + pub as_uint32: __u32, + pub __bindgen_anon_1: hv_get_vp_cpuid_values_flags__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_get_vp_cpuid_values_flags__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_get_vp_cpuid_values_flags__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!( + "Size of: ", + stringify!(hv_get_vp_cpuid_values_flags__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_get_vp_cpuid_values_flags__bindgen_ty_1) + ) + ); +} +impl hv_get_vp_cpuid_values_flags__bindgen_ty_1 { + #[inline] + pub fn use_vp_xfem_xss(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_use_vp_xfem_xss(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn apply_registered_values(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_apply_registered_values(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + use_vp_xfem_xss: __u32, + apply_registered_values: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let use_vp_xfem_xss: u32 = unsafe { ::std::mem::transmute(use_vp_xfem_xss) }; + use_vp_xfem_xss as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let apply_registered_values: u32 = + unsafe { ::std::mem::transmute(apply_registered_values) }; + apply_registered_values as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_get_vp_cpuid_values_flags() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_get_vp_cpuid_values_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_get_vp_cpuid_values_flags)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_get_vp_cpuid_values_flags), + "::", + stringify!(as_uint32) + ) + ); +} +impl Default for hv_get_vp_cpuid_values_flags { + 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, packed)] +pub struct hv_input_get_vp_cpuid_values { + pub partition_id: __u64, + pub vp_index: __u32, + pub flags: hv_get_vp_cpuid_values_flags, + pub reserved: __u32, + pub padding: __u32, + pub cpuid_leaf_info: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_hv_input_get_vp_cpuid_values() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_get_vp_cpuid_values)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_get_vp_cpuid_values)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_cpuid_values), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_cpuid_values), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_cpuid_values), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_cpuid_values), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_cpuid_values), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpuid_leaf_info) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_get_vp_cpuid_values), + "::", + stringify!(cpuid_leaf_info) + ) + ); +} +impl Default for hv_input_get_vp_cpuid_values { + 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 union hv_output_get_vp_cpuid_values { + pub as_uint32: [__u32; 4usize], + pub __bindgen_anon_1: hv_output_get_vp_cpuid_values__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_get_vp_cpuid_values__bindgen_ty_1 { + pub eax: __u32, + pub ebx: __u32, + pub ecx: __u32, + pub edx: __u32, +} +#[test] +fn bindgen_test_layout_hv_output_get_vp_cpuid_values__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1), + "::", + stringify!(eax) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1), + "::", + stringify!(ebx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1), + "::", + stringify!(ecx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1), + "::", + stringify!(edx) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_output_get_vp_cpuid_values() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_output_get_vp_cpuid_values)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(hv_output_get_vp_cpuid_values)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint32) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_get_vp_cpuid_values), + "::", + stringify!(as_uint32) + ) + ); +} +impl Default for hv_output_get_vp_cpuid_values { + 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 hv_translate_gva_result_code_HV_TRANSLATE_GVA_SUCCESS: hv_translate_gva_result_code = 0; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_PAGE_NOT_PRESENT: + hv_translate_gva_result_code = 1; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_PRIVILEGE_VIOLATION: + hv_translate_gva_result_code = 2; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_INVALIDE_PAGE_TABLE_FLAGS: + hv_translate_gva_result_code = 3; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_GPA_UNMAPPED: hv_translate_gva_result_code = + 4; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_GPA_NO_READ_ACCESS: + hv_translate_gva_result_code = 5; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_GPA_NO_WRITE_ACCESS: + hv_translate_gva_result_code = 6; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_GPA_ILLEGAL_OVERLAY_ACCESS: + hv_translate_gva_result_code = 7; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_INTERCEPT: hv_translate_gva_result_code = 8; +pub const hv_translate_gva_result_code_HV_TRANSLATE_GVA_GPA_UNACCEPTED: + hv_translate_gva_result_code = 9; +pub type hv_translate_gva_result_code = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_translate_gva_result { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_translate_gva_result__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_translate_gva_result__bindgen_ty_1 { + pub result_code: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_translate_gva_result__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_translate_gva_result__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_translate_gva_result__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result_code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_translate_gva_result__bindgen_ty_1), + "::", + stringify!(result_code) + ) + ); +} +impl hv_translate_gva_result__bindgen_ty_1 { + #[inline] + pub fn cache_type(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) } + } + #[inline] + pub fn set_cache_type(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub fn overlay_page(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) } + } + #[inline] + pub fn set_overlay_page(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 23u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(9usize, 23u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + cache_type: __u32, + overlay_page: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let cache_type: u32 = unsafe { ::std::mem::transmute(cache_type) }; + cache_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 1u8, { + let overlay_page: u32 = unsafe { ::std::mem::transmute(overlay_page) }; + overlay_page as u64 + }); + __bindgen_bitfield_unit.set(9usize, 23u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_translate_gva_result() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_translate_gva_result)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_translate_gva_result)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_translate_gva_result), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_translate_gva_result { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_x64_apic_eoi_message { + pub vp_index: __u32, + pub interrupt_vector: __u32, +} +#[test] +fn bindgen_test_layout_hv_x64_apic_eoi_message() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_x64_apic_eoi_message)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_x64_apic_eoi_message)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_apic_eoi_message), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interrupt_vector) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_x64_apic_eoi_message), + "::", + stringify!(interrupt_vector) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_opaque_intercept_message { + pub vp_index: __u32, +} +#[test] +fn bindgen_test_layout_hv_opaque_intercept_message() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_opaque_intercept_message)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_opaque_intercept_message)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_opaque_intercept_message), + "::", + stringify!(vp_index) + ) + ); +} +pub const hv_port_type_HV_PORT_TYPE_MESSAGE: hv_port_type = 1; +pub const hv_port_type_HV_PORT_TYPE_EVENT: hv_port_type = 2; +pub const hv_port_type_HV_PORT_TYPE_MONITOR: hv_port_type = 3; +pub const hv_port_type_HV_PORT_TYPE_DOORBELL: hv_port_type = 4; +pub type hv_port_type = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_port_info { + pub port_type: __u32, + pub padding: __u32, + pub __bindgen_anon_1: hv_port_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_port_info__bindgen_ty_1 { + pub message_port_info: hv_port_info__bindgen_ty_1__bindgen_ty_1, + pub event_port_info: hv_port_info__bindgen_ty_1__bindgen_ty_2, + pub monitor_port_info: hv_port_info__bindgen_ty_1__bindgen_ty_3, + pub doorbell_port_info: hv_port_info__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_port_info__bindgen_ty_1__bindgen_ty_1 { + pub target_sint: __u32, + pub target_vp: __u32, + pub rsvdz: __u64, +} +#[test] +fn bindgen_test_layout_hv_port_info__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_sint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(target_sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vp) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(target_vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(rsvdz) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_port_info__bindgen_ty_1__bindgen_ty_2 { + pub target_sint: __u32, + pub target_vp: __u32, + pub base_flag_number: __u16, + pub flag_count: __u16, + pub rsvdz: __u32, +} +#[test] +fn bindgen_test_layout_hv_port_info__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_sint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(target_sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vp) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(target_vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_flag_number) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(base_flag_number) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flag_count) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(flag_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(rsvdz) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_port_info__bindgen_ty_1__bindgen_ty_3 { + pub monitor_address: __u64, + pub rsvdz: __u64, +} +#[test] +fn bindgen_test_layout_hv_port_info__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).monitor_address) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(monitor_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(rsvdz) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_port_info__bindgen_ty_1__bindgen_ty_4 { + pub target_sint: __u32, + pub target_vp: __u32, + pub rsvdz: __u64, +} +#[test] +fn bindgen_test_layout_hv_port_info__bindgen_ty_1__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_sint) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(target_sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vp) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(target_vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(rsvdz) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_port_info__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_port_info__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_port_info__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).message_port_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1), + "::", + stringify!(message_port_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event_port_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1), + "::", + stringify!(event_port_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).monitor_port_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1), + "::", + stringify!(monitor_port_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).doorbell_port_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info__bindgen_ty_1), + "::", + stringify!(doorbell_port_info) + ) + ); +} +impl Default for hv_port_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() + } + } +} +#[test] +fn bindgen_test_layout_hv_port_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_port_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_port_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_type) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info), + "::", + stringify!(port_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_port_info), + "::", + stringify!(padding) + ) + ); +} +impl Default for hv_port_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() + } + } +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_connection_info { + pub port_type: __u32, + pub padding: __u32, + pub __bindgen_anon_1: hv_connection_info__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_connection_info__bindgen_ty_1 { + pub message_connection_info: hv_connection_info__bindgen_ty_1__bindgen_ty_1, + pub event_connection_info: hv_connection_info__bindgen_ty_1__bindgen_ty_2, + pub monitor_connection_info: hv_connection_info__bindgen_ty_1__bindgen_ty_3, + pub doorbell_connection_info: hv_connection_info__bindgen_ty_1__bindgen_ty_4, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_connection_info__bindgen_ty_1__bindgen_ty_1 { + pub rsvdz: __u64, +} +#[test] +fn bindgen_test_layout_hv_connection_info__bindgen_ty_1__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_1), + "::", + stringify!(rsvdz) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_connection_info__bindgen_ty_1__bindgen_ty_2 { + pub rsvdz: __u64, +} +#[test] +fn bindgen_test_layout_hv_connection_info__bindgen_ty_1__bindgen_ty_2() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_2), + "::", + stringify!(rsvdz) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_connection_info__bindgen_ty_1__bindgen_ty_3 { + pub monitor_address: __u64, +} +#[test] +fn bindgen_test_layout_hv_connection_info__bindgen_ty_1__bindgen_ty_3() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_3) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).monitor_address) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_3), + "::", + stringify!(monitor_address) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_connection_info__bindgen_ty_1__bindgen_ty_4 { + pub gpa: __u64, + pub trigger_value: __u64, + pub flags: __u64, +} +#[test] +fn bindgen_test_layout_hv_connection_info__bindgen_ty_1__bindgen_ty_4() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!( + "Size of: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_4) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(gpa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).trigger_value) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(trigger_value) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1__bindgen_ty_4), + "::", + stringify!(flags) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_connection_info__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_connection_info__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_connection_info__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).message_connection_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1), + "::", + stringify!(message_connection_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).event_connection_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1), + "::", + stringify!(event_connection_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).monitor_connection_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1), + "::", + stringify!(monitor_connection_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).doorbell_connection_info) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info__bindgen_ty_1), + "::", + stringify!(doorbell_connection_info) + ) + ); +} +impl Default for hv_connection_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() + } + } +} +#[test] +fn bindgen_test_layout_hv_connection_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_connection_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_connection_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_type) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info), + "::", + stringify!(port_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_connection_info), + "::", + stringify!(padding) + ) + ); +} +impl Default for hv_connection_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() + } + } +} +#[repr(C, packed)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_event_ring { + pub signal_masked: __u8, + pub ring_full: __u8, + pub reserved_z: __u16, + pub data: [__u32; 63usize], +} +#[test] +fn bindgen_test_layout_hv_synic_event_ring() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 256usize, + concat!("Size of: ", stringify!(hv_synic_event_ring)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_event_ring)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).signal_masked) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_event_ring), + "::", + stringify!(signal_masked) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ring_full) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_event_ring), + "::", + stringify!(ring_full) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved_z) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_event_ring), + "::", + stringify!(reserved_z) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_event_ring), + "::", + stringify!(data) + ) + ); +} +impl Default for hv_synic_event_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() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_event_ring_page { + pub sint_event_ring: [hv_synic_event_ring; 16usize], +} +#[test] +fn bindgen_test_layout_hv_synic_event_ring_page() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4096usize, + concat!("Size of: ", stringify!(hv_synic_event_ring_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_event_ring_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint_event_ring) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_event_ring_page), + "::", + stringify!(sint_event_ring) + ) + ); +} +impl Default for hv_synic_event_ring_page { + 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 union hv_synic_scontrol { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_synic_scontrol__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_scontrol__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_synic_scontrol__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_scontrol__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_scontrol__bindgen_ty_1)) + ); +} +impl hv_synic_scontrol__bindgen_ty_1 { + #[inline] + pub fn enable(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_enable(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 63u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1(enable: __u64, reserved: __u64) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let enable: u64 = unsafe { ::std::mem::transmute(enable) }; + enable as u64 + }); + __bindgen_bitfield_unit.set(1usize, 63u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_synic_scontrol() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_scontrol)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_synic_scontrol)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_scontrol), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_synic_scontrol { + 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 union hv_synic_siefp { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_synic_siefp__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_siefp__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_synic_siefp__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_siefp__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_siefp__bindgen_ty_1)) + ); +} +impl hv_synic_siefp__bindgen_ty_1 { + #[inline] + pub fn siefp_enabled(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_siefp_enabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn preserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_preserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn base_siefp_gpa(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_base_siefp_gpa(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + siefp_enabled: __u64, + preserved: __u64, + base_siefp_gpa: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let siefp_enabled: u64 = unsafe { ::std::mem::transmute(siefp_enabled) }; + siefp_enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let preserved: u64 = unsafe { ::std::mem::transmute(preserved) }; + preserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let base_siefp_gpa: u64 = unsafe { ::std::mem::transmute(base_siefp_gpa) }; + base_siefp_gpa as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_synic_siefp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_siefp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_synic_siefp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_siefp), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_synic_siefp { + 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 union hv_synic_sirbp { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_synic_sirbp__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synic_sirbp__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_synic_sirbp__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_sirbp__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synic_sirbp__bindgen_ty_1)) + ); +} +impl hv_synic_sirbp__bindgen_ty_1 { + #[inline] + pub fn sirbp_enabled(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_sirbp_enabled(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn preserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 11u8) as u64) } + } + #[inline] + pub fn set_preserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 11u8, val as u64) + } + } + #[inline] + pub fn base_sirbp_gpa(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) } + } + #[inline] + pub fn set_base_sirbp_gpa(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(12usize, 52u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + sirbp_enabled: __u64, + preserved: __u64, + base_sirbp_gpa: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let sirbp_enabled: u64 = unsafe { ::std::mem::transmute(sirbp_enabled) }; + sirbp_enabled as u64 + }); + __bindgen_bitfield_unit.set(1usize, 11u8, { + let preserved: u64 = unsafe { ::std::mem::transmute(preserved) }; + preserved as u64 + }); + __bindgen_bitfield_unit.set(12usize, 52u8, { + let base_sirbp_gpa: u64 = unsafe { ::std::mem::transmute(base_sirbp_gpa) }; + base_sirbp_gpa as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_synic_sirbp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_synic_sirbp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_synic_sirbp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synic_sirbp), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_synic_sirbp { + 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 union hv_interrupt_control { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_interrupt_control__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_interrupt_control__bindgen_ty_1 { + pub interrupt_type: __u32, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_interrupt_control__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_interrupt_control__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_interrupt_control__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).interrupt_type) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_interrupt_control__bindgen_ty_1), + "::", + stringify!(interrupt_type) + ) + ); +} +impl hv_interrupt_control__bindgen_ty_1 { + #[inline] + pub fn level_triggered(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_level_triggered(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn logical_dest_mode(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } + } + #[inline] + pub fn set_logical_dest_mode(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn asserted(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u32) } + } + #[inline] + pub fn set_asserted(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn rsvd(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 29u8) as u32) } + } + #[inline] + pub fn set_rsvd(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 29u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + level_triggered: __u32, + logical_dest_mode: __u32, + asserted: __u32, + rsvd: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let level_triggered: u32 = unsafe { ::std::mem::transmute(level_triggered) }; + level_triggered as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let logical_dest_mode: u32 = unsafe { ::std::mem::transmute(logical_dest_mode) }; + logical_dest_mode as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let asserted: u32 = unsafe { ::std::mem::transmute(asserted) }; + asserted as u64 + }); + __bindgen_bitfield_unit.set(3usize, 29u8, { + let rsvd: u32 = unsafe { ::std::mem::transmute(rsvd) }; + rsvd as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_interrupt_control() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_interrupt_control)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_interrupt_control)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_interrupt_control), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_interrupt_control { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stimer_state { + pub flags: hv_stimer_state__bindgen_ty_1, + pub resvd: __u32, + pub config: __u64, + pub count: __u64, + pub adjustment: __u64, + pub undelivered_exp_time: __u64, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_stimer_state__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_stimer_state__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(hv_stimer_state__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_stimer_state__bindgen_ty_1)) + ); +} +impl hv_stimer_state__bindgen_ty_1 { + #[inline] + pub fn undelivered_msg_pending(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_undelivered_msg_pending(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + undelivered_msg_pending: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let undelivered_msg_pending: u32 = + unsafe { ::std::mem::transmute(undelivered_msg_pending) }; + undelivered_msg_pending as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_stimer_state() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(hv_stimer_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_stimer_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_state), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).resvd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_state), + "::", + stringify!(resvd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).config) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_state), + "::", + stringify!(config) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_state), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).adjustment) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_state), + "::", + stringify!(adjustment) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).undelivered_exp_time) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_stimer_state), + "::", + stringify!(undelivered_exp_time) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_synthetic_timers_state { + pub timers: [hv_stimer_state; 4usize], + pub reserved: [__u64; 5usize], +} +#[test] +fn bindgen_test_layout_hv_synthetic_timers_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 200usize, + concat!("Size of: ", stringify!(hv_synthetic_timers_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_synthetic_timers_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).timers) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_synthetic_timers_state), + "::", + stringify!(timers) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(hv_synthetic_timers_state), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_async_completion_message_payload { + pub partition_id: __u64, + pub status: __u32, + pub completion_count: __u32, + pub sub_status: __u64, +} +#[test] +fn bindgen_test_layout_hv_async_completion_message_payload() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_async_completion_message_payload)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_async_completion_message_payload) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_async_completion_message_payload), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_async_completion_message_payload), + "::", + stringify!(status) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).completion_count) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_async_completion_message_payload), + "::", + stringify!(completion_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sub_status) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_async_completion_message_payload), + "::", + stringify!(sub_status) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_translate_virtual_address { + pub partition_id: __u64, + pub vp_index: __u32, + pub padding: __u32, + pub control_flags: __u64, + pub gva_page: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_translate_virtual_address() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_input_translate_virtual_address)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_translate_virtual_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_translate_virtual_address), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_translate_virtual_address), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_translate_virtual_address), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control_flags) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_translate_virtual_address), + "::", + stringify!(control_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gva_page) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_translate_virtual_address), + "::", + stringify!(gva_page) + ) + ); +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_output_translate_virtual_address { + pub translation_result: hv_translate_gva_result, + pub gpa_page: __u64, +} +#[test] +fn bindgen_test_layout_hv_output_translate_virtual_address() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_output_translate_virtual_address)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_output_translate_virtual_address) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).translation_result) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_translate_virtual_address), + "::", + stringify!(translation_result) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa_page) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_output_translate_virtual_address), + "::", + stringify!(gpa_page) + ) + ); +} +impl Default for hv_output_translate_virtual_address { + 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 hv_cache_type_HV_CACHE_TYPE_UNCACHED: hv_cache_type = 0; +pub const hv_cache_type_HV_CACHE_TYPE_WRITE_COMBINING: hv_cache_type = 1; +pub const hv_cache_type_HV_CACHE_TYPE_WRITE_THROUGH: hv_cache_type = 4; +pub const hv_cache_type_HV_CACHE_TYPE_WRITE_BACK: hv_cache_type = 6; +pub type hv_cache_type = ::std::os::raw::c_uint; +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub union hv_delete_vp { + pub as_uint64: [__u64; 2usize], + pub __bindgen_anon_1: hv_delete_vp__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_delete_vp__bindgen_ty_1 { + pub partition_id: __u64, + pub vp_index: __u32, + pub reserved: [__u8; 4usize], +} +#[test] +fn bindgen_test_layout_hv_delete_vp__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_delete_vp__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_delete_vp__bindgen_ty_1)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_delete_vp__bindgen_ty_1), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_delete_vp__bindgen_ty_1), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_delete_vp__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_delete_vp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_delete_vp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_delete_vp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_delete_vp), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_delete_vp { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_assert_virtual_interrupt { + pub partition_id: __u64, + pub control: hv_interrupt_control, + pub dest_addr: __u64, + pub vector: __u32, + pub target_vtl: __u8, + pub rsvd_z0: __u8, + pub rsvd_z1: __u16, +} +#[test] +fn bindgen_test_layout_hv_input_assert_virtual_interrupt() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_input_assert_virtual_interrupt)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_assert_virtual_interrupt) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dest_addr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(dest_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(vector) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vtl) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(target_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_z0) as usize - ptr as usize }, + 29usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(rsvd_z0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_z1) as usize - ptr as usize }, + 30usize, + concat!( + "Offset of field: ", + stringify!(hv_input_assert_virtual_interrupt), + "::", + stringify!(rsvd_z1) + ) + ); +} +impl Default for hv_input_assert_virtual_interrupt { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_create_port { + pub port_partition_id: __u64, + pub port_id: hv_port_id, + pub port_vtl: __u8, + pub min_connection_vtl: __u8, + pub padding: __u16, + pub connection_partition_id: __u64, + pub port_info: hv_port_info, + pub proximity_domain_info: hv_proximity_domain_info, +} +#[test] +fn bindgen_test_layout_hv_input_create_port() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 56usize, + concat!("Size of: ", stringify!(hv_input_create_port)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_create_port)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(port_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(port_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_vtl) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(port_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).min_connection_vtl) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(min_connection_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_partition_id) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(connection_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_info) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(port_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).proximity_domain_info) as usize - ptr as usize }, + 48usize, + concat!( + "Offset of field: ", + stringify!(hv_input_create_port), + "::", + stringify!(proximity_domain_info) + ) + ); +} +impl Default for hv_input_create_port { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_input_delete_port { + pub as_uint64: [__u64; 2usize], + pub __bindgen_anon_1: hv_input_delete_port__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct hv_input_delete_port__bindgen_ty_1 { + pub port_partition_id: __u64, + pub port_id: hv_port_id, + pub reserved: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_delete_port__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_delete_port__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_input_delete_port__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_delete_port__bindgen_ty_1), + "::", + stringify!(port_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_delete_port__bindgen_ty_1), + "::", + stringify!(port_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_delete_port__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +impl Default for hv_input_delete_port__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_input_delete_port() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_delete_port)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_delete_port)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_delete_port), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_input_delete_port { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_connect_port { + pub connection_partition_id: __u64, + pub connection_id: hv_connection_id, + pub connection_vtl: __u8, + pub rsvdz0: __u8, + pub rsvdz1: __u16, + pub port_partition_id: __u64, + pub port_id: hv_port_id, + pub reserved2: __u32, + pub connection_info: hv_connection_info, + pub proximity_domain_info: hv_proximity_domain_info, +} +#[test] +fn bindgen_test_layout_hv_input_connect_port() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 72usize, + concat!("Size of: ", stringify!(hv_input_connect_port)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_connect_port)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(connection_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(connection_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_vtl) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(connection_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz0) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(rsvdz0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvdz1) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(rsvdz1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_partition_id) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(port_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).port_id) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(port_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(reserved2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_info) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(connection_info) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).proximity_domain_info) as usize - ptr as usize }, + 64usize, + concat!( + "Offset of field: ", + stringify!(hv_input_connect_port), + "::", + stringify!(proximity_domain_info) + ) + ); +} +impl Default for hv_input_connect_port { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_input_disconnect_port { + pub as_uint64: [__u64; 2usize], + pub __bindgen_anon_1: hv_input_disconnect_port__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_disconnect_port__bindgen_ty_1 { + pub connection_partition_id: __u64, + pub connection_id: hv_connection_id, + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, +} +#[test] +fn bindgen_test_layout_hv_input_disconnect_port__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_input_disconnect_port__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_disconnect_port__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_disconnect_port__bindgen_ty_1), + "::", + stringify!(connection_partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).connection_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_disconnect_port__bindgen_ty_1), + "::", + stringify!(connection_id) + ) + ); +} +impl Default for hv_input_disconnect_port__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 hv_input_disconnect_port__bindgen_ty_1 { + #[inline] + pub fn is_doorbell(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_is_doorbell(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 31u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 31u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + is_doorbell: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let is_doorbell: u32 = unsafe { ::std::mem::transmute(is_doorbell) }; + is_doorbell as u64 + }); + __bindgen_bitfield_unit.set(1usize, 31u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_input_disconnect_port() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_disconnect_port)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_disconnect_port)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_disconnect_port), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_input_disconnect_port { + 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, packed)] +#[derive(Copy, Clone)] +pub union hv_input_notify_port_ring_empty { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_input_notify_port_ring_empty__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_notify_port_ring_empty__bindgen_ty_1 { + pub sint_index: __u32, + pub reserved: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_notify_port_ring_empty__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_input_notify_port_ring_empty__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!( + "Alignment of ", + stringify!(hv_input_notify_port_ring_empty__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_notify_port_ring_empty__bindgen_ty_1), + "::", + stringify!(sint_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_notify_port_ring_empty__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_input_notify_port_ring_empty() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_input_notify_port_ring_empty)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_notify_port_ring_empty)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_notify_port_ring_empty), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_input_notify_port_ring_empty { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_signal_event_direct { + pub target_partition: __u64, + pub target_vp: __u32, + pub target_vtl: __u8, + pub target_sint: __u8, + pub flag_number: __u16, +} +#[test] +fn bindgen_test_layout_hv_input_signal_event_direct() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_signal_event_direct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_signal_event_direct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_partition) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_signal_event_direct), + "::", + stringify!(target_partition) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vp) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_signal_event_direct), + "::", + stringify!(target_vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_vtl) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_signal_event_direct), + "::", + stringify!(target_vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).target_sint) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(hv_input_signal_event_direct), + "::", + stringify!(target_sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flag_number) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_input_signal_event_direct), + "::", + stringify!(flag_number) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_signal_event_direct { + pub newly_signaled: __u8, + pub reserved: [__u8; 7usize], +} +#[test] +fn bindgen_test_layout_hv_output_signal_event_direct() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_signal_event_direct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_signal_event_direct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).newly_signaled) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_signal_event_direct), + "::", + stringify!(newly_signaled) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 1usize, + concat!( + "Offset of field: ", + stringify!(hv_output_signal_event_direct), + "::", + stringify!(reserved) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_post_message_direct { + pub partition_id: __u64, + pub vp_index: __u32, + pub vtl: __u8, + pub padding: [__u8; 3usize], + pub sint_index: __u32, + pub message: [__u8; 256usize], + pub padding2: __u32, +} +#[test] +fn bindgen_test_layout_hv_input_post_message_direct() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 280usize, + concat!("Size of: ", stringify!(hv_input_post_message_direct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_post_message_direct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize }, + 13usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(padding) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint_index) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(sint_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(message) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).padding2) as usize - ptr as usize }, + 276usize, + concat!( + "Offset of field: ", + stringify!(hv_input_post_message_direct), + "::", + stringify!(padding2) + ) + ); +} +impl Default for hv_input_post_message_direct { + 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 hv_vp_dispatch_state_HV_VP_DISPATCH_STATE_INVALID: hv_vp_dispatch_state = 0; +pub const hv_vp_dispatch_state_HV_VP_DISPATCH_STATE_BLOCKED: hv_vp_dispatch_state = 1; +pub const hv_vp_dispatch_state_HV_VP_DISPATCH_STATE_READY: hv_vp_dispatch_state = 2; +pub type hv_vp_dispatch_state = ::std::os::raw::c_uint; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_INVALID: hv_vp_dispatch_event = 0; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_SUSPEND: hv_vp_dispatch_event = 1; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_INTERCEPT: hv_vp_dispatch_event = 2; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_INTERNAL: hv_vp_dispatch_event = 3; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_PREEMPTED: hv_vp_dispatch_event = 4; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_CANCELLED: hv_vp_dispatch_event = 5; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_SCHEDULER: hv_vp_dispatch_event = 6; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_LONGSPINWAIT: hv_vp_dispatch_event = 7; +pub const hv_vp_dispatch_event_HV_VP_DISPATCH_EVENT_TIMESLICEEND: hv_vp_dispatch_event = 8; +pub type hv_vp_dispatch_event = ::std::os::raw::c_uint; +#[repr(C, packed)] +pub struct hv_vp_signal_bitset_scheduler_message { + pub partition_id: __u64, + pub overflow_count: __u32, + pub vp_count: __u16, + pub reserved: __u16, + pub vp_bitset: hv_vp_signal_bitset_scheduler_message__bindgen_ty_1, +} +#[repr(C)] +pub struct hv_vp_signal_bitset_scheduler_message__bindgen_ty_1 { + pub bitset: __BindgenUnionField, + pub bitset_buffer: __BindgenUnionField<[__u64; 18usize]>, + pub bindgen_union_field: [u64; 18usize], +} +#[test] +fn bindgen_test_layout_hv_vp_signal_bitset_scheduler_message__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 144usize, + concat!( + "Size of: ", + stringify!(hv_vp_signal_bitset_scheduler_message__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(hv_vp_signal_bitset_scheduler_message__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bitset) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message__bindgen_ty_1), + "::", + stringify!(bitset) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).bitset_buffer) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message__bindgen_ty_1), + "::", + stringify!(bitset_buffer) + ) + ); +} +impl Default for hv_vp_signal_bitset_scheduler_message__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() + } + } +} +#[test] +fn bindgen_test_layout_hv_vp_signal_bitset_scheduler_message() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 160usize, + concat!( + "Size of: ", + stringify!(hv_vp_signal_bitset_scheduler_message) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_vp_signal_bitset_scheduler_message) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).overflow_count) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message), + "::", + stringify!(overflow_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_count) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message), + "::", + stringify!(vp_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 14usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message), + "::", + stringify!(reserved) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_bitset) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_bitset_scheduler_message), + "::", + stringify!(vp_bitset) + ) + ); +} +impl Default for hv_vp_signal_bitset_scheduler_message { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_eventlog_message_payload { + pub type_: __u32, + pub buffer_index: __u32, +} +#[test] +fn bindgen_test_layout_hv_eventlog_message_payload() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_eventlog_message_payload)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_eventlog_message_payload)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_eventlog_message_payload), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buffer_index) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_eventlog_message_payload), + "::", + stringify!(buffer_index) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_vp_signal_pair_scheduler_message { + pub overflow_count: __u32, + pub vp_count: __u8, + pub reserved1: [__u8; 3usize], + pub partition_ids: [__u64; 19usize], + pub vp_indexes: [__u32; 19usize], + pub reserved2: [__u8; 4usize], +} +#[test] +fn bindgen_test_layout_hv_vp_signal_pair_scheduler_message() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 240usize, + concat!("Size of: ", stringify!(hv_vp_signal_pair_scheduler_message)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_vp_signal_pair_scheduler_message) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).overflow_count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_pair_scheduler_message), + "::", + stringify!(overflow_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_count) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_pair_scheduler_message), + "::", + stringify!(vp_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_pair_scheduler_message), + "::", + stringify!(reserved1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_ids) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_pair_scheduler_message), + "::", + stringify!(partition_ids) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_indexes) as usize - ptr as usize }, + 160usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_pair_scheduler_message), + "::", + stringify!(vp_indexes) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, + 236usize, + concat!( + "Offset of field: ", + stringify!(hv_vp_signal_pair_scheduler_message), + "::", + stringify!(reserved2) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_dispatch_vp { + pub partition_id: __u64, + pub vp_index: __u32, + pub flags: __u32, + pub time_slice: __u64, + pub spec_ctrl: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_dispatch_vp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_input_dispatch_vp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_dispatch_vp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_dispatch_vp), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_dispatch_vp), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_dispatch_vp), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_slice) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_dispatch_vp), + "::", + stringify!(time_slice) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).spec_ctrl) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_dispatch_vp), + "::", + stringify!(spec_ctrl) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_output_dispatch_vp { + pub dispatch_state: __u32, + pub dispatch_event: __u32, +} +#[test] +fn bindgen_test_layout_hv_output_dispatch_vp() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_dispatch_vp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_dispatch_vp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispatch_state) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_dispatch_vp), + "::", + stringify!(dispatch_state) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dispatch_event) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_output_dispatch_vp), + "::", + stringify!(dispatch_event) + ) + ); +} +#[repr(C, packed)] +pub struct hv_input_modify_sparse_spa_page_host_access { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub flags: __u32, + pub partition_id: __u64, + pub spa_page_list: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_input_modify_sparse_spa_page_host_access() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(hv_input_modify_sparse_spa_page_host_access) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_modify_sparse_spa_page_host_access) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_input_modify_sparse_spa_page_host_access), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_modify_sparse_spa_page_host_access), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).spa_page_list) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_modify_sparse_spa_page_host_access), + "::", + stringify!(spa_page_list) + ) + ); +} +impl Default for hv_input_modify_sparse_spa_page_host_access { + 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 hv_input_modify_sparse_spa_page_host_access { + #[inline] + pub fn host_access(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u32) } + } + #[inline] + pub fn set_host_access(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 2u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u32 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u32) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + host_access: __u32, + reserved: __u32, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 2u8, { + let host_access: u32 = unsafe { ::std::mem::transmute(host_access) }; + host_access as u64 + }); + __bindgen_bitfield_unit.set(2usize, 30u8, { + let reserved: u32 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_psp_cpuid_leaf { + pub eax_in: __u32, + pub ecx_in: __u32, + pub xfem_in: __u64, + pub xss_in: __u64, + pub eax_out: __u32, + pub ebx_out: __u32, + pub ecx_out: __u32, + pub edx_out: __u32, + pub reserved_z: __u64, +} +#[test] +fn bindgen_test_layout_hv_psp_cpuid_leaf() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(hv_psp_cpuid_leaf)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_psp_cpuid_leaf)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eax_in) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(eax_in) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ecx_in) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(ecx_in) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xfem_in) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(xfem_in) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xss_in) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(xss_in) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eax_out) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(eax_out) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ebx_out) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(ebx_out) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ecx_out) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(ecx_out) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).edx_out) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(edx_out) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved_z) as usize - ptr as usize }, + 40usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_leaf), + "::", + stringify!(reserved_z) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_psp_cpuid_page { + pub count: __u32, + pub reserved_z1: __u32, + pub reserved_z2: __u64, + pub cpuid_leaf_info: [hv_psp_cpuid_leaf; 64usize], +} +#[test] +fn bindgen_test_layout_hv_psp_cpuid_page() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 3088usize, + concat!("Size of: ", stringify!(hv_psp_cpuid_page)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_psp_cpuid_page)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_page), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved_z1) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_page), + "::", + stringify!(reserved_z1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved_z2) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_page), + "::", + stringify!(reserved_z2) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).cpuid_leaf_info) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_psp_cpuid_page), + "::", + stringify!(cpuid_leaf_info) + ) + ); +} +impl Default for hv_psp_cpuid_page { + 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 hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_NORMAL: hv_isolated_page_type = 0; +pub const hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_VMSA: hv_isolated_page_type = 1; +pub const hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_ZERO: hv_isolated_page_type = 2; +pub const hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_UNMEASURED: hv_isolated_page_type = 3; +pub const hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_SECRETS: hv_isolated_page_type = 4; +pub const hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_CPUID: hv_isolated_page_type = 5; +pub const hv_isolated_page_type_HV_ISOLATED_PAGE_TYPE_COUNT: hv_isolated_page_type = 6; +pub type hv_isolated_page_type = ::std::os::raw::c_uint; +pub const hv_isolated_page_size_HV_ISOLATED_PAGE_SIZE_4KB: hv_isolated_page_size = 0; +pub const hv_isolated_page_size_HV_ISOLATED_PAGE_SIZE_2MB: hv_isolated_page_size = 1; +pub type hv_isolated_page_size = ::std::os::raw::c_uint; +#[repr(C, packed)] +pub struct hv_input_import_isolated_pages { + pub partition_id: __u64, + pub page_type: __u32, + pub page_size: __u32, + pub page_number: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_hv_input_import_isolated_pages() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(hv_input_import_isolated_pages)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_import_isolated_pages)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_import_isolated_pages), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_type) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_import_isolated_pages), + "::", + stringify!(page_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_size) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_import_isolated_pages), + "::", + stringify!(page_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_number) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_import_isolated_pages), + "::", + stringify!(page_number) + ) + ); +} +impl Default for hv_input_import_isolated_pages { + 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 union hv_sev_vmgexit_offload { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_sev_vmgexit_offload__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_sev_vmgexit_offload__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_sev_vmgexit_offload__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_sev_vmgexit_offload__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_sev_vmgexit_offload__bindgen_ty_1) + ) + ); +} +impl hv_sev_vmgexit_offload__bindgen_ty_1 { + #[inline] + pub fn nae_rdtsc(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_rdtsc(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_cpuid(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_cpuid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_reserved_io_port(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_reserved_io_port(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(2usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_rdmsr(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_rdmsr(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_wrmsr(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_wrmsr(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_vmmcall(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_vmmcall(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_wbinvd(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_wbinvd(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 1u8, val as u64) + } + } + #[inline] + pub fn nae_snp_page_state_change(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 1u8) as u64) } + } + #[inline] + pub fn set_nae_snp_page_state_change(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(7usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved0(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 24u8) as u64) } + } + #[inline] + pub fn set_reserved0(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 24u8, val as u64) + } + } + #[inline] + pub fn msr_cpuid(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) } + } + #[inline] + pub fn set_msr_cpuid(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 1u8, val as u64) + } + } + #[inline] + pub fn msr_snp_page_state_change(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(33usize, 1u8) as u64) } + } + #[inline] + pub fn set_msr_snp_page_state_change(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(33usize, 1u8, val as u64) + } + } + #[inline] + pub fn reserved1(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(34usize, 30u8) as u64) } + } + #[inline] + pub fn set_reserved1(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(34usize, 30u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + nae_rdtsc: __u64, + nae_cpuid: __u64, + nae_reserved_io_port: __u64, + nae_rdmsr: __u64, + nae_wrmsr: __u64, + nae_vmmcall: __u64, + nae_wbinvd: __u64, + nae_snp_page_state_change: __u64, + reserved0: __u64, + msr_cpuid: __u64, + msr_snp_page_state_change: __u64, + reserved1: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let nae_rdtsc: u64 = unsafe { ::std::mem::transmute(nae_rdtsc) }; + nae_rdtsc as u64 + }); + __bindgen_bitfield_unit.set(1usize, 1u8, { + let nae_cpuid: u64 = unsafe { ::std::mem::transmute(nae_cpuid) }; + nae_cpuid as u64 + }); + __bindgen_bitfield_unit.set(2usize, 1u8, { + let nae_reserved_io_port: u64 = unsafe { ::std::mem::transmute(nae_reserved_io_port) }; + nae_reserved_io_port as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let nae_rdmsr: u64 = unsafe { ::std::mem::transmute(nae_rdmsr) }; + nae_rdmsr as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let nae_wrmsr: u64 = unsafe { ::std::mem::transmute(nae_wrmsr) }; + nae_wrmsr as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let nae_vmmcall: u64 = unsafe { ::std::mem::transmute(nae_vmmcall) }; + nae_vmmcall as u64 + }); + __bindgen_bitfield_unit.set(6usize, 1u8, { + let nae_wbinvd: u64 = unsafe { ::std::mem::transmute(nae_wbinvd) }; + nae_wbinvd as u64 + }); + __bindgen_bitfield_unit.set(7usize, 1u8, { + let nae_snp_page_state_change: u64 = + unsafe { ::std::mem::transmute(nae_snp_page_state_change) }; + nae_snp_page_state_change as u64 + }); + __bindgen_bitfield_unit.set(8usize, 24u8, { + let reserved0: u64 = unsafe { ::std::mem::transmute(reserved0) }; + reserved0 as u64 + }); + __bindgen_bitfield_unit.set(32usize, 1u8, { + let msr_cpuid: u64 = unsafe { ::std::mem::transmute(msr_cpuid) }; + msr_cpuid as u64 + }); + __bindgen_bitfield_unit.set(33usize, 1u8, { + let msr_snp_page_state_change: u64 = + unsafe { ::std::mem::transmute(msr_snp_page_state_change) }; + msr_snp_page_state_change as u64 + }); + __bindgen_bitfield_unit.set(34usize, 30u8, { + let reserved1: u64 = unsafe { ::std::mem::transmute(reserved1) }; + reserved1 as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_sev_vmgexit_offload() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_sev_vmgexit_offload)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_sev_vmgexit_offload)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_sev_vmgexit_offload), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_sev_vmgexit_offload { + 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 hv_access_gpa_result_code_HV_ACCESS_GPA_SUCCESS: hv_access_gpa_result_code = 0; +pub const hv_access_gpa_result_code_HV_ACCESS_GPA_UNMAPPED: hv_access_gpa_result_code = 1; +pub const hv_access_gpa_result_code_HV_ACCESS_GPA_READ_INTERCEPT: hv_access_gpa_result_code = 2; +pub const hv_access_gpa_result_code_HV_ACCESS_GPA_WRITE_INTERCEPT: hv_access_gpa_result_code = 3; +pub const hv_access_gpa_result_code_HV_ACCESS_GPA_ILLEGAL_OVERLAY_ACCESS: + hv_access_gpa_result_code = 4; +pub type hv_access_gpa_result_code = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Copy, Clone)] +pub union hv_access_gpa_result { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_access_gpa_result__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_access_gpa_result__bindgen_ty_1 { + pub result_code: __u32, + pub reserved: __u32, +} +#[test] +fn bindgen_test_layout_hv_access_gpa_result__bindgen_ty_1() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_access_gpa_result__bindgen_ty_1)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_access_gpa_result__bindgen_ty_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result_code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_access_gpa_result__bindgen_ty_1), + "::", + stringify!(result_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(hv_access_gpa_result__bindgen_ty_1), + "::", + stringify!(reserved) + ) + ); +} +#[test] +fn bindgen_test_layout_hv_access_gpa_result() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_access_gpa_result)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_access_gpa_result)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_access_gpa_result), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_access_gpa_result { + 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 union hv_access_gpa_control_flags { + pub as_uint64: __u64, + pub __bindgen_anon_1: hv_access_gpa_control_flags__bindgen_ty_1, +} +#[repr(C, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_access_gpa_control_flags__bindgen_ty_1 { + pub _bitfield_align_1: [u8; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, +} +#[test] +fn bindgen_test_layout_hv_access_gpa_control_flags__bindgen_ty_1() { + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!( + "Size of: ", + stringify!(hv_access_gpa_control_flags__bindgen_ty_1) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_access_gpa_control_flags__bindgen_ty_1) + ) + ); +} +impl hv_access_gpa_control_flags__bindgen_ty_1 { + #[inline] + pub fn cache_type(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u64) } + } + #[inline] + pub fn set_cache_type(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 8u8, val as u64) + } + } + #[inline] + pub fn reserved(&self) -> __u64 { + unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 56u8) as u64) } + } + #[inline] + pub fn set_reserved(&mut self, val: __u64) { + unsafe { + let val: u64 = ::std::mem::transmute(val); + self._bitfield_1.set(8usize, 56u8, val as u64) + } + } + #[inline] + pub fn new_bitfield_1( + cache_type: __u64, + reserved: __u64, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let cache_type: u64 = unsafe { ::std::mem::transmute(cache_type) }; + cache_type as u64 + }); + __bindgen_bitfield_unit.set(8usize, 56u8, { + let reserved: u64 = unsafe { ::std::mem::transmute(reserved) }; + reserved as u64 + }); + __bindgen_bitfield_unit + } +} +#[test] +fn bindgen_test_layout_hv_access_gpa_control_flags() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_access_gpa_control_flags)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(hv_access_gpa_control_flags)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_access_gpa_control_flags), + "::", + stringify!(as_uint64) + ) + ); +} +impl Default for hv_access_gpa_control_flags { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_read_gpa { + pub partition_id: __u64, + pub vp_index: __u32, + pub byte_count: __u32, + pub base_gpa: __u64, + pub control_flags: hv_access_gpa_control_flags, +} +#[test] +fn bindgen_test_layout_hv_input_read_gpa() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(hv_input_read_gpa)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_read_gpa)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_read_gpa), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_read_gpa), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).byte_count) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_read_gpa), + "::", + stringify!(byte_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_gpa) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_read_gpa), + "::", + stringify!(base_gpa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control_flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_read_gpa), + "::", + stringify!(control_flags) + ) + ); +} +impl Default for hv_input_read_gpa { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_output_read_gpa { + pub access_result: hv_access_gpa_result, + pub data: [__u8; 16usize], +} +#[test] +fn bindgen_test_layout_hv_output_read_gpa() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_output_read_gpa)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_read_gpa)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).access_result) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_read_gpa), + "::", + stringify!(access_result) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_output_read_gpa), + "::", + stringify!(data) + ) + ); +} +impl Default for hv_output_read_gpa { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_input_write_gpa { + pub partition_id: __u64, + pub vp_index: __u32, + pub byte_count: __u32, + pub base_gpa: __u64, + pub control_flags: hv_access_gpa_control_flags, + pub data: [__u8; 16usize], +} +#[test] +fn bindgen_test_layout_hv_input_write_gpa() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 48usize, + concat!("Size of: ", stringify!(hv_input_write_gpa)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_input_write_gpa)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_write_gpa), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_write_gpa), + "::", + stringify!(vp_index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).byte_count) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(hv_input_write_gpa), + "::", + stringify!(byte_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_gpa) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_write_gpa), + "::", + stringify!(base_gpa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control_flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(hv_input_write_gpa), + "::", + stringify!(control_flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(hv_input_write_gpa), + "::", + stringify!(data) + ) + ); +} +impl Default for hv_input_write_gpa { + 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, packed)] +#[derive(Copy, Clone)] +pub struct hv_output_write_gpa { + pub access_result: hv_access_gpa_result, +} +#[test] +fn bindgen_test_layout_hv_output_write_gpa() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(hv_output_write_gpa)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(hv_output_write_gpa)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).access_result) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_output_write_gpa), + "::", + stringify!(access_result) + ) + ); +} +impl Default for hv_output_write_gpa { + 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, packed)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct hv_input_issue_psp_guest_request { + pub partition_id: __u64, + pub request_page: __u64, + pub response_page: __u64, +} +#[test] +fn bindgen_test_layout_hv_input_issue_psp_guest_request() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(hv_input_issue_psp_guest_request)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!( + "Alignment of ", + stringify!(hv_input_issue_psp_guest_request) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(hv_input_issue_psp_guest_request), + "::", + stringify!(partition_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).request_page) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(hv_input_issue_psp_guest_request), + "::", + stringify!(request_page) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).response_page) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(hv_input_issue_psp_guest_request), + "::", + stringify!(response_page) + ) + ); +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct mshv_create_partition { + pub flags: __u64, + pub partition_creation_properties: hv_partition_creation_properties, + pub synthetic_processor_features: hv_partition_synthetic_processor_features, + pub isolation_properties: hv_partition_isolation_properties, +} +#[test] +fn bindgen_test_layout_mshv_create_partition() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_create_partition)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_create_partition)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_partition), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).partition_creation_properties) as usize - ptr as usize + }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_partition), + "::", + stringify!(partition_creation_properties) + ) + ); + assert_eq!( + unsafe { + ::std::ptr::addr_of!((*ptr).synthetic_processor_features) as usize - ptr as usize + }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_partition), + "::", + stringify!(synthetic_processor_features) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).isolation_properties) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_partition), + "::", + stringify!(isolation_properties) + ) + ); +} +impl Default for mshv_create_partition { + 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, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_user_mem_region { + pub size: __u64, + pub guest_pfn: __u64, + pub userspace_addr: __u64, + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_mshv_user_mem_region() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_user_mem_region)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_user_mem_region)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_user_mem_region), + "::", + stringify!(size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).guest_pfn) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_user_mem_region), + "::", + stringify!(guest_pfn) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).userspace_addr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_user_mem_region), + "::", + stringify!(userspace_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_user_mem_region), + "::", + stringify!(flags) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_vp_registers { + pub count: ::std::os::raw::c_int, + pub regs: *mut hv_register_assoc, +} +#[test] +fn bindgen_test_layout_mshv_vp_registers() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_vp_registers)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_vp_registers)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_vp_registers), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).regs) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_vp_registers), + "::", + stringify!(regs) + ) + ); +} +impl Default for mshv_vp_registers { + 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 mshv_install_intercept { + pub access_type_mask: __u32, + pub intercept_type: hv_intercept_type, + pub intercept_parameter: hv_intercept_parameters, +} +#[test] +fn bindgen_test_layout_mshv_install_intercept() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_install_intercept)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_install_intercept)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).access_type_mask) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_install_intercept), + "::", + stringify!(access_type_mask) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intercept_type) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_install_intercept), + "::", + stringify!(intercept_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).intercept_parameter) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_install_intercept), + "::", + stringify!(intercept_parameter) + ) + ); +} +impl Default for mshv_install_intercept { + 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 mshv_assert_interrupt { + pub control: hv_interrupt_control, + pub dest_addr: __u64, + pub vector: __u32, + pub rsvd: __u32, +} +#[test] +fn bindgen_test_layout_mshv_assert_interrupt() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(mshv_assert_interrupt)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_assert_interrupt)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).control) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_assert_interrupt), + "::", + stringify!(control) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).dest_addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_assert_interrupt), + "::", + stringify!(dest_addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vector) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_assert_interrupt), + "::", + stringify!(vector) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(mshv_assert_interrupt), + "::", + stringify!(rsvd) + ) + ); +} +impl Default for mshv_assert_interrupt { + 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, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_partition_property { + pub property_code: hv_partition_property_code, + pub property_value: __u64, +} +#[test] +fn bindgen_test_layout_mshv_partition_property() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_partition_property)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_partition_property)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_partition_property), + "::", + stringify!(property_code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).property_value) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_partition_property), + "::", + stringify!(property_value) + ) + ); +} +impl Default for mshv_partition_property { + 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, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_translate_gva { + pub gva: __u64, + pub flags: __u64, + pub result: *mut hv_translate_gva_result, + pub gpa: *mut __u64, +} +#[test] +fn bindgen_test_layout_mshv_translate_gva() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_translate_gva)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_translate_gva)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gva) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_translate_gva), + "::", + stringify!(gva) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_translate_gva), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_translate_gva), + "::", + stringify!(result) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_translate_gva), + "::", + stringify!(gpa) + ) + ); +} +impl Default for mshv_translate_gva { + 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, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_signal_event_direct { + pub vp: __u32, + pub vtl: __u8, + pub sint: __u8, + pub flag: __u16, + pub newly_signaled: __u8, +} +#[test] +fn bindgen_test_layout_mshv_signal_event_direct() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(mshv_signal_event_direct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(mshv_signal_event_direct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_signal_event_direct), + "::", + stringify!(vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_signal_event_direct), + "::", + stringify!(vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(mshv_signal_event_direct), + "::", + stringify!(sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flag) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(mshv_signal_event_direct), + "::", + stringify!(flag) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).newly_signaled) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_signal_event_direct), + "::", + stringify!(newly_signaled) + ) + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_post_message_direct { + pub vp: __u32, + pub vtl: __u8, + pub sint: __u8, + pub length: __u16, + pub message: *const __u8, +} +#[test] +fn bindgen_test_layout_mshv_post_message_direct() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_post_message_direct)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_post_message_direct)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_post_message_direct), + "::", + stringify!(vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vtl) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_post_message_direct), + "::", + stringify!(vtl) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).sint) as usize - ptr as usize }, + 5usize, + concat!( + "Offset of field: ", + stringify!(mshv_post_message_direct), + "::", + stringify!(sint) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(mshv_post_message_direct), + "::", + stringify!(length) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).message) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_post_message_direct), + "::", + stringify!(message) + ) + ); +} +impl Default for mshv_post_message_direct { + 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, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_register_deliverabilty_notifications { + pub vp: __u32, + pub pad: __u32, + pub flag: __u64, +} +#[test] +fn bindgen_test_layout_mshv_register_deliverabilty_notifications() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!( + "Size of: ", + stringify!(mshv_register_deliverabilty_notifications) + ) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!( + "Alignment of ", + stringify!(mshv_register_deliverabilty_notifications) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_register_deliverabilty_notifications), + "::", + stringify!(vp) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_register_deliverabilty_notifications), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flag) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_register_deliverabilty_notifications), + "::", + stringify!(flag) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_get_vp_cpuid_values { + pub function: __u32, + pub index: __u32, + pub xfem: __u64, + pub xss: __u64, + pub eax: __u32, + pub ebx: __u32, + pub ecx: __u32, + pub edx: __u32, +} +#[test] +fn bindgen_test_layout_mshv_get_vp_cpuid_values() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 40usize, + concat!("Size of: ", stringify!(mshv_get_vp_cpuid_values)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_get_vp_cpuid_values)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).function) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(function) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(index) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xfem) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(xfem) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).xss) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(xss) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(eax) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(ebx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize }, + 32usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(ecx) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize }, + 36usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_vp_cpuid_values), + "::", + stringify!(edx) + ) + ); +} +#[repr(C, packed)] +#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_get_gpa_pages_access_state { + pub count: __u32, + pub flags: __u64, + pub hv_gpa_page_number: __u64, + pub states: *mut hv_gpa_page_access_state, +} +#[test] +fn bindgen_test_layout_mshv_get_gpa_pages_access_state() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 28usize, + concat!("Size of: ", stringify!(mshv_get_gpa_pages_access_state)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(mshv_get_gpa_pages_access_state)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).count) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_gpa_pages_access_state), + "::", + stringify!(count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_gpa_pages_access_state), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).hv_gpa_page_number) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_gpa_pages_access_state), + "::", + stringify!(hv_gpa_page_number) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).states) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(mshv_get_gpa_pages_access_state), + "::", + stringify!(states) + ) + ); +} +impl Default for mshv_get_gpa_pages_access_state { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_read_write_gpa { + pub base_gpa: __u64, + pub byte_count: __u32, + pub flags: __u32, + pub data: [__u8; 16usize], +} +#[test] +fn bindgen_test_layout_mshv_read_write_gpa() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_read_write_gpa)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_read_write_gpa)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).base_gpa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_read_write_gpa), + "::", + stringify!(base_gpa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).byte_count) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_read_write_gpa), + "::", + stringify!(byte_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(mshv_read_write_gpa), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_read_write_gpa), + "::", + stringify!(data) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_sev_snp_ap_create { + pub vp_id: __u64, + pub vmsa_gpa: __u64, +} +#[test] +fn bindgen_test_layout_mshv_sev_snp_ap_create() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_sev_snp_ap_create)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_sev_snp_ap_create)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_id) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_sev_snp_ap_create), + "::", + stringify!(vp_id) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vmsa_gpa) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_sev_snp_ap_create), + "::", + stringify!(vmsa_gpa) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_issue_psp_guest_request { + pub req_gpa: __u64, + pub rsp_gpa: __u64, +} +#[test] +fn bindgen_test_layout_mshv_issue_psp_guest_request() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_issue_psp_guest_request)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_issue_psp_guest_request)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).req_gpa) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_issue_psp_guest_request), + "::", + stringify!(req_gpa) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsp_gpa) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_issue_psp_guest_request), + "::", + stringify!(rsp_gpa) + ) + ); +} +pub const MSHV_CAP_RSVD: _bindgen_ty_2 = 0; +pub const MSHV_CAP_VTL_REGISTER_PAGE: _bindgen_ty_2 = 1; +pub const MSHV_CAP_VTL_RETURN_ACTION: _bindgen_ty_2 = 2; +pub const MSHV_CAP_VTL_DR6_SHARED: _bindgen_ty_2 = 3; +pub type _bindgen_ty_2 = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_version_info { + pub mshv_uapi_version: __u32, + pub rsvd_0: [__u32; 3usize], + pub mshv_api_version: __u32, + pub rsvd_1: __u32, + pub mshv_capabilities: __u64, +} +#[test] +fn bindgen_test_layout_mshv_version_info() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_version_info)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_version_info)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mshv_uapi_version) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_version_info), + "::", + stringify!(mshv_uapi_version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_0) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_version_info), + "::", + stringify!(rsvd_0) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mshv_api_version) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_version_info), + "::", + stringify!(mshv_api_version) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd_1) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(mshv_version_info), + "::", + stringify!(rsvd_1) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mshv_capabilities) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_version_info), + "::", + stringify!(mshv_capabilities) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_create_vp { + pub vp_index: __u32, +} +#[test] +fn bindgen_test_layout_mshv_create_vp() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 4usize, + concat!("Size of: ", stringify!(mshv_create_vp)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(mshv_create_vp)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_vp), + "::", + stringify!(vp_index) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_irqfd { + pub fd: __s32, + pub resamplefd: __s32, + pub gsi: __u32, + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_mshv_irqfd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_irqfd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(mshv_irqfd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_irqfd), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).resamplefd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_irqfd), + "::", + stringify!(resamplefd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_irqfd), + "::", + stringify!(gsi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(mshv_irqfd), + "::", + stringify!(flags) + ) + ); +} +pub const mshv_ioeventfd_flag_nr_datamatch: _bindgen_ty_3 = 0; +pub const mshv_ioeventfd_flag_nr_pio: _bindgen_ty_3 = 1; +pub const mshv_ioeventfd_flag_nr_deassign: _bindgen_ty_3 = 2; +pub const mshv_ioeventfd_flag_nr_max: _bindgen_ty_3 = 3; +pub type _bindgen_ty_3 = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_ioeventfd { + pub datamatch: __u64, + pub addr: __u64, + pub len: __u32, + pub fd: __s32, + pub flags: __u32, + pub pad: [__u8; 4usize], +} +#[test] +fn bindgen_test_layout_mshv_ioeventfd() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_ioeventfd)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_ioeventfd)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).datamatch) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_ioeventfd), + "::", + stringify!(datamatch) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_ioeventfd), + "::", + stringify!(addr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_ioeventfd), + "::", + stringify!(len) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 20usize, + concat!( + "Offset of field: ", + stringify!(mshv_ioeventfd), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_ioeventfd), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 28usize, + concat!( + "Offset of field: ", + stringify!(mshv_ioeventfd), + "::", + stringify!(pad) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_msi_routing_entry { + pub gsi: __u32, + pub address_lo: __u32, + pub address_hi: __u32, + pub data: __u32, +} +#[test] +fn bindgen_test_layout_mshv_msi_routing_entry() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_msi_routing_entry)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(mshv_msi_routing_entry)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing_entry), + "::", + stringify!(gsi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_lo) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing_entry), + "::", + stringify!(address_lo) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).address_hi) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing_entry), + "::", + stringify!(address_hi) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing_entry), + "::", + stringify!(data) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct mshv_msi_routing { + pub nr: __u32, + pub pad: __u32, + pub entries: __IncompleteArrayField, +} +#[test] +fn bindgen_test_layout_mshv_msi_routing() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 8usize, + concat!("Size of: ", stringify!(mshv_msi_routing)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(mshv_msi_routing)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing), + "::", + stringify!(nr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pad) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing), + "::", + stringify!(pad) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_msi_routing), + "::", + stringify!(entries) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default)] +pub struct mshv_modify_gpa_host_access { + pub host_access: __u32, + pub flags: __u32, + pub acquire: __u8, + pub gpa_list_size: __u64, + pub gpa_list: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_mshv_modify_gpa_host_access() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(mshv_modify_gpa_host_access)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_modify_gpa_host_access)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).host_access) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_modify_gpa_host_access), + "::", + stringify!(host_access) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_modify_gpa_host_access), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).acquire) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_modify_gpa_host_access), + "::", + stringify!(acquire) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa_list_size) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_modify_gpa_host_access), + "::", + stringify!(gpa_list_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).gpa_list) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_modify_gpa_host_access), + "::", + stringify!(gpa_list) + ) + ); +} +#[repr(C)] +#[derive(Debug)] +pub struct mshv_import_isolated_pages { + pub page_type: hv_isolated_page_type, + pub page_size: hv_isolated_page_size, + pub num_pages: __u64, + pub page_number: __IncompleteArrayField<__u64>, +} +#[test] +fn bindgen_test_layout_mshv_import_isolated_pages() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 16usize, + concat!("Size of: ", stringify!(mshv_import_isolated_pages)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_import_isolated_pages)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_type) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_import_isolated_pages), + "::", + stringify!(page_type) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_size) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_import_isolated_pages), + "::", + stringify!(page_size) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).num_pages) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_import_isolated_pages), + "::", + stringify!(num_pages) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).page_number) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_import_isolated_pages), + "::", + stringify!(page_number) + ) + ); +} +impl Default for mshv_import_isolated_pages { + 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 mshv_complete_isolated_import { + pub import_data: hv_partition_complete_isolated_import_data, +} +#[test] +fn bindgen_test_layout_mshv_complete_isolated_import() { + const UNINIT: ::std::mem::MaybeUninit = + ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 3334usize, + concat!("Size of: ", stringify!(mshv_complete_isolated_import)) + ); + assert_eq!( + ::std::mem::align_of::(), + 1usize, + concat!("Alignment of ", stringify!(mshv_complete_isolated_import)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).import_data) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_complete_isolated_import), + "::", + stringify!(import_data) + ) + ); +} +impl Default for mshv_complete_isolated_import { + 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, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_root_hvcall { + pub code: __u16, + pub reps: __u16, + pub in_sz: __u16, + pub out_sz: __u16, + pub status: __u16, + pub rsvd: [__u16; 3usize], + pub in_ptr: __u64, + pub out_ptr: __u64, +} +#[test] +fn bindgen_test_layout_mshv_root_hvcall() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_root_hvcall)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_root_hvcall)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(code) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).reps) as usize - ptr as usize }, + 2usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(reps) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).in_sz) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(in_sz) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).out_sz) as usize - ptr as usize }, + 6usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(out_sz) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).status) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(status) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize }, + 10usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(rsvd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).in_ptr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(in_ptr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).out_ptr) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_root_hvcall), + "::", + stringify!(out_ptr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_create_device { + pub type_: __u32, + pub fd: __u32, + pub flags: __u32, +} +#[test] +fn bindgen_test_layout_mshv_create_device() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 12usize, + concat!("Size of: ", stringify!(mshv_create_device)) + ); + assert_eq!( + ::std::mem::align_of::(), + 4usize, + concat!("Alignment of ", stringify!(mshv_create_device)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_device), + "::", + stringify!(type_) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_device), + "::", + stringify!(fd) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_create_device), + "::", + stringify!(flags) + ) + ); +} +pub const mshv_device_type_MSHV_DEV_TYPE_VFIO: mshv_device_type = 0; +pub const mshv_device_type_MSHV_DEV_TYPE_MAX: mshv_device_type = 1; +pub type mshv_device_type = ::std::os::raw::c_uint; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_device_attr { + pub flags: __u32, + pub group: __u32, + pub attr: __u64, + pub addr: __u64, +} +#[test] +fn bindgen_test_layout_mshv_device_attr() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 24usize, + concat!("Size of: ", stringify!(mshv_device_attr)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_device_attr)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_device_attr), + "::", + stringify!(flags) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).group) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_device_attr), + "::", + stringify!(group) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).attr) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_device_attr), + "::", + stringify!(attr) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_device_attr), + "::", + stringify!(addr) + ) + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)] +pub struct mshv_trace_config { + pub mode: __u32, + pub max_buffers_count: __u32, + pub pages_per_buffer: __u32, + pub buffers_threshold: __u32, + pub time_basis: __u32, + pub system_time: __u64, +} +#[test] +fn bindgen_test_layout_mshv_trace_config() { + const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); + let ptr = UNINIT.as_ptr(); + assert_eq!( + ::std::mem::size_of::(), + 32usize, + concat!("Size of: ", stringify!(mshv_trace_config)) + ); + assert_eq!( + ::std::mem::align_of::(), + 8usize, + concat!("Alignment of ", stringify!(mshv_trace_config)) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).mode) as usize - ptr as usize }, + 0usize, + concat!( + "Offset of field: ", + stringify!(mshv_trace_config), + "::", + stringify!(mode) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).max_buffers_count) as usize - ptr as usize }, + 4usize, + concat!( + "Offset of field: ", + stringify!(mshv_trace_config), + "::", + stringify!(max_buffers_count) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).pages_per_buffer) as usize - ptr as usize }, + 8usize, + concat!( + "Offset of field: ", + stringify!(mshv_trace_config), + "::", + stringify!(pages_per_buffer) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).buffers_threshold) as usize - ptr as usize }, + 12usize, + concat!( + "Offset of field: ", + stringify!(mshv_trace_config), + "::", + stringify!(buffers_threshold) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).time_basis) as usize - ptr as usize }, + 16usize, + concat!( + "Offset of field: ", + stringify!(mshv_trace_config), + "::", + stringify!(time_basis) + ) + ); + assert_eq!( + unsafe { ::std::ptr::addr_of!((*ptr).system_time) as usize - ptr as usize }, + 24usize, + concat!( + "Offset of field: ", + stringify!(mshv_trace_config), + "::", + stringify!(system_time) + ) + ); +} diff --git a/mshv-bindings/src/arm64/mod.rs b/mshv-bindings/src/arm64/mod.rs new file mode 100644 index 00000000..c9538a70 --- /dev/null +++ b/mshv-bindings/src/arm64/mod.rs @@ -0,0 +1,18 @@ +// Copyright © 2024, Microsoft Corporation +// +// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause +// + +#[allow( + clippy::too_many_arguments, + clippy::missing_safety_doc, + clippy::useless_transmute, + clippy::unnecessary_cast, + clippy::non_canonical_clone_impl, + non_camel_case_types, + non_snake_case, + non_upper_case_globals +)] +pub mod bindings; +#[allow(ambiguous_glob_reexports, unused_imports)] +pub use bindings::*; diff --git a/mshv-bindings/src/lib.rs b/mshv-bindings/src/lib.rs index 8fed0ec8..59296c13 100644 --- a/mshv-bindings/src/lib.rs +++ b/mshv-bindings/src/lib.rs @@ -3,42 +3,20 @@ // SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause // +#[cfg(target_arch = "x86_64")] #[macro_use] #[cfg(feature = "fam-wrappers")] extern crate vmm_sys_util; -#[allow( - clippy::too_many_arguments, - clippy::missing_safety_doc, - clippy::useless_transmute, - clippy::unnecessary_cast, - clippy::non_canonical_clone_impl, - non_camel_case_types, - non_snake_case, - non_upper_case_globals -)] -pub mod bindings; -#[allow(ambiguous_glob_reexports, unused_imports)] -pub use bindings::*; -pub mod regs; -pub use regs::*; -pub mod snp; -pub use snp::*; +#[cfg(target_arch = "x86_64")] +mod x86_64; +#[cfg(target_arch = "x86_64")] +pub use self::x86_64::*; -#[cfg(feature = "with-serde")] -extern crate serde; - -#[cfg(feature = "with-serde")] -extern crate serde_derive; pub mod hvdef; pub use hvdef::*; -mod unmarshal; - -#[cfg(feature = "fam-wrappers")] -mod fam_wrappers; - -#[cfg(feature = "fam-wrappers")] -pub use fam_wrappers::*; -#[cfg(feature = "with-serde")] -mod serializers; +#[cfg(target_arch = "aarch64")] +mod arm64; +#[cfg(target_arch = "aarch64")] +pub use self::arm64::*; diff --git a/mshv-bindings/src/bindings.rs b/mshv-bindings/src/x86_64/bindings.rs similarity index 100% rename from mshv-bindings/src/bindings.rs rename to mshv-bindings/src/x86_64/bindings.rs diff --git a/mshv-bindings/src/fam_wrappers.rs b/mshv-bindings/src/x86_64/fam_wrappers.rs similarity index 100% rename from mshv-bindings/src/fam_wrappers.rs rename to mshv-bindings/src/x86_64/fam_wrappers.rs diff --git a/mshv-bindings/src/x86_64/mod.rs b/mshv-bindings/src/x86_64/mod.rs new file mode 100644 index 00000000..2c9fe980 --- /dev/null +++ b/mshv-bindings/src/x86_64/mod.rs @@ -0,0 +1,38 @@ +// Copyright © 2024, Microsoft Corporation +// +// SPDX-License-Identifier: Apache-2.0 OR BSD-3-Clause +// + +#[allow( + clippy::too_many_arguments, + clippy::missing_safety_doc, + clippy::useless_transmute, + clippy::unnecessary_cast, + clippy::non_canonical_clone_impl, + non_camel_case_types, + non_snake_case, + non_upper_case_globals +)] +pub mod bindings; +#[allow(ambiguous_glob_reexports, unused_imports)] +pub use bindings::*; +pub mod regs; +pub use regs::*; +pub mod snp; +pub use snp::*; + +#[cfg(feature = "with-serde")] +extern crate serde; + +#[cfg(feature = "with-serde")] +extern crate serde_derive; +mod unmarshal; + +#[cfg(feature = "fam-wrappers")] +mod fam_wrappers; + +#[cfg(feature = "fam-wrappers")] +pub use fam_wrappers::*; + +#[cfg(feature = "with-serde")] +mod serializers; diff --git a/mshv-bindings/src/regs.rs b/mshv-bindings/src/x86_64/regs.rs similarity index 100% rename from mshv-bindings/src/regs.rs rename to mshv-bindings/src/x86_64/regs.rs diff --git a/mshv-bindings/src/serializers.rs b/mshv-bindings/src/x86_64/serializers.rs similarity index 100% rename from mshv-bindings/src/serializers.rs rename to mshv-bindings/src/x86_64/serializers.rs diff --git a/mshv-bindings/src/snp.rs b/mshv-bindings/src/x86_64/snp.rs similarity index 100% rename from mshv-bindings/src/snp.rs rename to mshv-bindings/src/x86_64/snp.rs diff --git a/mshv-bindings/src/unmarshal.rs b/mshv-bindings/src/x86_64/unmarshal.rs similarity index 100% rename from mshv-bindings/src/unmarshal.rs rename to mshv-bindings/src/x86_64/unmarshal.rs diff --git a/scripts/generate_binding.py b/scripts/generate_binding.py index 06b9c431..fc48a9cf 100755 --- a/scripts/generate_binding.py +++ b/scripts/generate_binding.py @@ -22,14 +22,14 @@ def check_installed(cmd): return which(cmd) is not None -def install_kernel_headers(kernel_src_path): +def install_kernel_headers(kernel_src_path, arch): kernel_hdr_path = tempfile.mkdtemp(prefix="linux") logging.debug(f"Installing kernel headers at {kernel_hdr_path}") subprocess.run( [ "make", "headers_install", - "ARCH=x86", + f"ARCH={arch}", f"INSTALL_HDR_PATH={kernel_hdr_path}", "-C", kernel_src_path, @@ -94,6 +94,13 @@ def update_bindings_comment(bindings_file): f.write("".join(lines)) +def get_arch_location(arch): + if arch == "x86": + return "x86_64" + + return arch + + def main(args): bindgen = check_installed("bindgen") if not bindgen: @@ -105,13 +112,14 @@ def main(args): logging.error("Please install make.") return -1 - kernel_hdr_path = install_kernel_headers(args.kernel_src_path) + kernel_hdr_path = install_kernel_headers(args.kernel_src_path, args.arch) generate_unified_mshv_headers(kernel_hdr_path) bindgen_args = "--no-doc-comments --with-derive-default " bindgen_args += args.bindgen_args - output_file = f"{args.output}/bindings.rs" + arch_location = get_arch_location(args.arch) + output_file = f"{args.output}/{arch_location}/bindings.rs" run_bindgen(kernel_hdr_path, output_file, bindgen_args) update_bindings_comment(output_file) @@ -160,6 +168,15 @@ def main(args): help="Log level for logging (default: %(default)s)", ) + parser.add_argument( + "--arch", + "-a", + dest="arch", + choices=["x86", "arm64"], + default="x86", + help="Architecture for binding generation (default: %(default)s)", + ) + log_level = {"info": logging.INFO, "debug": logging.DEBUG, "error": logging.ERROR} args = parser.parse_args()