#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::std::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::std::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
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_TIME_OUT: u32 = 120;
pub const HV_STATUS_CALL_PENDING: u32 = 121;
pub const HV_STATUS_VTL_ALREADY_ENABLED: u32 = 134;
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 HV_X64_MSR_GUEST_OS_ID: u32 = 1073741824;
pub const HV_X64_MSR_HYPERCALL: u32 = 1073741825;
pub const HV_X64_MSR_VP_INDEX: u32 = 1073741826;
pub const HV_X64_MSR_RESET: u32 = 1073741827;
pub const HV_X64_MSR_VP_RUNTIME: u32 = 1073741840;
pub const HV_X64_MSR_TIME_REF_COUNT: u32 = 1073741856;
pub const HV_X64_MSR_REFERENCE_TSC: u32 = 1073741857;
pub const HV_X64_MSR_TSC_FREQUENCY: u32 = 1073741858;
pub const HV_X64_MSR_APIC_FREQUENCY: u32 = 1073741859;
pub const HV_X64_MSR_EOI: u32 = 1073741936;
pub const HV_X64_MSR_ICR: u32 = 1073741937;
pub const HV_X64_MSR_TPR: u32 = 1073741938;
pub const HV_X64_MSR_VP_ASSIST_PAGE: u32 = 1073741939;
pub const HV_X64_MSR_VP_ASSIST_PAGE_ENABLE: u32 = 1;
pub const HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_SHIFT: u32 = 12;
pub const HV_X64_MSR_VP_ASSIST_PAGE_ADDRESS_MASK: i32 = -4096;
pub const HV_X64_MSR_SCONTROL: u32 = 1073741952;
pub const HV_X64_MSR_SVERSION: u32 = 1073741953;
pub const HV_X64_MSR_SIEFP: u32 = 1073741954;
pub const HV_X64_MSR_SIMP: u32 = 1073741955;
pub const HV_X64_MSR_EOM: u32 = 1073741956;
pub const HV_X64_MSR_SIRBP: u32 = 1073741957;
pub const HV_X64_MSR_SINT0: u32 = 1073741968;
pub const HV_X64_MSR_SINT1: u32 = 1073741969;
pub const HV_X64_MSR_SINT2: u32 = 1073741970;
pub const HV_X64_MSR_SINT3: u32 = 1073741971;
pub const HV_X64_MSR_SINT4: u32 = 1073741972;
pub const HV_X64_MSR_SINT5: u32 = 1073741973;
pub const HV_X64_MSR_SINT6: u32 = 1073741974;
pub const HV_X64_MSR_SINT7: u32 = 1073741975;
pub const HV_X64_MSR_SINT8: u32 = 1073741976;
pub const HV_X64_MSR_SINT9: u32 = 1073741977;
pub const HV_X64_MSR_SINT10: u32 = 1073741978;
pub const HV_X64_MSR_SINT11: u32 = 1073741979;
pub const HV_X64_MSR_SINT12: u32 = 1073741980;
pub const HV_X64_MSR_SINT13: u32 = 1073741981;
pub const HV_X64_MSR_SINT14: u32 = 1073741982;
pub const HV_X64_MSR_SINT15: u32 = 1073741983;
pub const HV_X64_MSR_NESTED_SCONTROL: u32 = 1073746048;
pub const HV_X64_MSR_NESTED_SVERSION: u32 = 1073746049;
pub const HV_X64_MSR_NESTED_SIEFP: u32 = 1073746050;
pub const HV_X64_MSR_NESTED_SIMP: u32 = 1073746051;
pub const HV_X64_MSR_NESTED_EOM: u32 = 1073746052;
pub const HV_X64_MSR_NESTED_SINT0: u32 = 1073746064;
pub const HV_X64_MSR_STIMER0_CONFIG: u32 = 1073742000;
pub const HV_X64_MSR_STIMER0_COUNT: u32 = 1073742001;
pub const HV_X64_MSR_STIMER1_CONFIG: u32 = 1073742002;
pub const HV_X64_MSR_STIMER1_COUNT: u32 = 1073742003;
pub const HV_X64_MSR_STIMER2_CONFIG: u32 = 1073742004;
pub const HV_X64_MSR_STIMER2_COUNT: u32 = 1073742005;
pub const HV_X64_MSR_STIMER3_CONFIG: u32 = 1073742006;
pub const HV_X64_MSR_STIMER3_COUNT: u32 = 1073742007;
pub const HV_X64_MSR_GUEST_IDLE: u32 = 1073742064;
pub const HV_X64_MSR_CRASH_P0: u32 = 1073742080;
pub const HV_X64_MSR_CRASH_P1: u32 = 1073742081;
pub const HV_X64_MSR_CRASH_P2: u32 = 1073742082;
pub const HV_X64_MSR_CRASH_P3: u32 = 1073742083;
pub const HV_X64_MSR_CRASH_P4: u32 = 1073742084;
pub const HV_X64_MSR_CRASH_CTL: u32 = 1073742085;
pub const HV_MAXIMUM_PROCESSORS: u32 = 2048;
pub const HV_MAX_VP_INDEX: u32 = 2047;
pub const HVCALL_GET_PARTITION_PROPERTY: u32 = 68;
pub const HVCALL_SET_PARTITION_PROPERTY: u32 = 69;
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_REGISTER_INTERCEPT_RESULT: u32 = 145;
pub const HVCALL_ASSERT_VIRTUAL_INTERRUPT: u32 = 148;
pub const HVCALL_SIGNAL_EVENT_DIRECT: u32 = 192;
pub const HVCALL_POST_MESSAGE_DIRECT: u32 = 193;
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 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_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_GENERIC_SET_SHIFT: u32 = 6;
pub const HV_GENERIC_SET_MASK: u32 = 63;
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_NO_ACCESS: u32 = 65536;
pub const HV_MAP_GPA_NOT_CACHED: u32 = 2097152;
pub const HV_MAP_GPA_LARGE_PAGE: u32 = 2147483648;
pub const HV_PFN_RNG_PAGEBITS: u32 = 24;
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_SYNTHETIC_PROCESSOR_FEATURES_BANKS: u32 = 1;
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_PRIVILEGE_EXEMPT: u32 = 8;
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_ENFORCE_SMAP: u32 = 256;
pub const HV_TRANSLATE_GVA_OVERRIDE_SMAP: u32 = 512;
pub const HV_TRANSLATE_GVA_SHADOW_STACK: u32 = 1024;
pub const HV_HYPERCALL_INTERCEPT_MAX_XMM_REGISTERS: u32 = 6;
pub const HV_UNSUPPORTED_FEATURE_INTERCEPT: u32 = 1;
pub const HV_UNSUPPORTED_FEATURE_TASK_SWITCH_TSS: u32 = 2;
pub const HV_X64_PENDING_INTERRUPT: u32 = 0;
pub const HV_X64_PENDING_NMI: u32 = 2;
pub const HV_X64_PENDING_EXCEPTION: u32 = 3;
pub const HV_GPA_ATTRIBUTE_INTERCEPT_MAX_RANGES: u32 = 29;
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_RUN_VP_BUF_SZ: u32 = 256;
pub const MSHV_CREATE_DEVICE_TEST: u32 = 1;
pub const MSHV_DEV_VFIO_FILE: u32 = 1;
pub const MSHV_DEV_VFIO_FILE_ADD: u32 = 1;
pub const MSHV_DEV_VFIO_FILE_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<unsafe extern "C" fn(arg1: ::std::os::raw::c_int)>;
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_old_dev_t = ::std::os::raw::c_ulong;
pub type __kernel_long_t = ::std::os::raw::c_long;
pub type __kernel_ulong_t = ::std::os::raw::c_ulong;
pub type __kernel_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_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 __s128 = i128;
pub type __u128 = u128;
pub type __le16 = __u16;
pub type __be16 = __u16;
pub type __le32 = __u32;
pub type __be32 = __u32;
pub type __le64 = __u64;
pub type __be64 = __u64;
pub type __sum16 = __u16;
pub type __wsum = __u32;
pub type __poll_t = ::std::os::raw::c_uint;
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<hv_u128> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_u128>(),
16usize,
concat!("Size of: ", stringify!(hv_u128))
);
assert_eq!(
::std::mem::align_of::<hv_u128>(),
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)]
#[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)]
#[repr(align(8))]
#[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::<hv_gpa_page_range__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_gpa_page_range__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_gpa_page_range__bindgen_ty_1>(),
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)]
#[repr(align(8))]
#[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::<hv_gpa_page_range__bindgen_ty_2>(),
8usize,
concat!("Size of: ", stringify!(hv_gpa_page_range__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<hv_gpa_page_range__bindgen_ty_2>(),
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<hv_gpa_page_range> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_gpa_page_range>(),
8usize,
concat!("Size of: ", stringify!(hv_gpa_page_range))
);
assert_eq!(
::std::mem::align_of::<hv_gpa_page_range>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_FIXED: hv_interrupt_type = 0;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_LOWESTPRIORITY: hv_interrupt_type = 1;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_SMI: hv_interrupt_type = 2;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_REMOTEREAD: hv_interrupt_type = 3;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_NMI: hv_interrupt_type = 4;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_INIT: hv_interrupt_type = 5;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_SIPI: hv_interrupt_type = 6;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_EXTINT: hv_interrupt_type = 7;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_LOCALINT0: hv_interrupt_type = 8;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_LOCALINT1: hv_interrupt_type = 9;
pub const hv_interrupt_type_HV_X64_INTERRUPT_TYPE_MAXIMUM: hv_interrupt_type = 10;
pub type hv_interrupt_type = ::std::os::raw::c_uint;
#[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<hv_x64_xsave_xfem_register__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_xsave_xfem_register__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_xsave_xfem_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_xsave_xfem_register__bindgen_ty_1>(),
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::<hv_x64_xsave_xfem_register__bindgen_ty_2>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_xsave_xfem_register__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_xsave_xfem_register__bindgen_ty_2>(),
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<hv_x64_xsave_xfem_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_xsave_xfem_register>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_xsave_xfem_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_xsave_xfem_register>(),
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::<Self>::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::<hv_stimer_config__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_stimer_config__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_stimer_config__bindgen_ty_1>(),
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<hv_stimer_config> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_stimer_config>(),
8usize,
concat!("Size of: ", stringify!(hv_stimer_config))
);
assert_eq!(
::std::mem::align_of::<hv_stimer_config>(),
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::<Self>::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::<hv_port_id__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(hv_port_id__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_port_id__bindgen_ty_1>(),
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<hv_port_id> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_id>(),
4usize,
concat!("Size of: ", stringify!(hv_port_id))
);
assert_eq!(
::std::mem::align_of::<hv_port_id>(),
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::<Self>::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_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::<hv_message_flags__bindgen_ty_1>(),
1usize,
concat!("Size of: ", stringify!(hv_message_flags__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_message_flags__bindgen_ty_1>(),
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<hv_message_flags> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_message_flags>(),
1usize,
concat!("Size of: ", stringify!(hv_message_flags))
);
assert_eq!(
::std::mem::align_of::<hv_message_flags>(),
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::<Self>::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<hv_message_header__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_message_header__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_message_header__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_message_header__bindgen_ty_1>(),
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::<Self>::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<hv_message_header> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_message_header>(),
16usize,
concat!("Size of: ", stringify!(hv_message_header))
);
assert_eq!(
::std::mem::align_of::<hv_message_header>(),
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::<Self>::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 {
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<hv_message__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_message__bindgen_ty_1>(),
240usize,
concat!("Size of: ", stringify!(hv_message__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_message__bindgen_ty_1>(),
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::<Self>::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<hv_message> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_message>(),
256usize,
concat!("Size of: ", stringify!(hv_message))
);
assert_eq!(
::std::mem::align_of::<hv_message>(),
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::<Self>::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::<hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1>(),
2usize,
concat!(
"Size of: ",
stringify!(hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_segment_register__bindgen_ty_1__bindgen_ty_1>(),
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<hv_x64_segment_register__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_segment_register__bindgen_ty_1>(),
2usize,
concat!(
"Size of: ",
stringify!(hv_x64_segment_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_segment_register__bindgen_ty_1>(),
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::<Self>::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<hv_x64_segment_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_segment_register>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_segment_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_segment_register>(),
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::<Self>::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<hv_x64_table_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_table_register>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_table_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_table_register>(),
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::<hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_fp_control_status_register__bindgen_ty_1__bindgen_ty_1>(),
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::<Self>::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<hv_x64_fp_control_status_register__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>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_x64_fp_control_status_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_fp_control_status_register__bindgen_ty_1>(),
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::<Self>::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<hv_x64_fp_control_status_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_fp_control_status_register>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_fp_control_status_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_fp_control_status_register>(),
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::<Self>::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::<hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_xmm_control_status_register__bindgen_ty_1__bindgen_ty_1>(),
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::<Self>::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<hv_x64_xmm_control_status_register__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>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_x64_xmm_control_status_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_xmm_control_status_register__bindgen_ty_1>(),
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::<Self>::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<hv_x64_xmm_control_status_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_xmm_control_status_register>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_xmm_control_status_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_xmm_control_status_register>(),
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::<Self>::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<hv_x64_fp_register__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_fp_register__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_fp_register__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_x64_fp_register__bindgen_ty_1>(),
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<hv_x64_fp_register> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_fp_register>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_fp_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_fp_register>(),
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::<Self>::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::<hv_x64_msr_npiep_config_contents__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_msr_npiep_config_contents__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_msr_npiep_config_contents__bindgen_ty_1>(),
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<hv_x64_msr_npiep_config_contents> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_msr_npiep_config_contents>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_msr_npiep_config_contents))
);
assert_eq!(
::std::mem::align_of::<hv_x64_msr_npiep_config_contents>(),
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::<Self>::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, packed)]
#[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::<hv_input_vtl__bindgen_ty_1>(),
1usize,
concat!("Size of: ", stringify!(hv_input_vtl__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_input_vtl__bindgen_ty_1>(),
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<hv_input_vtl> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_vtl>(),
1usize,
concat!("Size of: ", stringify!(hv_input_vtl))
);
assert_eq!(
::std::mem::align_of::<hv_input_vtl>(),
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::<Self>::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)]
#[repr(align(8))]
#[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::<hv_register_vsm_partition_config__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_register_vsm_partition_config__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_register_vsm_partition_config__bindgen_ty_1>(),
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<hv_register_vsm_partition_config> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_vsm_partition_config>(),
8usize,
concat!("Size of: ", stringify!(hv_register_vsm_partition_config))
);
assert_eq!(
::std::mem::align_of::<hv_register_vsm_partition_config>(),
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::<Self>::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 const hv_register_name_HV_REGISTER_PENDING_INTERRUPTION: hv_register_name = 65538;
pub const hv_register_name_HV_REGISTER_INTERRUPT_STATE: hv_register_name = 65539;
pub const hv_register_name_HV_X64_REGISTER_DELIVERABILITY_NOTIFICATIONS: hv_register_name = 65542;
pub const hv_register_name_HV_X64_REGISTER_PENDING_DEBUG_EXCEPTION: hv_register_name = 65543;
pub const hv_register_name_HV_X64_REGISTER_RAX: hv_register_name = 131072;
pub const hv_register_name_HV_X64_REGISTER_RCX: hv_register_name = 131073;
pub const hv_register_name_HV_X64_REGISTER_RDX: hv_register_name = 131074;
pub const hv_register_name_HV_X64_REGISTER_RBX: hv_register_name = 131075;
pub const hv_register_name_HV_X64_REGISTER_RSP: hv_register_name = 131076;
pub const hv_register_name_HV_X64_REGISTER_RBP: hv_register_name = 131077;
pub const hv_register_name_HV_X64_REGISTER_RSI: hv_register_name = 131078;
pub const hv_register_name_HV_X64_REGISTER_RDI: hv_register_name = 131079;
pub const hv_register_name_HV_X64_REGISTER_R8: hv_register_name = 131080;
pub const hv_register_name_HV_X64_REGISTER_R9: hv_register_name = 131081;
pub const hv_register_name_HV_X64_REGISTER_R10: hv_register_name = 131082;
pub const hv_register_name_HV_X64_REGISTER_R11: hv_register_name = 131083;
pub const hv_register_name_HV_X64_REGISTER_R12: hv_register_name = 131084;
pub const hv_register_name_HV_X64_REGISTER_R13: hv_register_name = 131085;
pub const hv_register_name_HV_X64_REGISTER_R14: hv_register_name = 131086;
pub const hv_register_name_HV_X64_REGISTER_R15: hv_register_name = 131087;
pub const hv_register_name_HV_X64_REGISTER_RIP: hv_register_name = 131088;
pub const hv_register_name_HV_X64_REGISTER_RFLAGS: hv_register_name = 131089;
pub const hv_register_name_HV_X64_REGISTER_XMM0: hv_register_name = 196608;
pub const hv_register_name_HV_X64_REGISTER_XMM1: hv_register_name = 196609;
pub const hv_register_name_HV_X64_REGISTER_XMM2: hv_register_name = 196610;
pub const hv_register_name_HV_X64_REGISTER_XMM3: hv_register_name = 196611;
pub const hv_register_name_HV_X64_REGISTER_XMM4: hv_register_name = 196612;
pub const hv_register_name_HV_X64_REGISTER_XMM5: hv_register_name = 196613;
pub const hv_register_name_HV_X64_REGISTER_XMM6: hv_register_name = 196614;
pub const hv_register_name_HV_X64_REGISTER_XMM7: hv_register_name = 196615;
pub const hv_register_name_HV_X64_REGISTER_XMM8: hv_register_name = 196616;
pub const hv_register_name_HV_X64_REGISTER_XMM9: hv_register_name = 196617;
pub const hv_register_name_HV_X64_REGISTER_XMM10: hv_register_name = 196618;
pub const hv_register_name_HV_X64_REGISTER_XMM11: hv_register_name = 196619;
pub const hv_register_name_HV_X64_REGISTER_XMM12: hv_register_name = 196620;
pub const hv_register_name_HV_X64_REGISTER_XMM13: hv_register_name = 196621;
pub const hv_register_name_HV_X64_REGISTER_XMM14: hv_register_name = 196622;
pub const hv_register_name_HV_X64_REGISTER_XMM15: hv_register_name = 196623;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX0: hv_register_name = 196624;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX1: hv_register_name = 196625;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX2: hv_register_name = 196626;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX3: hv_register_name = 196627;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX4: hv_register_name = 196628;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX5: hv_register_name = 196629;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX6: hv_register_name = 196630;
pub const hv_register_name_HV_X64_REGISTER_FP_MMX7: hv_register_name = 196631;
pub const hv_register_name_HV_X64_REGISTER_FP_CONTROL_STATUS: hv_register_name = 196632;
pub const hv_register_name_HV_X64_REGISTER_XMM_CONTROL_STATUS: hv_register_name = 196633;
pub const hv_register_name_HV_X64_REGISTER_CR0: hv_register_name = 262144;
pub const hv_register_name_HV_X64_REGISTER_CR2: hv_register_name = 262145;
pub const hv_register_name_HV_X64_REGISTER_CR3: hv_register_name = 262146;
pub const hv_register_name_HV_X64_REGISTER_CR4: hv_register_name = 262147;
pub const hv_register_name_HV_X64_REGISTER_CR8: hv_register_name = 262148;
pub const hv_register_name_HV_X64_REGISTER_XFEM: hv_register_name = 262149;
pub const hv_register_name_HV_X64_REGISTER_INTERMEDIATE_CR0: hv_register_name = 266240;
pub const hv_register_name_HV_X64_REGISTER_INTERMEDIATE_CR4: hv_register_name = 266243;
pub const hv_register_name_HV_X64_REGISTER_INTERMEDIATE_CR8: hv_register_name = 266244;
pub const hv_register_name_HV_X64_REGISTER_DR0: hv_register_name = 327680;
pub const hv_register_name_HV_X64_REGISTER_DR1: hv_register_name = 327681;
pub const hv_register_name_HV_X64_REGISTER_DR2: hv_register_name = 327682;
pub const hv_register_name_HV_X64_REGISTER_DR3: hv_register_name = 327683;
pub const hv_register_name_HV_X64_REGISTER_DR6: hv_register_name = 327684;
pub const hv_register_name_HV_X64_REGISTER_DR7: hv_register_name = 327685;
pub const hv_register_name_HV_X64_REGISTER_ES: hv_register_name = 393216;
pub const hv_register_name_HV_X64_REGISTER_CS: hv_register_name = 393217;
pub const hv_register_name_HV_X64_REGISTER_SS: hv_register_name = 393218;
pub const hv_register_name_HV_X64_REGISTER_DS: hv_register_name = 393219;
pub const hv_register_name_HV_X64_REGISTER_FS: hv_register_name = 393220;
pub const hv_register_name_HV_X64_REGISTER_GS: hv_register_name = 393221;
pub const hv_register_name_HV_X64_REGISTER_LDTR: hv_register_name = 393222;
pub const hv_register_name_HV_X64_REGISTER_TR: hv_register_name = 393223;
pub const hv_register_name_HV_X64_REGISTER_IDTR: hv_register_name = 458752;
pub const hv_register_name_HV_X64_REGISTER_GDTR: hv_register_name = 458753;
pub const hv_register_name_HV_X64_REGISTER_TSC: hv_register_name = 524288;
pub const hv_register_name_HV_X64_REGISTER_EFER: hv_register_name = 524289;
pub const hv_register_name_HV_X64_REGISTER_KERNEL_GS_BASE: hv_register_name = 524290;
pub const hv_register_name_HV_X64_REGISTER_APIC_BASE: hv_register_name = 524291;
pub const hv_register_name_HV_X64_REGISTER_PAT: hv_register_name = 524292;
pub const hv_register_name_HV_X64_REGISTER_SYSENTER_CS: hv_register_name = 524293;
pub const hv_register_name_HV_X64_REGISTER_SYSENTER_EIP: hv_register_name = 524294;
pub const hv_register_name_HV_X64_REGISTER_SYSENTER_ESP: hv_register_name = 524295;
pub const hv_register_name_HV_X64_REGISTER_STAR: hv_register_name = 524296;
pub const hv_register_name_HV_X64_REGISTER_LSTAR: hv_register_name = 524297;
pub const hv_register_name_HV_X64_REGISTER_CSTAR: hv_register_name = 524298;
pub const hv_register_name_HV_X64_REGISTER_SFMASK: hv_register_name = 524299;
pub const hv_register_name_HV_X64_REGISTER_INITIAL_APIC_ID: hv_register_name = 524300;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_CAP: hv_register_name = 524301;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_DEF_TYPE: hv_register_name = 524302;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE0: hv_register_name = 524304;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE1: hv_register_name = 524305;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE2: hv_register_name = 524306;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE3: hv_register_name = 524307;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE4: hv_register_name = 524308;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE5: hv_register_name = 524309;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE6: hv_register_name = 524310;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE7: hv_register_name = 524311;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE8: hv_register_name = 524312;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASE9: hv_register_name = 524313;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASEA: hv_register_name = 524314;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASEB: hv_register_name = 524315;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASEC: hv_register_name = 524316;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASED: hv_register_name = 524317;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASEE: hv_register_name = 524318;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_BASEF: hv_register_name = 524319;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK0: hv_register_name = 524352;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK1: hv_register_name = 524353;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK2: hv_register_name = 524354;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK3: hv_register_name = 524355;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK4: hv_register_name = 524356;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK5: hv_register_name = 524357;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK6: hv_register_name = 524358;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK7: hv_register_name = 524359;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK8: hv_register_name = 524360;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASK9: hv_register_name = 524361;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASKA: hv_register_name = 524362;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASKB: hv_register_name = 524363;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASKC: hv_register_name = 524364;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASKD: hv_register_name = 524365;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASKE: hv_register_name = 524366;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_PHYS_MASKF: hv_register_name = 524367;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX64K00000: hv_register_name = 524400;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX16K80000: hv_register_name = 524401;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX16KA0000: hv_register_name = 524402;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KC0000: hv_register_name = 524403;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KC8000: hv_register_name = 524404;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KD0000: hv_register_name = 524405;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KD8000: hv_register_name = 524406;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KE0000: hv_register_name = 524407;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KE8000: hv_register_name = 524408;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KF0000: hv_register_name = 524409;
pub const hv_register_name_HV_X64_REGISTER_MSR_MTRR_FIX4KF8000: hv_register_name = 524410;
pub const hv_register_name_HV_X64_REGISTER_TSC_AUX: hv_register_name = 524411;
pub const hv_register_name_HV_X64_REGISTER_BNDCFGS: hv_register_name = 524412;
pub const hv_register_name_HV_X64_REGISTER_DEBUG_CTL: hv_register_name = 524413;
pub const hv_register_name_HV_X64_REGISTER_AVAILABLE0008007E: hv_register_name = 524414;
pub const hv_register_name_HV_X64_REGISTER_AVAILABLE0008007F: hv_register_name = 524415;
pub const hv_register_name_HV_X64_REGISTER_SGX_LAUNCH_CONTROL0: hv_register_name = 524416;
pub const hv_register_name_HV_X64_REGISTER_SGX_LAUNCH_CONTROL1: hv_register_name = 524417;
pub const hv_register_name_HV_X64_REGISTER_SGX_LAUNCH_CONTROL2: hv_register_name = 524418;
pub const hv_register_name_HV_X64_REGISTER_SGX_LAUNCH_CONTROL3: hv_register_name = 524419;
pub const hv_register_name_HV_X64_REGISTER_SPEC_CTRL: hv_register_name = 524420;
pub const hv_register_name_HV_X64_REGISTER_PRED_CMD: hv_register_name = 524421;
pub const hv_register_name_HV_X64_REGISTER_VIRT_SPEC_CTRL: hv_register_name = 524422;
pub const hv_register_name_HV_X64_REGISTER_TSC_ADJUST: hv_register_name = 524438;
pub const hv_register_name_HV_X64_REGISTER_MSR_IA32_MISC_ENABLE: hv_register_name = 524448;
pub const hv_register_name_HV_X64_REGISTER_IA32_FEATURE_CONTROL: hv_register_name = 524449;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_BASIC: hv_register_name = 524450;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_PINBASED_CTLS: hv_register_name = 524451;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_PROCBASED_CTLS: hv_register_name = 524452;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_EXIT_CTLS: hv_register_name = 524453;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_ENTRY_CTLS: hv_register_name = 524454;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_MISC: hv_register_name = 524455;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_CR0_FIXED0: hv_register_name = 524456;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_CR0_FIXED1: hv_register_name = 524457;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_CR4_FIXED0: hv_register_name = 524458;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_CR4_FIXED1: hv_register_name = 524459;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_VMCS_ENUM: hv_register_name = 524460;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_PROCBASED_CTLS2: hv_register_name = 524461;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_EPT_VPID_CAP: hv_register_name = 524462;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_TRUE_PINBASED_CTLS: hv_register_name = 524463;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_TRUE_PROCBASED_CTLS: hv_register_name = 524464;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_TRUE_EXIT_CTLS: hv_register_name = 524465;
pub const hv_register_name_HV_X64_REGISTER_IA32_VMX_TRUE_ENTRY_CTLS: hv_register_name = 524466;
pub const hv_register_name_HV_X64_REGISTER_PERF_GLOBAL_CTRL: hv_register_name = 528384;
pub const hv_register_name_HV_X64_REGISTER_PERF_GLOBAL_STATUS: hv_register_name = 528385;
pub const hv_register_name_HV_X64_REGISTER_PERF_GLOBAL_IN_USE: hv_register_name = 528386;
pub const hv_register_name_HV_X64_REGISTER_FIXED_CTR_CTRL: hv_register_name = 528387;
pub const hv_register_name_HV_X64_REGISTER_DS_AREA: hv_register_name = 528388;
pub const hv_register_name_HV_X64_REGISTER_PEBS_ENABLE: hv_register_name = 528389;
pub const hv_register_name_HV_X64_REGISTER_PEBS_LD_LAT: hv_register_name = 528390;
pub const hv_register_name_HV_X64_REGISTER_PEBS_FRONTEND: hv_register_name = 528391;
pub const hv_register_name_HV_X64_REGISTER_PERF_EVT_SEL0: hv_register_name = 528640;
pub const hv_register_name_HV_X64_REGISTER_PMC0: hv_register_name = 528896;
pub const hv_register_name_HV_X64_REGISTER_FIXED_CTR0: hv_register_name = 529152;
pub const hv_register_name_HV_X64_REGISTER_LBR_TOS: hv_register_name = 532480;
pub const hv_register_name_HV_X64_REGISTER_LBR_SELECT: hv_register_name = 532481;
pub const hv_register_name_HV_X64_REGISTER_LER_FROM_LIP: hv_register_name = 532482;
pub const hv_register_name_HV_X64_REGISTER_LER_TO_LIP: hv_register_name = 532483;
pub const hv_register_name_HV_X64_REGISTER_LBR_FROM0: hv_register_name = 532736;
pub const hv_register_name_HV_X64_REGISTER_LBR_TO0: hv_register_name = 532992;
pub const hv_register_name_HV_X64_REGISTER_LBR_INFO0: hv_register_name = 537344;
pub const hv_register_name_HV_X64_REGISTER_RTIT_CTL: hv_register_name = 528392;
pub const hv_register_name_HV_X64_REGISTER_RTIT_STATUS: hv_register_name = 528393;
pub const hv_register_name_HV_X64_REGISTER_RTIT_OUTPUT_BASE: hv_register_name = 528394;
pub const hv_register_name_HV_X64_REGISTER_RTIT_OUTPUT_MASK_PTRS: hv_register_name = 528395;
pub const hv_register_name_HV_X64_REGISTER_RTIT_CR3_MATCH: hv_register_name = 528396;
pub const hv_register_name_HV_X64_REGISTER_RTIT_ADDR0A: hv_register_name = 529408;
pub const hv_register_name_HV_X64_REGISTER_APIC_ID: hv_register_name = 542722;
pub const hv_register_name_HV_X64_REGISTER_APIC_VERSION: hv_register_name = 542723;
pub const hv_register_name_HV_X64_REGISTER_HYPERCALL: hv_register_name = 589825;
pub const hv_register_name_HV_X64_REGISTER_SYNTHETIC_EOI: hv_register_name = 589840;
pub const hv_register_name_HV_X64_REGISTER_SYNTHETIC_ICR: hv_register_name = 589841;
pub const hv_register_name_HV_X64_REGISTER_SYNTHETIC_TPR: hv_register_name = 589842;
pub const hv_register_name_HV_X64_REGISTER_REG_PAGE: hv_register_name = 589852;
pub const hv_register_name_HV_X64_REGISTER_GHCB: hv_register_name = 589849;
pub const hv_register_name_HV_X64_REGISTER_EMULATED_TIMER_PERIOD: hv_register_name = 589872;
pub const hv_register_name_HV_X64_REGISTER_EMULATED_TIMER_CONTROL: hv_register_name = 589873;
pub const hv_register_name_HV_X64_REGISTER_PM_TIMER_ASSIST: hv_register_name = 589874;
pub const hv_register_name_HV_X64_REGISTER_SEV_CONTROL: hv_register_name = 589888;
pub const hv_register_name_HV_X64_REGISTER_SEV_GHCB_GPA: hv_register_name = 589889;
pub const hv_register_name_HV_X64_REGISTER_SEV_DOORBELL_GPA: hv_register_name = 589890;
pub const hv_register_name_HV_X64_REGISTER_CR_INTERCEPT_CONTROL: hv_register_name = 917504;
pub const hv_register_name_HV_X64_REGISTER_CR_INTERCEPT_CR0_MASK: hv_register_name = 917505;
pub const hv_register_name_HV_X64_REGISTER_CR_INTERCEPT_CR4_MASK: hv_register_name = 917506;
pub const hv_register_name_HV_X64_REGISTER_CR_INTERCEPT_IA32_MISC_ENABLE_MASK: hv_register_name =
917507;
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::<hv_explicit_suspend_register__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_explicit_suspend_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_explicit_suspend_register__bindgen_ty_1>(),
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<hv_explicit_suspend_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_explicit_suspend_register>(),
8usize,
concat!("Size of: ", stringify!(hv_explicit_suspend_register))
);
assert_eq!(
::std::mem::align_of::<hv_explicit_suspend_register>(),
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::<Self>::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::<hv_intercept_suspend_register__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_intercept_suspend_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_intercept_suspend_register__bindgen_ty_1>(),
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<hv_intercept_suspend_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_intercept_suspend_register>(),
8usize,
concat!("Size of: ", stringify!(hv_intercept_suspend_register))
);
assert_eq!(
::std::mem::align_of::<hv_intercept_suspend_register>(),
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::<Self>::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::<hv_internal_activity_register__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_internal_activity_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_internal_activity_register__bindgen_ty_1>(),
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<hv_internal_activity_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_internal_activity_register>(),
8usize,
concat!("Size of: ", stringify!(hv_internal_activity_register))
);
assert_eq!(
::std::mem::align_of::<hv_internal_activity_register>(),
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::<Self>::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::<hv_x64_interrupt_state_register__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_interrupt_state_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_interrupt_state_register__bindgen_ty_1>(),
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<hv_x64_interrupt_state_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_interrupt_state_register>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_interrupt_state_register))
);
assert_eq!(
::std::mem::align_of::<hv_x64_interrupt_state_register>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_pending_exception_event {
pub as_uint64: [__u64; 2usize],
pub __bindgen_anon_1: hv_x64_pending_exception_event__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_pending_exception_event__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub error_code: __u32,
pub exception_parameter: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_pending_exception_event__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_pending_exception_event__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_pending_exception_event__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_x64_pending_exception_event__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_pending_exception_event__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_pending_exception_event__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_exception_event__bindgen_ty_1),
"::",
stringify!(error_code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exception_parameter) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_exception_event__bindgen_ty_1),
"::",
stringify!(exception_parameter)
)
);
}
impl hv_x64_pending_exception_event__bindgen_ty_1 {
#[inline]
pub fn event_pending(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_event_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 event_type(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) }
}
#[inline]
pub fn set_event_type(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 3u8, val as u64)
}
}
#[inline]
pub fn reserved0(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) }
}
#[inline]
pub fn set_reserved0(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 4u8, val as u64)
}
}
#[inline]
pub fn deliver_error_code(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 1u8) as u32) }
}
#[inline]
pub fn set_deliver_error_code(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 1u8, val as u64)
}
}
#[inline]
pub fn reserved1(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 7u8) as u32) }
}
#[inline]
pub fn set_reserved1(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(9usize, 7u8, val as u64)
}
}
#[inline]
pub fn vector(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
}
#[inline]
pub fn set_vector(&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(
event_pending: __u32,
event_type: __u32,
reserved0: __u32,
deliver_error_code: __u32,
reserved1: __u32,
vector: __u32,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let event_pending: u32 = unsafe { ::std::mem::transmute(event_pending) };
event_pending as u64
});
__bindgen_bitfield_unit.set(1usize, 3u8, {
let event_type: u32 = unsafe { ::std::mem::transmute(event_type) };
event_type as u64
});
__bindgen_bitfield_unit.set(4usize, 4u8, {
let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) };
reserved0 as u64
});
__bindgen_bitfield_unit.set(8usize, 1u8, {
let deliver_error_code: u32 = unsafe { ::std::mem::transmute(deliver_error_code) };
deliver_error_code as u64
});
__bindgen_bitfield_unit.set(9usize, 7u8, {
let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) };
reserved1 as u64
});
__bindgen_bitfield_unit.set(16usize, 16u8, {
let vector: u32 = unsafe { ::std::mem::transmute(vector) };
vector as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_pending_exception_event() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_pending_exception_event> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_pending_exception_event>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_pending_exception_event))
);
assert_eq!(
::std::mem::align_of::<hv_x64_pending_exception_event>(),
8usize,
concat!("Alignment of ", stringify!(hv_x64_pending_exception_event))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_exception_event),
"::",
stringify!(as_uint64)
)
);
}
impl Default for hv_x64_pending_exception_event {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_pending_virtualization_fault_event {
pub as_uint64: [__u64; 2usize],
pub __bindgen_anon_1: hv_x64_pending_virtualization_fault_event__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_pending_virtualization_fault_event__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub code: __u32,
pub parameter1: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_pending_virtualization_fault_event__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_pending_virtualization_fault_event__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_pending_virtualization_fault_event__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_x64_pending_virtualization_fault_event__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_pending_virtualization_fault_event__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_pending_virtualization_fault_event__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).code) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_virtualization_fault_event__bindgen_ty_1),
"::",
stringify!(code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).parameter1) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_virtualization_fault_event__bindgen_ty_1),
"::",
stringify!(parameter1)
)
);
}
impl hv_x64_pending_virtualization_fault_event__bindgen_ty_1 {
#[inline]
pub fn event_pending(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_event_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 event_type(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) }
}
#[inline]
pub fn set_event_type(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 3u8, val as u64)
}
}
#[inline]
pub fn reserved0(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u32) }
}
#[inline]
pub fn set_reserved0(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 4u8, val as u64)
}
}
#[inline]
pub fn reserved1(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_reserved1(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub fn parameter0(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
}
#[inline]
pub fn set_parameter0(&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(
event_pending: __u32,
event_type: __u32,
reserved0: __u32,
reserved1: __u32,
parameter0: __u32,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let event_pending: u32 = unsafe { ::std::mem::transmute(event_pending) };
event_pending as u64
});
__bindgen_bitfield_unit.set(1usize, 3u8, {
let event_type: u32 = unsafe { ::std::mem::transmute(event_type) };
event_type as u64
});
__bindgen_bitfield_unit.set(4usize, 4u8, {
let reserved0: u32 = unsafe { ::std::mem::transmute(reserved0) };
reserved0 as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let reserved1: u32 = unsafe { ::std::mem::transmute(reserved1) };
reserved1 as u64
});
__bindgen_bitfield_unit.set(16usize, 16u8, {
let parameter0: u32 = unsafe { ::std::mem::transmute(parameter0) };
parameter0 as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_pending_virtualization_fault_event() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_pending_virtualization_fault_event> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_pending_virtualization_fault_event>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_x64_pending_virtualization_fault_event)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_pending_virtualization_fault_event>(),
8usize,
concat!(
"Alignment of ",
stringify!(hv_x64_pending_virtualization_fault_event)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_uint64) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_virtualization_fault_event),
"::",
stringify!(as_uint64)
)
);
}
impl Default for hv_x64_pending_virtualization_fault_event {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_pending_interruption_register {
pub as_uint64: __u64,
pub __bindgen_anon_1: hv_x64_pending_interruption_register__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_pending_interruption_register__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub error_code: __u32,
}
#[test]
fn bindgen_test_layout_hv_x64_pending_interruption_register__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_pending_interruption_register__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_pending_interruption_register__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_pending_interruption_register__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_pending_interruption_register__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_pending_interruption_register__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_pending_interruption_register__bindgen_ty_1),
"::",
stringify!(error_code)
)
);
}
impl hv_x64_pending_interruption_register__bindgen_ty_1 {
#[inline]
pub fn interruption_pending(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_interruption_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 interruption_type(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 3u8) as u32) }
}
#[inline]
pub fn set_interruption_type(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 3u8, val as u64)
}
}
#[inline]
pub fn deliver_error_code(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) }
}
#[inline]
pub fn set_deliver_error_code(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn instruction_length(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 4u8) as u32) }
}
#[inline]
pub fn set_instruction_length(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 4u8, val as u64)
}
}
#[inline]
pub fn nested_event(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(9usize, 1u8) as u32) }
}
#[inline]
pub fn set_nested_event(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(9usize, 1u8, val as u64)
}
}
#[inline]
pub fn reserved(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 6u8) as u32) }
}
#[inline]
pub fn set_reserved(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(10usize, 6u8, val as u64)
}
}
#[inline]
pub fn interruption_vector(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 16u8) as u32) }
}
#[inline]
pub fn set_interruption_vector(&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(
interruption_pending: __u32,
interruption_type: __u32,
deliver_error_code: __u32,
instruction_length: __u32,
nested_event: __u32,
reserved: __u32,
interruption_vector: __u32,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let interruption_pending: u32 = unsafe { ::std::mem::transmute(interruption_pending) };
interruption_pending as u64
});
__bindgen_bitfield_unit.set(1usize, 3u8, {
let interruption_type: u32 = unsafe { ::std::mem::transmute(interruption_type) };
interruption_type as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let deliver_error_code: u32 = unsafe { ::std::mem::transmute(deliver_error_code) };
deliver_error_code as u64
});
__bindgen_bitfield_unit.set(5usize, 4u8, {
let instruction_length: u32 = unsafe { ::std::mem::transmute(instruction_length) };
instruction_length as u64
});
__bindgen_bitfield_unit.set(9usize, 1u8, {
let nested_event: u32 = unsafe { ::std::mem::transmute(nested_event) };
nested_event as u64
});
__bindgen_bitfield_unit.set(10usize, 6u8, {
let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
reserved as u64
});
__bindgen_bitfield_unit.set(16usize, 16u8, {
let interruption_vector: u32 = unsafe { ::std::mem::transmute(interruption_vector) };
interruption_vector as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_pending_interruption_register() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_pending_interruption_register> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_pending_interruption_register>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_pending_interruption_register)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_pending_interruption_register>(),
8usize,
concat!(
"Alignment of ",
stringify!(hv_x64_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_x64_pending_interruption_register),
"::",
stringify!(as_uint64)
)
);
}
impl Default for hv_x64_pending_interruption_register {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_register_sev_control {
pub as_uint64: __u64,
pub __bindgen_anon_1: hv_x64_register_sev_control__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_register_sev_control__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_register_sev_control__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_register_sev_control__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_register_sev_control__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_sev_control__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_register_sev_control__bindgen_ty_1)
)
);
}
impl hv_x64_register_sev_control__bindgen_ty_1 {
#[inline]
pub fn enable_encrypted_state(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
}
#[inline]
pub fn set_enable_encrypted_state(&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, 11u8) 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, 11u8, val as u64)
}
}
#[inline]
pub fn vmsa_gpa_page_number(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 52u8) as u64) }
}
#[inline]
pub fn set_vmsa_gpa_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(
enable_encrypted_state: __u64,
reserved_z: __u64,
vmsa_gpa_page_number: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let enable_encrypted_state: u64 =
unsafe { ::std::mem::transmute(enable_encrypted_state) };
enable_encrypted_state as u64
});
__bindgen_bitfield_unit.set(1usize, 11u8, {
let reserved_z: u64 = unsafe { ::std::mem::transmute(reserved_z) };
reserved_z as u64
});
__bindgen_bitfield_unit.set(12usize, 52u8, {
let vmsa_gpa_page_number: u64 = unsafe { ::std::mem::transmute(vmsa_gpa_page_number) };
vmsa_gpa_page_number as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_register_sev_control() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_register_sev_control> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_register_sev_control>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_register_sev_control))
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_sev_control>(),
8usize,
concat!("Alignment of ", stringify!(hv_x64_register_sev_control))
);
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_control),
"::",
stringify!(as_uint64)
)
);
}
impl Default for hv_x64_register_sev_control {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_register_value {
pub reg128: hv_u128,
pub reg64: __u64,
pub reg32: __u32,
pub reg16: __u16,
pub reg8: __u8,
pub fp: hv_x64_fp_register,
pub fp_control_status: hv_x64_fp_control_status_register,
pub xmm_control_status: hv_x64_xmm_control_status_register,
pub segment: hv_x64_segment_register,
pub table: hv_x64_table_register,
pub explicit_suspend: hv_explicit_suspend_register,
pub intercept_suspend: hv_intercept_suspend_register,
pub internal_activity: hv_internal_activity_register,
pub interrupt_state: hv_x64_interrupt_state_register,
pub pending_interruption: hv_x64_pending_interruption_register,
pub npiep_config: hv_x64_msr_npiep_config_contents,
pub pending_exception_event: hv_x64_pending_exception_event,
pub pending_virtualization_fault_event: hv_x64_pending_virtualization_fault_event,
pub sev_control: hv_x64_register_sev_control,
}
#[test]
fn bindgen_test_layout_hv_register_value() {
const UNINIT: ::std::mem::MaybeUninit<hv_register_value> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_value>(),
16usize,
concat!("Size of: ", stringify!(hv_register_value))
);
assert_eq!(
::std::mem::align_of::<hv_register_value>(),
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).fp) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(fp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fp_control_status) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(fp_control_status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm_control_status) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(xmm_control_status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).segment) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(segment)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).table) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(table)
)
);
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).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).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_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).npiep_config) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(npiep_config)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pending_exception_event) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(pending_exception_event)
)
);
assert_eq!(
unsafe {
::std::ptr::addr_of!((*ptr).pending_virtualization_fault_event) as usize - ptr as usize
},
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(pending_virtualization_fault_event)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sev_control) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_value),
"::",
stringify!(sev_control)
)
);
}
impl Default for hv_register_value {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, 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<hv_register_assoc> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_assoc>(),
32usize,
concat!("Size of: ", stringify!(hv_register_assoc))
);
assert_eq!(
::std::mem::align_of::<hv_register_assoc>(),
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::<Self>::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<hv_input_get_vp_registers> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_get_vp_registers>(),
16usize,
concat!("Size of: ", stringify!(hv_input_get_vp_registers))
);
assert_eq!(
::std::mem::align_of::<hv_input_get_vp_registers>(),
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::<Self>::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<hv_register_assoc>,
}
#[test]
fn bindgen_test_layout_hv_input_set_vp_registers() {
const UNINIT: ::std::mem::MaybeUninit<hv_input_set_vp_registers> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_set_vp_registers>(),
16usize,
concat!("Size of: ", stringify!(hv_input_set_vp_registers))
);
assert_eq!(
::std::mem::align_of::<hv_input_set_vp_registers>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_IO_PORT: hv_intercept_type = 0;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_MSR: hv_intercept_type = 1;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_CPUID: hv_intercept_type = 2;
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_X64_GLOBAL_CPUID: hv_intercept_type = 6;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_APIC_SMI: hv_intercept_type = 7;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_HYPERCALL: hv_intercept_type = 8;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_APIC_INIT_SIPI: hv_intercept_type = 9;
pub const hv_intercept_type_HV_INTERCEPT_MC_UPDATE_PATCH_LEVEL_MSR_READ: hv_intercept_type = 10;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_APIC_WRITE: hv_intercept_type = 11;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_X64_MSR_INDEX: hv_intercept_type = 12;
pub const hv_intercept_type_HV_INTERCEPT_TYPE_MAX: hv_intercept_type = 13;
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,
pub io_port: __u16,
pub cpuid_index: __u32,
pub apic_write_mask: __u32,
pub exception_vector: __u16,
pub msr_index: __u32,
}
#[test]
fn bindgen_test_layout_hv_intercept_parameters() {
const UNINIT: ::std::mem::MaybeUninit<hv_intercept_parameters> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_intercept_parameters>(),
8usize,
concat!("Size of: ", stringify!(hv_intercept_parameters))
);
assert_eq!(
::std::mem::align_of::<hv_intercept_parameters>(),
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)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).io_port) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_intercept_parameters),
"::",
stringify!(io_port)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpuid_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_intercept_parameters),
"::",
stringify!(cpuid_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_write_mask) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_intercept_parameters),
"::",
stringify!(apic_write_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exception_vector) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_intercept_parameters),
"::",
stringify!(exception_vector)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msr_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_intercept_parameters),
"::",
stringify!(msr_index)
)
);
}
impl Default for hv_intercept_parameters {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, 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<hv_input_install_intercept> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_install_intercept>(),
24usize,
concat!("Size of: ", stringify!(hv_input_install_intercept))
);
assert_eq!(
::std::mem::align_of::<hv_input_install_intercept>(),
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::<Self>::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_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::<hv_x64_register_sev_ghcb__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_register_sev_ghcb__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_sev_ghcb__bindgen_ty_1>(),
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<hv_x64_register_sev_ghcb> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_register_sev_ghcb>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_register_sev_ghcb))
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_sev_ghcb>(),
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::<Self>::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::<hv_x64_register_sev_hv_doorbell__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_register_sev_hv_doorbell__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_sev_hv_doorbell__bindgen_ty_1>(),
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<hv_x64_register_sev_hv_doorbell> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_register_sev_hv_doorbell>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_register_sev_hv_doorbell))
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_sev_hv_doorbell>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const hv_unimplemented_msr_action_HV_UNIMPLEMENTED_MSR_ACTION_FAULT:
hv_unimplemented_msr_action = 0;
pub const hv_unimplemented_msr_action_HV_UNIMPLEMENTED_MSR_ACTION_IGNORE_WRITE_READ_ZERO:
hv_unimplemented_msr_action = 1;
pub const hv_unimplemented_msr_action_HV_UNIMPLEMENTED_MSR_ACTION_COUNT:
hv_unimplemented_msr_action = 2;
pub type hv_unimplemented_msr_action = ::std::os::raw::c_uint;
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_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;
#[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::<hv_pfn_range__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_pfn_range__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_pfn_range__bindgen_ty_1>(),
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<hv_pfn_range> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_pfn_range>(),
8usize,
concat!("Size of: ", stringify!(hv_pfn_range))
);
assert_eq!(
::std::mem::align_of::<hv_pfn_range>(),
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::<Self>::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::<hv_snp_guest_policy__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_snp_guest_policy__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_snp_guest_policy__bindgen_ty_1>(),
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<hv_snp_guest_policy> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_snp_guest_policy>(),
8usize,
concat!("Size of: ", stringify!(hv_snp_guest_policy))
);
assert_eq!(
::std::mem::align_of::<hv_snp_guest_policy>(),
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::<Self>::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<hv_snp_id_block> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_snp_id_block>(),
96usize,
concat!("Size of: ", stringify!(hv_snp_id_block))
);
assert_eq!(
::std::mem::align_of::<hv_snp_id_block>(),
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::<Self>::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<hv_snp_id_auth_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_snp_id_auth_info>(),
3204usize,
concat!("Size of: ", stringify!(hv_snp_id_auth_info))
);
assert_eq!(
::std::mem::align_of::<hv_snp_id_auth_info>(),
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::<Self>::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<hv_psp_launch_finish_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_psp_launch_finish_data>(),
3334usize,
concat!("Size of: ", stringify!(hv_psp_launch_finish_data))
);
assert_eq!(
::std::mem::align_of::<hv_psp_launch_finish_data>(),
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::<Self>::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<hv_partition_complete_isolated_import_data> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_partition_complete_isolated_import_data>(),
3334usize,
concat!(
"Size of: ",
stringify!(hv_partition_complete_isolated_import_data)
)
);
assert_eq!(
::std::mem::align_of::<hv_partition_complete_isolated_import_data>(),
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::<Self>::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<hv_input_complete_isolated_import> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_complete_isolated_import>(),
3342usize,
concat!("Size of: ", stringify!(hv_input_complete_isolated_import))
);
assert_eq!(
::std::mem::align_of::<hv_input_complete_isolated_import>(),
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::<Self>::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<hv_vp_register_page_interrupt_vectors__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page_interrupt_vectors__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page_interrupt_vectors__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page_interrupt_vectors__bindgen_ty_1>(),
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<hv_vp_register_page_interrupt_vectors> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page_interrupt_vectors>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page_interrupt_vectors)
)
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page_interrupt_vectors>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_vp_register_page {
pub version: __u16,
pub isvalid: __u8,
pub rsvdz: __u8,
pub dirty: __u32,
pub __bindgen_anon_1: hv_vp_register_page__bindgen_ty_1,
pub reserved: [__u8; 8usize],
pub __bindgen_anon_2: hv_vp_register_page__bindgen_ty_2,
pub __bindgen_anon_3: hv_vp_register_page__bindgen_ty_3,
pub cr0: __u64,
pub cr3: __u64,
pub cr4: __u64,
pub cr8: __u64,
pub efer: __u64,
pub dr7: __u64,
pub pending_interruption: hv_x64_pending_interruption_register,
pub interrupt_state: hv_x64_interrupt_state_register,
pub instruction_emulation_hints: __u64,
pub xfem: __u64,
pub reserved1: [__u8; 256usize],
pub interrupt_vectors: hv_vp_register_page_interrupt_vectors,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_vp_register_page__bindgen_ty_1 {
pub __bindgen_anon_1: hv_vp_register_page__bindgen_ty_1__bindgen_ty_1,
pub registers: [__u64; 18usize],
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_vp_register_page__bindgen_ty_1__bindgen_ty_1 {
pub __bindgen_anon_1: hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
pub rip: __u64,
pub rflags: __u64,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub __bindgen_anon_1:
hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
pub gp_registers: [__u64; 16usize],
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub rax: __u64,
pub rcx: __u64,
pub rdx: __u64,
pub rbx: __u64,
pub rsp: __u64,
pub rbp: __u64,
pub rsi: __u64,
pub rdi: __u64,
pub r8: __u64,
pub r9: __u64,
pub r10: __u64,
pub r11: __u64,
pub r12: __u64,
pub r13: __u64,
pub r14: __u64,
pub r15: __u64,
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1()
{
const UNINIT: ::std::mem::MaybeUninit<
hv_vp_register_page__bindgen_ty_1__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_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
>(),
128usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<
hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rcx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rdx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rbx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsp) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rsp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rbp) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rbp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rsi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rdi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r9)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r10)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r11)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r12)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r13)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r14)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(r15)
)
);
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<
hv_vp_register_page__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_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
128usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gp_registers) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(gp_registers)
)
);
}
impl Default for hv_vp_register_page__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_1__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page__bindgen_ty_1__bindgen_ty_1>(),
144usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_1__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rip)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rflags) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1__bindgen_ty_1),
"::",
stringify!(rflags)
)
);
}
impl Default for hv_vp_register_page__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page__bindgen_ty_1>(),
144usize,
concat!("Size of: ", stringify!(hv_vp_register_page__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_1>(),
8usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).registers) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_1),
"::",
stringify!(registers)
)
);
}
impl Default for hv_vp_register_page__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_vp_register_page__bindgen_ty_2 {
pub __bindgen_anon_1: hv_vp_register_page__bindgen_ty_2__bindgen_ty_1,
pub xmm_registers: [hv_u128; 6usize],
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_vp_register_page__bindgen_ty_2__bindgen_ty_1 {
pub xmm0: hv_u128,
pub xmm1: hv_u128,
pub xmm2: hv_u128,
pub xmm3: hv_u128,
pub xmm4: hv_u128,
pub xmm5: hv_u128,
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_2__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page__bindgen_ty_2__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page__bindgen_ty_2__bindgen_ty_1>(),
96usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_2__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm0) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(xmm0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm1) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(xmm1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm2) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(xmm2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm3) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(xmm3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm4) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(xmm4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm5) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(xmm5)
)
);
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page__bindgen_ty_2>(),
96usize,
concat!("Size of: ", stringify!(hv_vp_register_page__bindgen_ty_2))
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_2>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmm_registers) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_2),
"::",
stringify!(xmm_registers)
)
);
}
impl Default for hv_vp_register_page__bindgen_ty_2 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_vp_register_page__bindgen_ty_3 {
pub __bindgen_anon_1: hv_vp_register_page__bindgen_ty_3__bindgen_ty_1,
pub segment_registers: [hv_x64_segment_register; 6usize],
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_vp_register_page__bindgen_ty_3__bindgen_ty_1 {
pub es: hv_x64_segment_register,
pub cs: hv_x64_segment_register,
pub ss: hv_x64_segment_register,
pub ds: hv_x64_segment_register,
pub fs: hv_x64_segment_register,
pub gs: hv_x64_segment_register,
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_3__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page__bindgen_ty_3__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page__bindgen_ty_3__bindgen_ty_1>(),
96usize,
concat!(
"Size of: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_3__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).es) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1),
"::",
stringify!(es)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cs) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1),
"::",
stringify!(cs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1),
"::",
stringify!(ss)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ds) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1),
"::",
stringify!(ds)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fs) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1),
"::",
stringify!(fs)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gs) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3__bindgen_ty_1),
"::",
stringify!(gs)
)
);
}
impl Default for hv_vp_register_page__bindgen_ty_3__bindgen_ty_1 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[test]
fn bindgen_test_layout_hv_vp_register_page__bindgen_ty_3() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page__bindgen_ty_3>(),
96usize,
concat!("Size of: ", stringify!(hv_vp_register_page__bindgen_ty_3))
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page__bindgen_ty_3>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_vp_register_page__bindgen_ty_3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).segment_registers) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page__bindgen_ty_3),
"::",
stringify!(segment_registers)
)
);
}
impl Default for hv_vp_register_page__bindgen_ty_3 {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[test]
fn bindgen_test_layout_hv_vp_register_page() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_register_page> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_register_page>(),
696usize,
concat!("Size of: ", stringify!(hv_vp_register_page))
);
assert_eq!(
::std::mem::align_of::<hv_vp_register_page>(),
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)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cr0) as usize - ptr as usize },
352usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(cr0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cr3) as usize - ptr as usize },
360usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(cr3)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cr4) as usize - ptr as usize },
368usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(cr4)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cr8) as usize - ptr as usize },
376usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(cr8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).efer) as usize - ptr as usize },
384usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(efer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).dr7) as usize - ptr as usize },
392usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(dr7)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pending_interruption) as usize - ptr as usize },
400usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(pending_interruption)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).interrupt_state) as usize - ptr as usize },
408usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(interrupt_state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_emulation_hints) as usize - ptr as usize },
416usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(instruction_emulation_hints)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xfem) as usize - ptr as usize },
424usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(xfem)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize },
432usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(reserved1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).interrupt_vectors) as usize - ptr as usize },
688usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_register_page),
"::",
stringify!(interrupt_vectors)
)
);
}
impl Default for hv_vp_register_page {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union 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::<hv_partition_synthetic_processor_features__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_partition_synthetic_processor_features__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_partition_synthetic_processor_features__bindgen_ty_1>(),
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 hypervisor_present(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
}
#[inline]
pub fn set_hypervisor_present(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn hv1(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u64) }
}
#[inline]
pub fn set_hv1(&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 access_guest_idle_reg(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(10usize, 1u8) as u64) }
}
#[inline]
pub fn set_access_guest_idle_reg(&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 enable_extended_gva_ranges_for_flush_virtual_address_list(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u64) }
}
#[inline]
pub fn set_enable_extended_gva_ranges_for_flush_virtual_address_list(&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 enlightened_vmcs(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 1u8) as u64) }
}
#[inline]
pub fn set_enlightened_vmcs(&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, 30u8) as u64) }
}
#[inline]
pub fn set_reserved(&mut self, val: __u64) {
unsafe {
let val: u64 = ::std::mem::transmute(val);
self._bitfield_1.set(33usize, 30u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
hypervisor_present: __u64,
hv1: __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,
access_guest_idle_reg: __u64,
access_frequency_regs: __u64,
reserved_z12: __u64,
reserved_z13: __u64,
reserved_z14: __u64,
enable_extended_gva_ranges_for_flush_virtual_address_list: __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,
enlightened_vmcs: __u64,
reserved: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let hypervisor_present: u64 = unsafe { ::std::mem::transmute(hypervisor_present) };
hypervisor_present as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let hv1: u64 = unsafe { ::std::mem::transmute(hv1) };
hv1 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 access_guest_idle_reg: u64 =
unsafe { ::std::mem::transmute(access_guest_idle_reg) };
access_guest_idle_reg 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 enable_extended_gva_ranges_for_flush_virtual_address_list: u64 = unsafe {
::std::mem::transmute(enable_extended_gva_ranges_for_flush_virtual_address_list)
};
enable_extended_gva_ranges_for_flush_virtual_address_list 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 enlightened_vmcs: u64 = unsafe { ::std::mem::transmute(enlightened_vmcs) };
enlightened_vmcs as u64
});
__bindgen_bitfield_unit.set(33usize, 30u8, {
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<hv_partition_synthetic_processor_features> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_partition_synthetic_processor_features>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_partition_synthetic_processor_features)
)
);
assert_eq!(
::std::mem::align_of::<hv_partition_synthetic_processor_features>(),
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::<Self>::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_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::<hv_partition_isolation_properties__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_partition_isolation_properties__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_partition_isolation_properties__bindgen_ty_1>(),
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<hv_partition_isolation_properties> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_partition_isolation_properties>(),
8usize,
concat!("Size of: ", stringify!(hv_partition_isolation_properties))
);
assert_eq!(
::std::mem::align_of::<hv_partition_isolation_properties>(),
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::<Self>::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_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<hv_input_get_partition_property> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_get_partition_property>(),
16usize,
concat!("Size of: ", stringify!(hv_input_get_partition_property))
);
assert_eq!(
::std::mem::align_of::<hv_input_get_partition_property>(),
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<hv_output_get_partition_property> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_get_partition_property>(),
8usize,
concat!("Size of: ", stringify!(hv_output_get_partition_property))
);
assert_eq!(
::std::mem::align_of::<hv_output_get_partition_property>(),
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<hv_input_set_partition_property> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_set_partition_property>(),
24usize,
concat!("Size of: ", stringify!(hv_input_set_partition_property))
);
assert_eq!(
::std::mem::align_of::<hv_input_set_partition_property>(),
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)
)
);
}
#[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<hv_cpuid_leaf_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_cpuid_leaf_info>(),
24usize,
concat!("Size of: ", stringify!(hv_cpuid_leaf_info))
);
assert_eq!(
::std::mem::align_of::<hv_cpuid_leaf_info>(),
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::<hv_get_vp_cpuid_values_flags__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(hv_get_vp_cpuid_values_flags__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_get_vp_cpuid_values_flags__bindgen_ty_1>(),
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<hv_get_vp_cpuid_values_flags> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_get_vp_cpuid_values_flags>(),
4usize,
concat!("Size of: ", stringify!(hv_get_vp_cpuid_values_flags))
);
assert_eq!(
::std::mem::align_of::<hv_get_vp_cpuid_values_flags>(),
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::<Self>::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<hv_cpuid_leaf_info>,
}
#[test]
fn bindgen_test_layout_hv_input_get_vp_cpuid_values() {
const UNINIT: ::std::mem::MaybeUninit<hv_input_get_vp_cpuid_values> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_get_vp_cpuid_values>(),
24usize,
concat!("Size of: ", stringify!(hv_input_get_vp_cpuid_values))
);
assert_eq!(
::std::mem::align_of::<hv_input_get_vp_cpuid_values>(),
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::<Self>::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<hv_output_get_vp_cpuid_values__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_get_vp_cpuid_values__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_output_get_vp_cpuid_values__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_output_get_vp_cpuid_values__bindgen_ty_1>(),
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<hv_output_get_vp_cpuid_values> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_get_vp_cpuid_values>(),
16usize,
concat!("Size of: ", stringify!(hv_output_get_vp_cpuid_values))
);
assert_eq!(
::std::mem::align_of::<hv_output_get_vp_cpuid_values>(),
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::<Self>::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<hv_translate_gva_result__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_translate_gva_result__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_translate_gva_result__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_translate_gva_result__bindgen_ty_1>(),
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<hv_translate_gva_result> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_translate_gva_result>(),
8usize,
concat!("Size of: ", stringify!(hv_translate_gva_result))
);
assert_eq!(
::std::mem::align_of::<hv_translate_gva_result>(),
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::<Self>::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<hv_x64_apic_eoi_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_apic_eoi_message>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_apic_eoi_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_apic_eoi_message>(),
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<hv_opaque_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_opaque_intercept_message>(),
4usize,
concat!("Size of: ", stringify!(hv_opaque_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_opaque_intercept_message>(),
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<hv_port_info__bindgen_ty_1__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_info__bindgen_ty_1__bindgen_ty_1>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_port_info__bindgen_ty_1__bindgen_ty_1>(),
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<hv_port_info__bindgen_ty_1__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_info__bindgen_ty_1__bindgen_ty_2>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<hv_port_info__bindgen_ty_1__bindgen_ty_2>(),
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<hv_port_info__bindgen_ty_1__bindgen_ty_3> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_info__bindgen_ty_1__bindgen_ty_3>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_3)
)
);
assert_eq!(
::std::mem::align_of::<hv_port_info__bindgen_ty_1__bindgen_ty_3>(),
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<hv_port_info__bindgen_ty_1__bindgen_ty_4> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_info__bindgen_ty_1__bindgen_ty_4>(),
16usize,
concat!(
"Size of: ",
stringify!(hv_port_info__bindgen_ty_1__bindgen_ty_4)
)
);
assert_eq!(
::std::mem::align_of::<hv_port_info__bindgen_ty_1__bindgen_ty_4>(),
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<hv_port_info__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_info__bindgen_ty_1>(),
16usize,
concat!("Size of: ", stringify!(hv_port_info__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_port_info__bindgen_ty_1>(),
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::<Self>::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<hv_port_info> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_port_info>(),
24usize,
concat!("Size of: ", stringify!(hv_port_info))
);
assert_eq!(
::std::mem::align_of::<hv_port_info>(),
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::<Self>::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<hv_interrupt_control__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_interrupt_control__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_interrupt_control__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_interrupt_control__bindgen_ty_1>(),
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 rsvd(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 30u8) as u32) }
}
#[inline]
pub fn set_rsvd(&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(
level_triggered: __u32,
logical_dest_mode: __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, 30u8, {
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<hv_interrupt_control> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_interrupt_control>(),
8usize,
concat!("Size of: ", stringify!(hv_interrupt_control))
);
assert_eq!(
::std::mem::align_of::<hv_interrupt_control>(),
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::<Self>::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_local_interrupt_controller_state {
pub apic_id: __u32,
pub apic_version: __u32,
pub apic_ldr: __u32,
pub apic_dfr: __u32,
pub apic_spurious: __u32,
pub apic_isr: [__u32; 8usize],
pub apic_tmr: [__u32; 8usize],
pub apic_irr: [__u32; 8usize],
pub apic_esr: __u32,
pub apic_icr_high: __u32,
pub apic_icr_low: __u32,
pub apic_lvt_timer: __u32,
pub apic_lvt_thermal: __u32,
pub apic_lvt_perfmon: __u32,
pub apic_lvt_lint0: __u32,
pub apic_lvt_lint1: __u32,
pub apic_lvt_error: __u32,
pub apic_lvt_cmci: __u32,
pub apic_error_status: __u32,
pub apic_initial_count: __u32,
pub apic_counter_value: __u32,
pub apic_divide_configuration: __u32,
pub apic_remote_read: __u32,
}
#[test]
fn bindgen_test_layout_hv_local_interrupt_controller_state() {
const UNINIT: ::std::mem::MaybeUninit<hv_local_interrupt_controller_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_local_interrupt_controller_state>(),
176usize,
concat!("Size of: ", stringify!(hv_local_interrupt_controller_state))
);
assert_eq!(
::std::mem::align_of::<hv_local_interrupt_controller_state>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_local_interrupt_controller_state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_id)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_version) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_ldr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_ldr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_dfr) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_dfr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_spurious) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_spurious)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_isr) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_isr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_tmr) as usize - ptr as usize },
52usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_tmr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_irr) as usize - ptr as usize },
84usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_irr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_esr) as usize - ptr as usize },
116usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_esr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_icr_high) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_icr_high)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_icr_low) as usize - ptr as usize },
124usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_icr_low)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_timer) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_timer)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_thermal) as usize - ptr as usize },
132usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_thermal)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_perfmon) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_perfmon)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_lint0) as usize - ptr as usize },
140usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_lint0)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_lint1) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_lint1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_error) as usize - ptr as usize },
148usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_error)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_lvt_cmci) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_lvt_cmci)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_error_status) as usize - ptr as usize },
156usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_error_status)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_initial_count) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_initial_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_counter_value) as usize - ptr as usize },
164usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_counter_value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_divide_configuration) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_divide_configuration)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).apic_remote_read) as usize - ptr as usize },
172usize,
concat!(
"Offset of field: ",
stringify!(hv_local_interrupt_controller_state),
"::",
stringify!(apic_remote_read)
)
);
}
#[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::<hv_stimer_state__bindgen_ty_1>(),
4usize,
concat!("Size of: ", stringify!(hv_stimer_state__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_stimer_state__bindgen_ty_1>(),
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<hv_stimer_state> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_stimer_state>(),
40usize,
concat!("Size of: ", stringify!(hv_stimer_state))
);
assert_eq!(
::std::mem::align_of::<hv_stimer_state>(),
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<hv_synthetic_timers_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_synthetic_timers_state>(),
200usize,
concat!("Size of: ", stringify!(hv_synthetic_timers_state))
);
assert_eq!(
::std::mem::align_of::<hv_synthetic_timers_state>(),
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)]
#[derive(Copy, Clone)]
pub union hv_x64_vp_execution_state {
pub as_uint16: __u16,
pub __bindgen_anon_1: hv_x64_vp_execution_state__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_vp_execution_state__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_vp_execution_state__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_vp_execution_state__bindgen_ty_1>(),
2usize,
concat!(
"Size of: ",
stringify!(hv_x64_vp_execution_state__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_vp_execution_state__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_vp_execution_state__bindgen_ty_1)
)
);
}
impl hv_x64_vp_execution_state__bindgen_ty_1 {
#[inline]
pub fn cpl(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 2u8) as u16) }
}
#[inline]
pub fn set_cpl(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 2u8, val as u64)
}
}
#[inline]
pub fn cr0_pe(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u16) }
}
#[inline]
pub fn set_cr0_pe(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn cr0_am(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u16) }
}
#[inline]
pub fn set_cr0_am(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn efer_lma(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u16) }
}
#[inline]
pub fn set_efer_lma(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(4usize, 1u8, val as u64)
}
}
#[inline]
pub fn debug_active(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u16) }
}
#[inline]
pub fn set_debug_active(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn interruption_pending(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 1u8) as u16) }
}
#[inline]
pub fn set_interruption_pending(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(6usize, 1u8, val as u64)
}
}
#[inline]
pub fn vtl(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(7usize, 4u8) as u16) }
}
#[inline]
pub fn set_vtl(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(7usize, 4u8, val as u64)
}
}
#[inline]
pub fn enclave_mode(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(11usize, 1u8) as u16) }
}
#[inline]
pub fn set_enclave_mode(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(11usize, 1u8, val as u64)
}
}
#[inline]
pub fn interrupt_shadow(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(12usize, 1u8) as u16) }
}
#[inline]
pub fn set_interrupt_shadow(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(12usize, 1u8, val as u64)
}
}
#[inline]
pub fn virtualization_fault_active(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(13usize, 1u8) as u16) }
}
#[inline]
pub fn set_virtualization_fault_active(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(13usize, 1u8, val as u64)
}
}
#[inline]
pub fn reserved(&self) -> __u16 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 2u8) as u16) }
}
#[inline]
pub fn set_reserved(&mut self, val: __u16) {
unsafe {
let val: u16 = ::std::mem::transmute(val);
self._bitfield_1.set(14usize, 2u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
cpl: __u16,
cr0_pe: __u16,
cr0_am: __u16,
efer_lma: __u16,
debug_active: __u16,
interruption_pending: __u16,
vtl: __u16,
enclave_mode: __u16,
interrupt_shadow: __u16,
virtualization_fault_active: __u16,
reserved: __u16,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 2u8, {
let cpl: u16 = unsafe { ::std::mem::transmute(cpl) };
cpl as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let cr0_pe: u16 = unsafe { ::std::mem::transmute(cr0_pe) };
cr0_pe as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let cr0_am: u16 = unsafe { ::std::mem::transmute(cr0_am) };
cr0_am as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let efer_lma: u16 = unsafe { ::std::mem::transmute(efer_lma) };
efer_lma as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let debug_active: u16 = unsafe { ::std::mem::transmute(debug_active) };
debug_active as u64
});
__bindgen_bitfield_unit.set(6usize, 1u8, {
let interruption_pending: u16 = unsafe { ::std::mem::transmute(interruption_pending) };
interruption_pending as u64
});
__bindgen_bitfield_unit.set(7usize, 4u8, {
let vtl: u16 = unsafe { ::std::mem::transmute(vtl) };
vtl as u64
});
__bindgen_bitfield_unit.set(11usize, 1u8, {
let enclave_mode: u16 = unsafe { ::std::mem::transmute(enclave_mode) };
enclave_mode as u64
});
__bindgen_bitfield_unit.set(12usize, 1u8, {
let interrupt_shadow: u16 = unsafe { ::std::mem::transmute(interrupt_shadow) };
interrupt_shadow as u64
});
__bindgen_bitfield_unit.set(13usize, 1u8, {
let virtualization_fault_active: u16 =
unsafe { ::std::mem::transmute(virtualization_fault_active) };
virtualization_fault_active as u64
});
__bindgen_bitfield_unit.set(14usize, 2u8, {
let reserved: u16 = unsafe { ::std::mem::transmute(reserved) };
reserved as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_vp_execution_state() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_vp_execution_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_vp_execution_state>(),
2usize,
concat!("Size of: ", stringify!(hv_x64_vp_execution_state))
);
assert_eq!(
::std::mem::align_of::<hv_x64_vp_execution_state>(),
2usize,
concat!("Alignment of ", stringify!(hv_x64_vp_execution_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_uint16) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vp_execution_state),
"::",
stringify!(as_uint16)
)
);
}
impl Default for hv_x64_vp_execution_state {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_intercept_message_header {
pub vp_index: __u32,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub intercept_access_type: __u8,
pub execution_state: hv_x64_vp_execution_state,
pub cs_segment: hv_x64_segment_register,
pub rip: __u64,
pub rflags: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_intercept_message_header() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_intercept_message_header> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_intercept_message_header>(),
40usize,
concat!("Size of: ", stringify!(hv_x64_intercept_message_header))
);
assert_eq!(
::std::mem::align_of::<hv_x64_intercept_message_header>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_intercept_message_header))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_intercept_message_header),
"::",
stringify!(vp_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).intercept_access_type) as usize - ptr as usize },
5usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_intercept_message_header),
"::",
stringify!(intercept_access_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).execution_state) as usize - ptr as usize },
6usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_intercept_message_header),
"::",
stringify!(execution_state)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cs_segment) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_intercept_message_header),
"::",
stringify!(cs_segment)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rip) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_intercept_message_header),
"::",
stringify!(rip)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rflags) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_intercept_message_header),
"::",
stringify!(rflags)
)
);
}
impl Default for hv_x64_intercept_message_header {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
impl hv_x64_intercept_message_header {
#[inline]
pub fn instruction_length(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
}
#[inline]
pub fn set_instruction_length(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 4u8, val as u64)
}
}
#[inline]
pub fn cr8(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
}
#[inline]
pub fn set_cr8(&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(
instruction_length: __u8,
cr8: __u8,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 4u8, {
let instruction_length: u8 = unsafe { ::std::mem::transmute(instruction_length) };
instruction_length as u64
});
__bindgen_bitfield_unit.set(4usize, 4u8, {
let cr8: u8 = unsafe { ::std::mem::transmute(cr8) };
cr8 as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_hypercall_intercept_message {
pub header: hv_x64_intercept_message_header,
pub rax: __u64,
pub rbx: __u64,
pub rcx: __u64,
pub rdx: __u64,
pub r8: __u64,
pub rsi: __u64,
pub rdi: __u64,
pub xmmregisters: [hv_u128; 6usize],
pub __bindgen_anon_1: hv_x64_hypercall_intercept_message__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_hypercall_intercept_message__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_hypercall_intercept_message__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_hypercall_intercept_message__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(hv_x64_hypercall_intercept_message__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_hypercall_intercept_message__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_hypercall_intercept_message__bindgen_ty_1)
)
);
}
impl hv_x64_hypercall_intercept_message__bindgen_ty_1 {
#[inline]
pub fn isolated(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_isolated(&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(isolated: __u32, reserved: __u32) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let isolated: u32 = unsafe { ::std::mem::transmute(isolated) };
isolated 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_x64_hypercall_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_hypercall_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_hypercall_intercept_message>(),
196usize,
concat!("Size of: ", stringify!(hv_x64_hypercall_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_hypercall_intercept_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_hypercall_intercept_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(rax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(rbx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(rcx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(rdx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(r8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(rsi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(rdi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).xmmregisters) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_hypercall_intercept_message),
"::",
stringify!(xmmregisters)
)
);
}
impl Default for hv_x64_hypercall_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_register_access_info {
pub source_value: hv_register_value,
pub destination_register: __u32,
pub source_address: __u64,
pub destination_address: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_register_access_info() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_register_access_info> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_register_access_info>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_register_access_info))
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_access_info>(),
8usize,
concat!("Alignment of ", stringify!(hv_x64_register_access_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).source_value) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_access_info),
"::",
stringify!(source_value)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).destination_register) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_access_info),
"::",
stringify!(destination_register)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).source_address) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_access_info),
"::",
stringify!(source_address)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).destination_address) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_access_info),
"::",
stringify!(destination_address)
)
);
}
impl Default for hv_x64_register_access_info {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_register_intercept_message {
pub header: hv_x64_intercept_message_header,
pub __bindgen_anon_1: hv_x64_register_intercept_message__bindgen_ty_1,
pub reserved8: __u8,
pub reserved16: __u16,
pub register_name: __u32,
pub access_info: hv_x64_register_access_info,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_register_intercept_message__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_register_intercept_message__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_register_intercept_message__bindgen_ty_1>(),
1usize,
concat!(
"Size of: ",
stringify!(hv_x64_register_intercept_message__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_intercept_message__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_register_intercept_message__bindgen_ty_1)
)
);
}
impl hv_x64_register_intercept_message__bindgen_ty_1 {
#[inline]
pub fn is_memory_op(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_is_memory_op(&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(
is_memory_op: __u8,
reserved: __u8,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let is_memory_op: u8 = unsafe { ::std::mem::transmute(is_memory_op) };
is_memory_op 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_x64_register_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_register_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_register_intercept_message>(),
64usize,
concat!("Size of: ", stringify!(hv_x64_register_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_register_intercept_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_register_intercept_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved8) as usize - ptr as usize },
41usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_intercept_message),
"::",
stringify!(reserved8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved16) as usize - ptr as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_intercept_message),
"::",
stringify!(reserved16)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).register_name) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_intercept_message),
"::",
stringify!(register_name)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).access_info) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_register_intercept_message),
"::",
stringify!(access_info)
)
);
}
impl Default for hv_x64_register_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_memory_access_info {
pub as_uint8: __u8,
pub __bindgen_anon_1: hv_x64_memory_access_info__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_memory_access_info__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_memory_access_info__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_memory_access_info__bindgen_ty_1>(),
1usize,
concat!(
"Size of: ",
stringify!(hv_x64_memory_access_info__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_memory_access_info__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_memory_access_info__bindgen_ty_1)
)
);
}
impl hv_x64_memory_access_info__bindgen_ty_1 {
#[inline]
pub fn gva_valid(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_gva_valid(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn gva_gpa_valid(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_gva_gpa_valid(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn hypercall_output_pending(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 1u8) as u8) }
}
#[inline]
pub fn set_hypercall_output_pending(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(2usize, 1u8, val as u64)
}
}
#[inline]
pub fn tlb_locked_no_overlay(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
}
#[inline]
pub fn set_tlb_locked_no_overlay(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, 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(
gva_valid: __u8,
gva_gpa_valid: __u8,
hypercall_output_pending: __u8,
tlb_locked_no_overlay: __u8,
reserved: __u8,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let gva_valid: u8 = unsafe { ::std::mem::transmute(gva_valid) };
gva_valid as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let gva_gpa_valid: u8 = unsafe { ::std::mem::transmute(gva_gpa_valid) };
gva_gpa_valid as u64
});
__bindgen_bitfield_unit.set(2usize, 1u8, {
let hypercall_output_pending: u8 =
unsafe { ::std::mem::transmute(hypercall_output_pending) };
hypercall_output_pending as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let tlb_locked_no_overlay: u8 = unsafe { ::std::mem::transmute(tlb_locked_no_overlay) };
tlb_locked_no_overlay 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_x64_memory_access_info() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_memory_access_info> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_memory_access_info>(),
1usize,
concat!("Size of: ", stringify!(hv_x64_memory_access_info))
);
assert_eq!(
::std::mem::align_of::<hv_x64_memory_access_info>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_memory_access_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_uint8) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_access_info),
"::",
stringify!(as_uint8)
)
);
}
impl Default for hv_x64_memory_access_info {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_io_port_access_info {
pub as_uint8: __u8,
pub __bindgen_anon_1: hv_x64_io_port_access_info__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_io_port_access_info__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_io_port_access_info__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_io_port_access_info__bindgen_ty_1>(),
1usize,
concat!(
"Size of: ",
stringify!(hv_x64_io_port_access_info__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_io_port_access_info__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_io_port_access_info__bindgen_ty_1)
)
);
}
impl hv_x64_io_port_access_info__bindgen_ty_1 {
#[inline]
pub fn access_size(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
}
#[inline]
pub fn set_access_size(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 3u8, val as u64)
}
}
#[inline]
pub fn string_op(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
}
#[inline]
pub fn set_string_op(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn rep_prefix(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u8) }
}
#[inline]
pub fn set_rep_prefix(&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(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) }
}
#[inline]
pub fn set_reserved(&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(
access_size: __u8,
string_op: __u8,
rep_prefix: __u8,
reserved: __u8,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 3u8, {
let access_size: u8 = unsafe { ::std::mem::transmute(access_size) };
access_size as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let string_op: u8 = unsafe { ::std::mem::transmute(string_op) };
string_op as u64
});
__bindgen_bitfield_unit.set(4usize, 1u8, {
let rep_prefix: u8 = unsafe { ::std::mem::transmute(rep_prefix) };
rep_prefix as u64
});
__bindgen_bitfield_unit.set(5usize, 3u8, {
let reserved: u8 = unsafe { ::std::mem::transmute(reserved) };
reserved as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_io_port_access_info() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_io_port_access_info> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_io_port_access_info>(),
1usize,
concat!("Size of: ", stringify!(hv_x64_io_port_access_info))
);
assert_eq!(
::std::mem::align_of::<hv_x64_io_port_access_info>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_io_port_access_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_uint8) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_access_info),
"::",
stringify!(as_uint8)
)
);
}
impl Default for hv_x64_io_port_access_info {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union hv_x64_exception_info {
pub as_uint8: __u8,
pub __bindgen_anon_1: hv_x64_exception_info__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_exception_info__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_exception_info__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_exception_info__bindgen_ty_1>(),
1usize,
concat!("Size of: ", stringify!(hv_x64_exception_info__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_x64_exception_info__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_exception_info__bindgen_ty_1)
)
);
}
impl hv_x64_exception_info__bindgen_ty_1 {
#[inline]
pub fn error_code_valid(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_error_code_valid(&mut self, val: __u8) {
unsafe {
let val: u8 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn software_exception(&self) -> __u8 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_software_exception(&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(
error_code_valid: __u8,
software_exception: __u8,
reserved: __u8,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let error_code_valid: u8 = unsafe { ::std::mem::transmute(error_code_valid) };
error_code_valid as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let software_exception: u8 = unsafe { ::std::mem::transmute(software_exception) };
software_exception 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_x64_exception_info() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_exception_info> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_exception_info>(),
1usize,
concat!("Size of: ", stringify!(hv_x64_exception_info))
);
assert_eq!(
::std::mem::align_of::<hv_x64_exception_info>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_exception_info))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).as_uint8) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_info),
"::",
stringify!(as_uint8)
)
);
}
impl Default for hv_x64_exception_info {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_memory_intercept_message {
pub header: hv_x64_intercept_message_header,
pub cache_type: __u32,
pub instruction_byte_count: __u8,
pub memory_access_info: hv_x64_memory_access_info,
pub tpr_priority: __u8,
pub reserved1: __u8,
pub guest_virtual_address: __u64,
pub guest_physical_address: __u64,
pub instruction_bytes: [__u8; 16usize],
}
#[test]
fn bindgen_test_layout_hv_x64_memory_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_memory_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_memory_intercept_message>(),
80usize,
concat!("Size of: ", stringify!(hv_x64_memory_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_memory_intercept_message>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_memory_intercept_message))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cache_type) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(cache_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_byte_count) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(instruction_byte_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).memory_access_info) as usize - ptr as usize },
45usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(memory_access_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).tpr_priority) as usize - ptr as usize },
46usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(tpr_priority)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize },
47usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(reserved1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).guest_virtual_address) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(guest_virtual_address)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).guest_physical_address) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(guest_physical_address)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_bytes) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_memory_intercept_message),
"::",
stringify!(instruction_bytes)
)
);
}
impl Default for hv_x64_memory_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_cpuid_intercept_message {
pub header: hv_x64_intercept_message_header,
pub rax: __u64,
pub rcx: __u64,
pub rdx: __u64,
pub rbx: __u64,
pub default_result_rax: __u64,
pub default_result_rcx: __u64,
pub default_result_rdx: __u64,
pub default_result_rbx: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_cpuid_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_cpuid_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_cpuid_intercept_message>(),
104usize,
concat!("Size of: ", stringify!(hv_x64_cpuid_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_cpuid_intercept_message>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_cpuid_intercept_message))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(rax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(rcx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(rdx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(rbx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).default_result_rax) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(default_result_rax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).default_result_rcx) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(default_result_rcx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).default_result_rdx) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(default_result_rdx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).default_result_rbx) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_cpuid_intercept_message),
"::",
stringify!(default_result_rbx)
)
);
}
impl Default for hv_x64_cpuid_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_msr_intercept_message {
pub header: hv_x64_intercept_message_header,
pub msr_number: __u32,
pub reserved: __u32,
pub rdx: __u64,
pub rax: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_msr_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_msr_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_msr_intercept_message>(),
64usize,
concat!("Size of: ", stringify!(hv_x64_msr_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_msr_intercept_message>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_msr_intercept_message))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_msr_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msr_number) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_msr_intercept_message),
"::",
stringify!(msr_number)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_msr_intercept_message),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_msr_intercept_message),
"::",
stringify!(rdx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_msr_intercept_message),
"::",
stringify!(rax)
)
);
}
impl Default for hv_x64_msr_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_io_port_intercept_message {
pub header: hv_x64_intercept_message_header,
pub port_number: __u16,
pub access_info: hv_x64_io_port_access_info,
pub instruction_byte_count: __u8,
pub reserved: __u32,
pub rax: __u64,
pub instruction_bytes: [__u8; 16usize],
pub ds_segment: hv_x64_segment_register,
pub es_segment: hv_x64_segment_register,
pub rcx: __u64,
pub rsi: __u64,
pub rdi: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_io_port_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_io_port_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_io_port_intercept_message>(),
128usize,
concat!("Size of: ", stringify!(hv_x64_io_port_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_io_port_intercept_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_io_port_intercept_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).port_number) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(port_number)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).access_info) as usize - ptr as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(access_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_byte_count) as usize - ptr as usize },
43usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(instruction_byte_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(rax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_bytes) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(instruction_bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ds_segment) as usize - ptr as usize },
72usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(ds_segment)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).es_segment) as usize - ptr as usize },
88usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(es_segment)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize },
104usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(rcx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(rsi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_io_port_intercept_message),
"::",
stringify!(rdi)
)
);
}
impl Default for hv_x64_io_port_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_exception_intercept_message {
pub header: hv_x64_intercept_message_header,
pub exception_vector: __u16,
pub exception_info: hv_x64_exception_info,
pub instruction_byte_count: __u8,
pub error_code: __u32,
pub exception_parameter: __u64,
pub reserved: __u64,
pub instruction_bytes: [__u8; 16usize],
pub ds_segment: hv_x64_segment_register,
pub ss_segment: hv_x64_segment_register,
pub rax: __u64,
pub rcx: __u64,
pub rdx: __u64,
pub rbx: __u64,
pub rsp: __u64,
pub rbp: __u64,
pub rsi: __u64,
pub rdi: __u64,
pub r8: __u64,
pub r9: __u64,
pub r10: __u64,
pub r11: __u64,
pub r12: __u64,
pub r13: __u64,
pub r14: __u64,
pub r15: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_exception_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_exception_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_exception_intercept_message>(),
240usize,
concat!("Size of: ", stringify!(hv_x64_exception_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_exception_intercept_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_exception_intercept_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exception_vector) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(exception_vector)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exception_info) as usize - ptr as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(exception_info)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_byte_count) as usize - ptr as usize },
43usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(instruction_byte_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).error_code) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(error_code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).exception_parameter) as usize - ptr as usize },
48usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(exception_parameter)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
56usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(reserved)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).instruction_bytes) as usize - ptr as usize },
64usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(instruction_bytes)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ds_segment) as usize - ptr as usize },
80usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(ds_segment)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ss_segment) as usize - ptr as usize },
96usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(ss_segment)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rax) as usize - ptr as usize },
112usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rcx) as usize - ptr as usize },
120usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rcx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdx) as usize - ptr as usize },
128usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rdx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rbx) as usize - ptr as usize },
136usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rbx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsp) as usize - ptr as usize },
144usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rsp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rbp) as usize - ptr as usize },
152usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rbp)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsi) as usize - ptr as usize },
160usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rsi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rdi) as usize - ptr as usize },
168usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(rdi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r8) as usize - ptr as usize },
176usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r8)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r9) as usize - ptr as usize },
184usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r9)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r10) as usize - ptr as usize },
192usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r10)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r11) as usize - ptr as usize },
200usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r11)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r12) as usize - ptr as usize },
208usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r12)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r13) as usize - ptr as usize },
216usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r13)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r14) as usize - ptr as usize },
224usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r14)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).r15) as usize - ptr as usize },
232usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_exception_intercept_message),
"::",
stringify!(r15)
)
);
}
impl Default for hv_x64_exception_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_invalid_vp_register_message {
pub vp_index: __u32,
pub reserved: __u32,
}
#[test]
fn bindgen_test_layout_hv_x64_invalid_vp_register_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_invalid_vp_register_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_invalid_vp_register_message>(),
8usize,
concat!("Size of: ", stringify!(hv_x64_invalid_vp_register_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_invalid_vp_register_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_invalid_vp_register_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_invalid_vp_register_message),
"::",
stringify!(vp_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_invalid_vp_register_message),
"::",
stringify!(reserved)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_unrecoverable_exception_message {
pub header: hv_x64_intercept_message_header,
}
#[test]
fn bindgen_test_layout_hv_x64_unrecoverable_exception_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_unrecoverable_exception_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_unrecoverable_exception_message>(),
40usize,
concat!(
"Size of: ",
stringify!(hv_x64_unrecoverable_exception_message)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_unrecoverable_exception_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_unrecoverable_exception_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_unrecoverable_exception_message),
"::",
stringify!(header)
)
);
}
impl Default for hv_x64_unrecoverable_exception_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_unsupported_feature_message {
pub vp_index: __u32,
pub feature_code: __u32,
pub feature_parameter: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_unsupported_feature_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_unsupported_feature_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_unsupported_feature_message>(),
16usize,
concat!("Size of: ", stringify!(hv_x64_unsupported_feature_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_unsupported_feature_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_unsupported_feature_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_unsupported_feature_message),
"::",
stringify!(vp_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).feature_code) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_unsupported_feature_message),
"::",
stringify!(feature_code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).feature_parameter) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_unsupported_feature_message),
"::",
stringify!(feature_parameter)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_halt_message {
pub header: hv_x64_intercept_message_header,
}
#[test]
fn bindgen_test_layout_hv_x64_halt_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_halt_message> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_halt_message>(),
40usize,
concat!("Size of: ", stringify!(hv_x64_halt_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_halt_message>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_halt_message))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_halt_message),
"::",
stringify!(header)
)
);
}
impl Default for hv_x64_halt_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_interruption_deliverable_message {
pub header: hv_x64_intercept_message_header,
pub deliverable_type: __u32,
pub rsvd: __u32,
}
#[test]
fn bindgen_test_layout_hv_x64_interruption_deliverable_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_interruption_deliverable_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_interruption_deliverable_message>(),
48usize,
concat!(
"Size of: ",
stringify!(hv_x64_interruption_deliverable_message)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_interruption_deliverable_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_interruption_deliverable_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_interruption_deliverable_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).deliverable_type) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_interruption_deliverable_message),
"::",
stringify!(deliverable_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_interruption_deliverable_message),
"::",
stringify!(rsvd)
)
);
}
impl Default for hv_x64_interruption_deliverable_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_sint_deliverable_message {
pub header: hv_x64_intercept_message_header,
pub deliverable_sints: __u16,
pub rsvd1: __u16,
pub rsvd2: __u32,
}
#[test]
fn bindgen_test_layout_hv_x64_sint_deliverable_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_sint_deliverable_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_sint_deliverable_message>(),
48usize,
concat!("Size of: ", stringify!(hv_x64_sint_deliverable_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_sint_deliverable_message>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_sint_deliverable_message))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sint_deliverable_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).deliverable_sints) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sint_deliverable_message),
"::",
stringify!(deliverable_sints)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd1) as usize - ptr as usize },
42usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sint_deliverable_message),
"::",
stringify!(rsvd1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd2) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sint_deliverable_message),
"::",
stringify!(rsvd2)
)
);
}
impl Default for hv_x64_sint_deliverable_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_sipi_intercept_message {
pub header: hv_x64_intercept_message_header,
pub target_vp_index: __u32,
pub interrupt_vector: __u32,
}
#[test]
fn bindgen_test_layout_hv_x64_sipi_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_sipi_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_sipi_intercept_message>(),
48usize,
concat!("Size of: ", stringify!(hv_x64_sipi_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_sipi_intercept_message>(),
1usize,
concat!("Alignment of ", stringify!(hv_x64_sipi_intercept_message))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sipi_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).target_vp_index) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sipi_intercept_message),
"::",
stringify!(target_vp_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).interrupt_vector) as usize - ptr as usize },
44usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_sipi_intercept_message),
"::",
stringify!(interrupt_vector)
)
);
}
impl Default for hv_x64_sipi_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_gpa_attribute_intercept_message {
pub vp_index: __u32,
pub __bindgen_anon_1: hv_x64_gpa_attribute_intercept_message__bindgen_ty_1,
pub ranges: [hv_gpa_page_range; 29usize],
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_gpa_attribute_intercept_message__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_gpa_attribute_intercept_message__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_gpa_attribute_intercept_message__bindgen_ty_1>(),
4usize,
concat!(
"Size of: ",
stringify!(hv_x64_gpa_attribute_intercept_message__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_gpa_attribute_intercept_message__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_gpa_attribute_intercept_message__bindgen_ty_1)
)
);
}
impl hv_x64_gpa_attribute_intercept_message__bindgen_ty_1 {
#[inline]
pub fn range_count(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) }
}
#[inline]
pub fn set_range_count(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 5u8, val as u64)
}
}
#[inline]
pub fn adjust(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) }
}
#[inline]
pub fn set_adjust(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(5usize, 1u8, val as u64)
}
}
#[inline]
pub fn host_visibility(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 2u8) as u32) }
}
#[inline]
pub fn set_host_visibility(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(6usize, 2u8, val as u64)
}
}
#[inline]
pub fn memory_type(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(8usize, 6u8) as u32) }
}
#[inline]
pub fn set_memory_type(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(8usize, 6u8, val as u64)
}
}
#[inline]
pub fn reserved(&self) -> __u32 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(14usize, 18u8) as u32) }
}
#[inline]
pub fn set_reserved(&mut self, val: __u32) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(14usize, 18u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
range_count: __u32,
adjust: __u32,
host_visibility: __u32,
memory_type: __u32,
reserved: __u32,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 5u8, {
let range_count: u32 = unsafe { ::std::mem::transmute(range_count) };
range_count as u64
});
__bindgen_bitfield_unit.set(5usize, 1u8, {
let adjust: u32 = unsafe { ::std::mem::transmute(adjust) };
adjust as u64
});
__bindgen_bitfield_unit.set(6usize, 2u8, {
let host_visibility: u32 = unsafe { ::std::mem::transmute(host_visibility) };
host_visibility as u64
});
__bindgen_bitfield_unit.set(8usize, 6u8, {
let memory_type: u32 = unsafe { ::std::mem::transmute(memory_type) };
memory_type as u64
});
__bindgen_bitfield_unit.set(14usize, 18u8, {
let reserved: u32 = unsafe { ::std::mem::transmute(reserved) };
reserved as u64
});
__bindgen_bitfield_unit
}
}
#[test]
fn bindgen_test_layout_hv_x64_gpa_attribute_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_gpa_attribute_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_gpa_attribute_intercept_message>(),
240usize,
concat!(
"Size of: ",
stringify!(hv_x64_gpa_attribute_intercept_message)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_gpa_attribute_intercept_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_gpa_attribute_intercept_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).vp_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_gpa_attribute_intercept_message),
"::",
stringify!(vp_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ranges) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_gpa_attribute_intercept_message),
"::",
stringify!(ranges)
)
);
}
impl Default for hv_x64_gpa_attribute_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_register_x64_cpuid_result_parameters {
pub input: hv_register_x64_cpuid_result_parameters__bindgen_ty_1,
pub result: hv_register_x64_cpuid_result_parameters__bindgen_ty_2,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_register_x64_cpuid_result_parameters__bindgen_ty_1 {
pub eax: __u32,
pub ecx: __u32,
pub subleaf_specific: __u8,
pub always_override: __u8,
pub padding: __u16,
}
#[test]
fn bindgen_test_layout_hv_register_x64_cpuid_result_parameters__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<hv_register_x64_cpuid_result_parameters__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_x64_cpuid_result_parameters__bindgen_ty_1>(),
12usize,
concat!(
"Size of: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_register_x64_cpuid_result_parameters__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1),
"::",
stringify!(eax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1),
"::",
stringify!(ecx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).subleaf_specific) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1),
"::",
stringify!(subleaf_specific)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).always_override) as usize - ptr as usize },
9usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1),
"::",
stringify!(always_override)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).padding) as usize - ptr as usize },
10usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_1),
"::",
stringify!(padding)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_register_x64_cpuid_result_parameters__bindgen_ty_2 {
pub eax: __u32,
pub eax_mask: __u32,
pub ebx: __u32,
pub ebx_mask: __u32,
pub ecx: __u32,
pub ecx_mask: __u32,
pub edx: __u32,
pub edx_mask: __u32,
}
#[test]
fn bindgen_test_layout_hv_register_x64_cpuid_result_parameters__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<hv_register_x64_cpuid_result_parameters__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_x64_cpuid_result_parameters__bindgen_ty_2>(),
32usize,
concat!(
"Size of: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<hv_register_x64_cpuid_result_parameters__bindgen_ty_2>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eax) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(eax)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).eax_mask) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(eax_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ebx) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(ebx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ebx_mask) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(ebx_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecx) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(ecx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ecx_mask) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(ecx_mask)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).edx) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(edx)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).edx_mask) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters__bindgen_ty_2),
"::",
stringify!(edx_mask)
)
);
}
#[test]
fn bindgen_test_layout_hv_register_x64_cpuid_result_parameters() {
const UNINIT: ::std::mem::MaybeUninit<hv_register_x64_cpuid_result_parameters> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_x64_cpuid_result_parameters>(),
44usize,
concat!(
"Size of: ",
stringify!(hv_register_x64_cpuid_result_parameters)
)
);
assert_eq!(
::std::mem::align_of::<hv_register_x64_cpuid_result_parameters>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_register_x64_cpuid_result_parameters)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).input) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters),
"::",
stringify!(input)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).result) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_cpuid_result_parameters),
"::",
stringify!(result)
)
);
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_register_x64_msr_result_parameters {
pub msr_index: __u32,
pub access_type: __u32,
pub action: __u32,
}
#[test]
fn bindgen_test_layout_hv_register_x64_msr_result_parameters() {
const UNINIT: ::std::mem::MaybeUninit<hv_register_x64_msr_result_parameters> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_x64_msr_result_parameters>(),
12usize,
concat!(
"Size of: ",
stringify!(hv_register_x64_msr_result_parameters)
)
);
assert_eq!(
::std::mem::align_of::<hv_register_x64_msr_result_parameters>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_register_x64_msr_result_parameters)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msr_index) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_msr_result_parameters),
"::",
stringify!(msr_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).access_type) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_msr_result_parameters),
"::",
stringify!(access_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).action) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_register_x64_msr_result_parameters),
"::",
stringify!(action)
)
);
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub union hv_register_intercept_result_parameters {
pub cpuid: hv_register_x64_cpuid_result_parameters,
pub msr: hv_register_x64_msr_result_parameters,
}
#[test]
fn bindgen_test_layout_hv_register_intercept_result_parameters() {
const UNINIT: ::std::mem::MaybeUninit<hv_register_intercept_result_parameters> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_register_intercept_result_parameters>(),
44usize,
concat!(
"Size of: ",
stringify!(hv_register_intercept_result_parameters)
)
);
assert_eq!(
::std::mem::align_of::<hv_register_intercept_result_parameters>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_register_intercept_result_parameters)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).cpuid) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_intercept_result_parameters),
"::",
stringify!(cpuid)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_register_intercept_result_parameters),
"::",
stringify!(msr)
)
);
}
impl Default for hv_register_intercept_result_parameters {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_x64_vmgexit_intercept_message {
pub header: hv_x64_intercept_message_header,
pub ghcb_msr: __u64,
pub __bindgen_anon_1: hv_x64_vmgexit_intercept_message__bindgen_ty_1,
pub __bindgen_anon_2: hv_x64_vmgexit_intercept_message__bindgen_ty_2,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_vmgexit_intercept_message__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
}
#[test]
fn bindgen_test_layout_hv_x64_vmgexit_intercept_message__bindgen_ty_1() {
assert_eq!(
::std::mem::size_of::<hv_x64_vmgexit_intercept_message__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_vmgexit_intercept_message__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_1)
)
);
}
impl hv_x64_vmgexit_intercept_message__bindgen_ty_1 {
#[inline]
pub fn ghcb_page_valid(&self) -> __u64 {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u64) }
}
#[inline]
pub fn set_ghcb_page_valid(&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(
ghcb_page_valid: __u64,
reserved: __u64,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let ghcb_page_valid: u64 = unsafe { ::std::mem::transmute(ghcb_page_valid) };
ghcb_page_valid as u64
});
__bindgen_bitfield_unit.set(1usize, 63u8, {
let reserved: u64 = 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_x64_vmgexit_intercept_message__bindgen_ty_2 {
pub ghcb_usage: __u32,
pub rserved_ghcb_page: __u32,
pub __bindgen_anon_1: hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1 {
pub ghcb_protocol_version: __u16,
pub reserved_st: [__u16; 3usize],
pub sw_exit_code: __u64,
pub sw_exit_info1: __u64,
pub sw_exit_info2: __u64,
pub sw_scratch: __u64,
}
#[test]
fn bindgen_test_layout_hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1() {
const UNINIT: ::std::mem::MaybeUninit<
hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1,
> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1>(),
40usize,
concat!(
"Size of: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ghcb_protocol_version) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(ghcb_protocol_version)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).reserved_st) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(reserved_st)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sw_exit_code) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(sw_exit_code)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sw_exit_info1) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(sw_exit_info1)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sw_exit_info2) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(sw_exit_info2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).sw_scratch) as usize - ptr as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2__bindgen_ty_1),
"::",
stringify!(sw_scratch)
)
);
}
#[test]
fn bindgen_test_layout_hv_x64_vmgexit_intercept_message__bindgen_ty_2() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_vmgexit_intercept_message__bindgen_ty_2> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_vmgexit_intercept_message__bindgen_ty_2>(),
48usize,
concat!(
"Size of: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2)
)
);
assert_eq!(
::std::mem::align_of::<hv_x64_vmgexit_intercept_message__bindgen_ty_2>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ghcb_usage) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2),
"::",
stringify!(ghcb_usage)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rserved_ghcb_page) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message__bindgen_ty_2),
"::",
stringify!(rserved_ghcb_page)
)
);
}
#[test]
fn bindgen_test_layout_hv_x64_vmgexit_intercept_message() {
const UNINIT: ::std::mem::MaybeUninit<hv_x64_vmgexit_intercept_message> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_x64_vmgexit_intercept_message>(),
104usize,
concat!("Size of: ", stringify!(hv_x64_vmgexit_intercept_message))
);
assert_eq!(
::std::mem::align_of::<hv_x64_vmgexit_intercept_message>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_x64_vmgexit_intercept_message)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).header) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message),
"::",
stringify!(header)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).ghcb_msr) as usize - ptr as usize },
40usize,
concat!(
"Offset of field: ",
stringify!(hv_x64_vmgexit_intercept_message),
"::",
stringify!(ghcb_msr)
)
);
}
impl Default for hv_x64_vmgexit_intercept_message {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, 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<hv_input_translate_virtual_address> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_translate_virtual_address>(),
32usize,
concat!("Size of: ", stringify!(hv_input_translate_virtual_address))
);
assert_eq!(
::std::mem::align_of::<hv_input_translate_virtual_address>(),
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<hv_output_translate_virtual_address> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_translate_virtual_address>(),
16usize,
concat!("Size of: ", stringify!(hv_output_translate_virtual_address))
);
assert_eq!(
::std::mem::align_of::<hv_output_translate_virtual_address>(),
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::<Self>::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_register_intercept_result {
pub partition_id: __u64,
pub vp_index: __u32,
pub intercept_type: __u32,
pub parameters: hv_register_intercept_result_parameters,
}
#[test]
fn bindgen_test_layout_hv_input_register_intercept_result() {
const UNINIT: ::std::mem::MaybeUninit<hv_input_register_intercept_result> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_register_intercept_result>(),
60usize,
concat!("Size of: ", stringify!(hv_input_register_intercept_result))
);
assert_eq!(
::std::mem::align_of::<hv_input_register_intercept_result>(),
1usize,
concat!(
"Alignment of ",
stringify!(hv_input_register_intercept_result)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).partition_id) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_input_register_intercept_result),
"::",
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_register_intercept_result),
"::",
stringify!(vp_index)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).intercept_type) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(hv_input_register_intercept_result),
"::",
stringify!(intercept_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(hv_input_register_intercept_result),
"::",
stringify!(parameters)
)
);
}
impl Default for hv_input_register_intercept_result {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, 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<hv_input_assert_virtual_interrupt> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_assert_virtual_interrupt>(),
32usize,
concat!("Size of: ", stringify!(hv_input_assert_virtual_interrupt))
);
assert_eq!(
::std::mem::align_of::<hv_input_assert_virtual_interrupt>(),
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::<Self>::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<hv_input_signal_event_direct> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_signal_event_direct>(),
16usize,
concat!("Size of: ", stringify!(hv_input_signal_event_direct))
);
assert_eq!(
::std::mem::align_of::<hv_input_signal_event_direct>(),
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<hv_output_signal_event_direct> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_signal_event_direct>(),
8usize,
concat!("Size of: ", stringify!(hv_output_signal_event_direct))
);
assert_eq!(
::std::mem::align_of::<hv_output_signal_event_direct>(),
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<hv_input_post_message_direct> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_post_message_direct>(),
280usize,
concat!("Size of: ", stringify!(hv_input_post_message_direct))
);
assert_eq!(
::std::mem::align_of::<hv_input_post_message_direct>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct hv_vp_state_data_xsave {
pub flags: __u64,
pub states: hv_x64_xsave_xfem_register,
}
#[test]
fn bindgen_test_layout_hv_vp_state_data_xsave() {
const UNINIT: ::std::mem::MaybeUninit<hv_vp_state_data_xsave> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_vp_state_data_xsave>(),
16usize,
concat!("Size of: ", stringify!(hv_vp_state_data_xsave))
);
assert_eq!(
::std::mem::align_of::<hv_vp_state_data_xsave>(),
1usize,
concat!("Alignment of ", stringify!(hv_vp_state_data_xsave))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_state_data_xsave),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).states) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(hv_vp_state_data_xsave),
"::",
stringify!(states)
)
);
}
impl Default for hv_vp_state_data_xsave {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C, 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<hv_psp_cpuid_leaf> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_psp_cpuid_leaf>(),
48usize,
concat!("Size of: ", stringify!(hv_psp_cpuid_leaf))
);
assert_eq!(
::std::mem::align_of::<hv_psp_cpuid_leaf>(),
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<hv_psp_cpuid_page> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_psp_cpuid_page>(),
3088usize,
concat!("Size of: ", stringify!(hv_psp_cpuid_page))
);
assert_eq!(
::std::mem::align_of::<hv_psp_cpuid_page>(),
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::<Self>::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<hv_input_import_isolated_pages> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_import_isolated_pages>(),
16usize,
concat!("Size of: ", stringify!(hv_input_import_isolated_pages))
);
assert_eq!(
::std::mem::align_of::<hv_input_import_isolated_pages>(),
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::<Self>::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::<hv_sev_vmgexit_offload__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_sev_vmgexit_offload__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_sev_vmgexit_offload__bindgen_ty_1>(),
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<hv_sev_vmgexit_offload> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_sev_vmgexit_offload>(),
8usize,
concat!("Size of: ", stringify!(hv_sev_vmgexit_offload))
);
assert_eq!(
::std::mem::align_of::<hv_sev_vmgexit_offload>(),
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::<Self>::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<hv_access_gpa_result__bindgen_ty_1> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_access_gpa_result__bindgen_ty_1>(),
8usize,
concat!("Size of: ", stringify!(hv_access_gpa_result__bindgen_ty_1))
);
assert_eq!(
::std::mem::align_of::<hv_access_gpa_result__bindgen_ty_1>(),
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<hv_access_gpa_result> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_access_gpa_result>(),
8usize,
concat!("Size of: ", stringify!(hv_access_gpa_result))
);
assert_eq!(
::std::mem::align_of::<hv_access_gpa_result>(),
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::<Self>::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::<hv_access_gpa_control_flags__bindgen_ty_1>(),
8usize,
concat!(
"Size of: ",
stringify!(hv_access_gpa_control_flags__bindgen_ty_1)
)
);
assert_eq!(
::std::mem::align_of::<hv_access_gpa_control_flags__bindgen_ty_1>(),
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<hv_access_gpa_control_flags> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_access_gpa_control_flags>(),
8usize,
concat!("Size of: ", stringify!(hv_access_gpa_control_flags))
);
assert_eq!(
::std::mem::align_of::<hv_access_gpa_control_flags>(),
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::<Self>::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<hv_input_read_gpa> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_read_gpa>(),
32usize,
concat!("Size of: ", stringify!(hv_input_read_gpa))
);
assert_eq!(
::std::mem::align_of::<hv_input_read_gpa>(),
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::<Self>::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<hv_output_read_gpa> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_read_gpa>(),
24usize,
concat!("Size of: ", stringify!(hv_output_read_gpa))
);
assert_eq!(
::std::mem::align_of::<hv_output_read_gpa>(),
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::<Self>::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<hv_input_write_gpa> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_write_gpa>(),
48usize,
concat!("Size of: ", stringify!(hv_input_write_gpa))
);
assert_eq!(
::std::mem::align_of::<hv_input_write_gpa>(),
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::<Self>::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<hv_output_write_gpa> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_output_write_gpa>(),
8usize,
concat!("Size of: ", stringify!(hv_output_write_gpa))
);
assert_eq!(
::std::mem::align_of::<hv_output_write_gpa>(),
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::<Self>::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<hv_input_issue_psp_guest_request> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<hv_input_issue_psp_guest_request>(),
24usize,
concat!("Size of: ", stringify!(hv_input_issue_psp_guest_request))
);
assert_eq!(
::std::mem::align_of::<hv_input_issue_psp_guest_request>(),
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(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<mshv_vp_registers> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_vp_registers>(),
16usize,
concat!("Size of: ", stringify!(mshv_vp_registers))
);
assert_eq!(
::std::mem::align_of::<mshv_vp_registers>(),
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::<Self>::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<mshv_install_intercept> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_install_intercept>(),
16usize,
concat!("Size of: ", stringify!(mshv_install_intercept))
);
assert_eq!(
::std::mem::align_of::<mshv_install_intercept>(),
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::<Self>::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<mshv_assert_interrupt> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_assert_interrupt>(),
24usize,
concat!("Size of: ", stringify!(mshv_assert_interrupt))
);
assert_eq!(
::std::mem::align_of::<mshv_assert_interrupt>(),
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::<Self>::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<mshv_partition_property> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_partition_property>(),
16usize,
concat!("Size of: ", stringify!(mshv_partition_property))
);
assert_eq!(
::std::mem::align_of::<mshv_partition_property>(),
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::<Self>::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<mshv_translate_gva> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_translate_gva>(),
32usize,
concat!("Size of: ", stringify!(mshv_translate_gva))
);
assert_eq!(
::std::mem::align_of::<mshv_translate_gva>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct mshv_register_intercept_result {
pub intercept_type: __u32,
pub parameters: hv_register_intercept_result_parameters,
}
#[test]
fn bindgen_test_layout_mshv_register_intercept_result() {
const UNINIT: ::std::mem::MaybeUninit<mshv_register_intercept_result> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_register_intercept_result>(),
48usize,
concat!("Size of: ", stringify!(mshv_register_intercept_result))
);
assert_eq!(
::std::mem::align_of::<mshv_register_intercept_result>(),
4usize,
concat!("Alignment of ", stringify!(mshv_register_intercept_result))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).intercept_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_register_intercept_result),
"::",
stringify!(intercept_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).parameters) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(mshv_register_intercept_result),
"::",
stringify!(parameters)
)
);
}
impl Default for mshv_register_intercept_result {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, 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<mshv_signal_event_direct> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_signal_event_direct>(),
12usize,
concat!("Size of: ", stringify!(mshv_signal_event_direct))
);
assert_eq!(
::std::mem::align_of::<mshv_signal_event_direct>(),
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<mshv_post_message_direct> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_post_message_direct>(),
16usize,
concat!("Size of: ", stringify!(mshv_post_message_direct))
);
assert_eq!(
::std::mem::align_of::<mshv_post_message_direct>(),
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::<Self>::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<mshv_register_deliverabilty_notifications> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_register_deliverabilty_notifications>(),
16usize,
concat!(
"Size of: ",
stringify!(mshv_register_deliverabilty_notifications)
)
);
assert_eq!(
::std::mem::align_of::<mshv_register_deliverabilty_notifications>(),
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<mshv_get_vp_cpuid_values> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_get_vp_cpuid_values>(),
40usize,
concat!("Size of: ", stringify!(mshv_get_vp_cpuid_values))
);
assert_eq!(
::std::mem::align_of::<mshv_get_vp_cpuid_values>(),
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)]
#[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<mshv_read_write_gpa> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_read_write_gpa>(),
32usize,
concat!("Size of: ", stringify!(mshv_read_write_gpa))
);
assert_eq!(
::std::mem::align_of::<mshv_read_write_gpa>(),
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<mshv_sev_snp_ap_create> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_sev_snp_ap_create>(),
16usize,
concat!("Size of: ", stringify!(mshv_sev_snp_ap_create))
);
assert_eq!(
::std::mem::align_of::<mshv_sev_snp_ap_create>(),
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<mshv_issue_psp_guest_request> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_issue_psp_guest_request>(),
16usize,
concat!("Size of: ", stringify!(mshv_issue_psp_guest_request))
);
assert_eq!(
::std::mem::align_of::<mshv_issue_psp_guest_request>(),
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)
)
);
}
#[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<mshv_complete_isolated_import> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_complete_isolated_import>(),
3334usize,
concat!("Size of: ", stringify!(mshv_complete_isolated_import))
);
assert_eq!(
::std::mem::align_of::<mshv_complete_isolated_import>(),
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::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const MSHV_VTL_CAP_BIT_REGISTER_PAGE: _bindgen_ty_1 = 0;
pub const MSHV_VTL_CAP_BIT_RETURN_ACTION: _bindgen_ty_1 = 1;
pub const MSHV_VTL_CAP_BIT_DR6_SHARED: _bindgen_ty_1 = 2;
pub const MSHV_VTL_CAP_BIT_COUNT: _bindgen_ty_1 = 3;
pub type _bindgen_ty_1 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_vtl_capabilities {
pub bits: __u64,
}
#[test]
fn bindgen_test_layout_mshv_vtl_capabilities() {
const UNINIT: ::std::mem::MaybeUninit<mshv_vtl_capabilities> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_vtl_capabilities>(),
8usize,
concat!("Size of: ", stringify!(mshv_vtl_capabilities))
);
assert_eq!(
::std::mem::align_of::<mshv_vtl_capabilities>(),
8usize,
concat!("Alignment of ", stringify!(mshv_vtl_capabilities))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bits) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_vtl_capabilities),
"::",
stringify!(bits)
)
);
}
pub const MSHV_PT_BIT_LAPIC: _bindgen_ty_2 = 0;
pub const MSHV_PT_BIT_X2APIC: _bindgen_ty_2 = 1;
pub const MSHV_PT_BIT_GPA_SUPER_PAGES: _bindgen_ty_2 = 2;
pub const MSHV_PT_BIT_COUNT: _bindgen_ty_2 = 3;
pub type _bindgen_ty_2 = ::std::os::raw::c_uint;
pub const MSHV_PT_ISOLATION_NONE: _bindgen_ty_3 = 0;
pub const MSHV_PT_ISOLATION_SNP: _bindgen_ty_3 = 1;
pub const MSHV_PT_ISOLATION_COUNT: _bindgen_ty_3 = 2;
pub type _bindgen_ty_3 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_create_partition {
pub pt_flags: __u64,
pub pt_isolation: __u64,
}
#[test]
fn bindgen_test_layout_mshv_create_partition() {
const UNINIT: ::std::mem::MaybeUninit<mshv_create_partition> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_create_partition>(),
16usize,
concat!("Size of: ", stringify!(mshv_create_partition))
);
assert_eq!(
::std::mem::align_of::<mshv_create_partition>(),
8usize,
concat!("Alignment of ", stringify!(mshv_create_partition))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pt_flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_create_partition),
"::",
stringify!(pt_flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).pt_isolation) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_create_partition),
"::",
stringify!(pt_isolation)
)
);
}
#[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<mshv_create_vp> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_create_vp>(),
4usize,
concat!("Size of: ", stringify!(mshv_create_vp))
);
assert_eq!(
::std::mem::align_of::<mshv_create_vp>(),
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)
)
);
}
pub const MSHV_SET_MEM_BIT_WRITABLE: _bindgen_ty_4 = 0;
pub const MSHV_SET_MEM_BIT_EXECUTABLE: _bindgen_ty_4 = 1;
pub const MSHV_SET_MEM_BIT_UNMAP: _bindgen_ty_4 = 2;
pub const MSHV_SET_MEM_BIT_COUNT: _bindgen_ty_4 = 3;
pub type _bindgen_ty_4 = ::std::os::raw::c_uint;
#[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: __u8,
pub rsvd: [__u8; 7usize],
}
#[test]
fn bindgen_test_layout_mshv_user_mem_region() {
const UNINIT: ::std::mem::MaybeUninit<mshv_user_mem_region> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_user_mem_region>(),
32usize,
concat!("Size of: ", stringify!(mshv_user_mem_region))
);
assert_eq!(
::std::mem::align_of::<mshv_user_mem_region>(),
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)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
25usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_mem_region),
"::",
stringify!(rsvd)
)
);
}
pub const MSHV_IRQFD_BIT_DEASSIGN: _bindgen_ty_5 = 0;
pub const MSHV_IRQFD_BIT_RESAMPLE: _bindgen_ty_5 = 1;
pub const MSHV_IRQFD_BIT_COUNT: _bindgen_ty_5 = 2;
pub type _bindgen_ty_5 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_user_irqfd {
pub fd: __s32,
pub resamplefd: __s32,
pub gsi: __u32,
pub flags: __u32,
}
#[test]
fn bindgen_test_layout_mshv_user_irqfd() {
const UNINIT: ::std::mem::MaybeUninit<mshv_user_irqfd> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_user_irqfd>(),
16usize,
concat!("Size of: ", stringify!(mshv_user_irqfd))
);
assert_eq!(
::std::mem::align_of::<mshv_user_irqfd>(),
4usize,
concat!("Alignment of ", stringify!(mshv_user_irqfd))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irqfd),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).resamplefd) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irqfd),
"::",
stringify!(resamplefd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irqfd),
"::",
stringify!(gsi)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
12usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irqfd),
"::",
stringify!(flags)
)
);
}
pub const MSHV_IOEVENTFD_BIT_DATAMATCH: _bindgen_ty_6 = 0;
pub const MSHV_IOEVENTFD_BIT_PIO: _bindgen_ty_6 = 1;
pub const MSHV_IOEVENTFD_BIT_DEASSIGN: _bindgen_ty_6 = 2;
pub const MSHV_IOEVENTFD_BIT_COUNT: _bindgen_ty_6 = 3;
pub type _bindgen_ty_6 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_user_ioeventfd {
pub datamatch: __u64,
pub addr: __u64,
pub len: __u32,
pub fd: __s32,
pub flags: __u32,
pub rsvd: [__u8; 4usize],
}
#[test]
fn bindgen_test_layout_mshv_user_ioeventfd() {
const UNINIT: ::std::mem::MaybeUninit<mshv_user_ioeventfd> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_user_ioeventfd>(),
32usize,
concat!("Size of: ", stringify!(mshv_user_ioeventfd))
);
assert_eq!(
::std::mem::align_of::<mshv_user_ioeventfd>(),
8usize,
concat!("Alignment of ", stringify!(mshv_user_ioeventfd))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).datamatch) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_ioeventfd),
"::",
stringify!(datamatch)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).addr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_ioeventfd),
"::",
stringify!(addr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_ioeventfd),
"::",
stringify!(len)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).fd) as usize - ptr as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_ioeventfd),
"::",
stringify!(fd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_ioeventfd),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_ioeventfd),
"::",
stringify!(rsvd)
)
);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_user_irq_entry {
pub gsi: __u32,
pub address_lo: __u32,
pub address_hi: __u32,
pub data: __u32,
}
#[test]
fn bindgen_test_layout_mshv_user_irq_entry() {
const UNINIT: ::std::mem::MaybeUninit<mshv_user_irq_entry> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_user_irq_entry>(),
16usize,
concat!("Size of: ", stringify!(mshv_user_irq_entry))
);
assert_eq!(
::std::mem::align_of::<mshv_user_irq_entry>(),
4usize,
concat!("Alignment of ", stringify!(mshv_user_irq_entry))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gsi) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irq_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_user_irq_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_user_irq_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_user_irq_entry),
"::",
stringify!(data)
)
);
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct mshv_user_irq_table {
pub nr: __u32,
pub rsvd: __u32,
pub entries: __IncompleteArrayField<mshv_user_irq_entry>,
}
#[test]
fn bindgen_test_layout_mshv_user_irq_table() {
const UNINIT: ::std::mem::MaybeUninit<mshv_user_irq_table> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_user_irq_table>(),
8usize,
concat!("Size of: ", stringify!(mshv_user_irq_table))
);
assert_eq!(
::std::mem::align_of::<mshv_user_irq_table>(),
4usize,
concat!("Alignment of ", stringify!(mshv_user_irq_table))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).nr) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irq_table),
"::",
stringify!(nr)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irq_table),
"::",
stringify!(rsvd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).entries) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_user_irq_table),
"::",
stringify!(entries)
)
);
}
pub const MSHV_GPAP_ACCESS_TYPE_ACCESSED: _bindgen_ty_7 = 0;
pub const MSHV_GPAP_ACCESS_TYPE_DIRTY: _bindgen_ty_7 = 1;
pub const MSHV_GPAP_ACCESS_TYPE_COUNT: _bindgen_ty_7 = 2;
pub type _bindgen_ty_7 = ::std::os::raw::c_uint;
pub const MSHV_GPAP_ACCESS_OP_NOOP: _bindgen_ty_8 = 0;
pub const MSHV_GPAP_ACCESS_OP_CLEAR: _bindgen_ty_8 = 1;
pub const MSHV_GPAP_ACCESS_OP_SET: _bindgen_ty_8 = 2;
pub const MSHV_GPAP_ACCESS_OP_COUNT: _bindgen_ty_8 = 3;
pub type _bindgen_ty_8 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_gpap_access_bitmap {
pub access_type: __u8,
pub access_op: __u8,
pub rsvd: [__u8; 6usize],
pub page_count: __u64,
pub gpap_base: __u64,
pub bitmap_ptr: __u64,
}
#[test]
fn bindgen_test_layout_mshv_gpap_access_bitmap() {
const UNINIT: ::std::mem::MaybeUninit<mshv_gpap_access_bitmap> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_gpap_access_bitmap>(),
32usize,
concat!("Size of: ", stringify!(mshv_gpap_access_bitmap))
);
assert_eq!(
::std::mem::align_of::<mshv_gpap_access_bitmap>(),
8usize,
concat!("Alignment of ", stringify!(mshv_gpap_access_bitmap))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).access_type) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_gpap_access_bitmap),
"::",
stringify!(access_type)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).access_op) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(mshv_gpap_access_bitmap),
"::",
stringify!(access_op)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
2usize,
concat!(
"Offset of field: ",
stringify!(mshv_gpap_access_bitmap),
"::",
stringify!(rsvd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_count) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_gpap_access_bitmap),
"::",
stringify!(page_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).gpap_base) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(mshv_gpap_access_bitmap),
"::",
stringify!(gpap_base)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).bitmap_ptr) as usize - ptr as usize },
24usize,
concat!(
"Offset of field: ",
stringify!(mshv_gpap_access_bitmap),
"::",
stringify!(bitmap_ptr)
)
);
}
pub const MSHV_GPA_HOST_ACCESS_BIT_ACQUIRE: _bindgen_ty_9 = 0;
pub const MSHV_GPA_HOST_ACCESS_BIT_READABLE: _bindgen_ty_9 = 1;
pub const MSHV_GPA_HOST_ACCESS_BIT_WRITABLE: _bindgen_ty_9 = 2;
pub const MSHV_GPA_HOST_ACCESS_BIT_LARGE_PAGE: _bindgen_ty_9 = 3;
pub const MSHV_GPA_HOST_ACCESS_BIT_COUNT: _bindgen_ty_9 = 4;
pub type _bindgen_ty_9 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default)]
pub struct mshv_modify_gpa_host_access {
pub flags: __u8,
pub rsvd: [__u8; 7usize],
pub page_count: __u64,
pub guest_pfns: __IncompleteArrayField<__u64>,
}
#[test]
fn bindgen_test_layout_mshv_modify_gpa_host_access() {
const UNINIT: ::std::mem::MaybeUninit<mshv_modify_gpa_host_access> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_modify_gpa_host_access>(),
16usize,
concat!("Size of: ", stringify!(mshv_modify_gpa_host_access))
);
assert_eq!(
::std::mem::align_of::<mshv_modify_gpa_host_access>(),
8usize,
concat!("Alignment of ", stringify!(mshv_modify_gpa_host_access))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_modify_gpa_host_access),
"::",
stringify!(flags)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(mshv_modify_gpa_host_access),
"::",
stringify!(rsvd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_count) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_modify_gpa_host_access),
"::",
stringify!(page_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).guest_pfns) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(mshv_modify_gpa_host_access),
"::",
stringify!(guest_pfns)
)
);
}
pub const MSHV_ISOLATED_PAGE_NORMAL: _bindgen_ty_10 = 0;
pub const MSHV_ISOLATED_PAGE_VMSA: _bindgen_ty_10 = 1;
pub const MSHV_ISOLATED_PAGE_ZERO: _bindgen_ty_10 = 2;
pub const MSHV_ISOLATED_PAGE_UNMEASURED: _bindgen_ty_10 = 3;
pub const MSHV_ISOLATED_PAGE_SECRETS: _bindgen_ty_10 = 4;
pub const MSHV_ISOLATED_PAGE_CPUID: _bindgen_ty_10 = 5;
pub const MSHV_ISOLATED_PAGE_COUNT: _bindgen_ty_10 = 6;
pub type _bindgen_ty_10 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default)]
pub struct mshv_import_isolated_pages {
pub page_type: __u8,
pub rsvd: [__u8; 7usize],
pub page_count: __u64,
pub guest_pfns: __IncompleteArrayField<__u64>,
}
#[test]
fn bindgen_test_layout_mshv_import_isolated_pages() {
const UNINIT: ::std::mem::MaybeUninit<mshv_import_isolated_pages> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_import_isolated_pages>(),
16usize,
concat!("Size of: ", stringify!(mshv_import_isolated_pages))
);
assert_eq!(
::std::mem::align_of::<mshv_import_isolated_pages>(),
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).rsvd) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(mshv_import_isolated_pages),
"::",
stringify!(rsvd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).page_count) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_import_isolated_pages),
"::",
stringify!(page_count)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).guest_pfns) as usize - ptr as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(mshv_import_isolated_pages),
"::",
stringify!(guest_pfns)
)
);
}
#[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: [__u8; 6usize],
pub in_ptr: __u64,
pub out_ptr: __u64,
}
#[test]
fn bindgen_test_layout_mshv_root_hvcall() {
const UNINIT: ::std::mem::MaybeUninit<mshv_root_hvcall> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_root_hvcall>(),
32usize,
concat!("Size of: ", stringify!(mshv_root_hvcall))
);
assert_eq!(
::std::mem::align_of::<mshv_root_hvcall>(),
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)
)
);
}
pub const MSHV_VP_MMAP_OFFSET_REGISTERS: _bindgen_ty_11 = 0;
pub const MSHV_VP_MMAP_OFFSET_INTERCEPT_MESSAGE: _bindgen_ty_11 = 1;
pub const MSHV_VP_MMAP_OFFSET_GHCB: _bindgen_ty_11 = 2;
pub const MSHV_VP_MMAP_OFFSET_COUNT: _bindgen_ty_11 = 3;
pub type _bindgen_ty_11 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_run_vp {
pub msg_buf: [__u8; 256usize],
}
#[test]
fn bindgen_test_layout_mshv_run_vp() {
const UNINIT: ::std::mem::MaybeUninit<mshv_run_vp> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_run_vp>(),
256usize,
concat!("Size of: ", stringify!(mshv_run_vp))
);
assert_eq!(
::std::mem::align_of::<mshv_run_vp>(),
1usize,
concat!("Alignment of ", stringify!(mshv_run_vp))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).msg_buf) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_run_vp),
"::",
stringify!(msg_buf)
)
);
}
impl Default for mshv_run_vp {
fn default() -> Self {
let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
unsafe {
::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
s.assume_init()
}
}
}
pub const MSHV_VP_STATE_LAPIC: _bindgen_ty_12 = 0;
pub const MSHV_VP_STATE_XSAVE: _bindgen_ty_12 = 1;
pub const MSHV_VP_STATE_SIMP: _bindgen_ty_12 = 2;
pub const MSHV_VP_STATE_SIEFP: _bindgen_ty_12 = 3;
pub const MSHV_VP_STATE_SYNTHETIC_TIMERS: _bindgen_ty_12 = 4;
pub const MSHV_VP_STATE_COUNT: _bindgen_ty_12 = 5;
pub type _bindgen_ty_12 = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone, PartialOrd, Ord, PartialEq, Eq)]
pub struct mshv_get_set_vp_state {
pub type_: __u8,
pub rsvd: [__u8; 3usize],
pub buf_sz: __u32,
pub buf_ptr: __u64,
}
#[test]
fn bindgen_test_layout_mshv_get_set_vp_state() {
const UNINIT: ::std::mem::MaybeUninit<mshv_get_set_vp_state> =
::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_get_set_vp_state>(),
16usize,
concat!("Size of: ", stringify!(mshv_get_set_vp_state))
);
assert_eq!(
::std::mem::align_of::<mshv_get_set_vp_state>(),
8usize,
concat!("Alignment of ", stringify!(mshv_get_set_vp_state))
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(mshv_get_set_vp_state),
"::",
stringify!(type_)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).rsvd) as usize - ptr as usize },
1usize,
concat!(
"Offset of field: ",
stringify!(mshv_get_set_vp_state),
"::",
stringify!(rsvd)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buf_sz) as usize - ptr as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(mshv_get_set_vp_state),
"::",
stringify!(buf_sz)
)
);
assert_eq!(
unsafe { ::std::ptr::addr_of!((*ptr).buf_ptr) as usize - ptr as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(mshv_get_set_vp_state),
"::",
stringify!(buf_ptr)
)
);
}
pub const MSHV_DEV_TYPE_VFIO: _bindgen_ty_13 = 0;
pub const MSHV_DEV_TYPE_MAX: _bindgen_ty_13 = 1;
pub type _bindgen_ty_13 = ::std::os::raw::c_uint;
#[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<mshv_create_device> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_create_device>(),
12usize,
concat!("Size of: ", stringify!(mshv_create_device))
);
assert_eq!(
::std::mem::align_of::<mshv_create_device>(),
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)
)
);
}
#[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<mshv_device_attr> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_device_attr>(),
24usize,
concat!("Size of: ", stringify!(mshv_device_attr))
);
assert_eq!(
::std::mem::align_of::<mshv_device_attr>(),
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<mshv_trace_config> = ::std::mem::MaybeUninit::uninit();
let ptr = UNINIT.as_ptr();
assert_eq!(
::std::mem::size_of::<mshv_trace_config>(),
32usize,
concat!("Size of: ", stringify!(mshv_trace_config))
);
assert_eq!(
::std::mem::align_of::<mshv_trace_config>(),
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)
)
);
}