diff --git a/.github/workflows/ubuntu-prepare/action.yml b/.github/workflows/ubuntu-prepare/action.yml index bb808d92c9..0d64c6c10a 100644 --- a/.github/workflows/ubuntu-prepare/action.yml +++ b/.github/workflows/ubuntu-prepare/action.yml @@ -23,9 +23,10 @@ runs: - name: Add nightly clippy shell: bash run: rustup toolchain install nightly --component clippy --allow-downgrade - - name: Install cargo-hack + - uses: taiki-e/install-action@cargo-hack + - name: Add nightly shell: bash - run: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin + run: rustup toolchain install nightly --allow-downgrade - name: Default to nightly shell: bash run: rustup default nightly diff --git a/libafl_qemu/libafl_qemu_build/src/bindings.rs b/libafl_qemu/libafl_qemu_build/src/bindings.rs index a1b578841c..d5db70e9a9 100644 --- a/libafl_qemu/libafl_qemu_build/src/bindings.rs +++ b/libafl_qemu/libafl_qemu_build/src/bindings.rs @@ -53,9 +53,8 @@ const WRAPPER_HEADER: &str = r#" #include "migration/savevm.h" #include "hw/core/sysemu-cpu-ops.h" #include "exec/address-spaces.h" -#include "sysemu/tcg.h" -#include "sysemu/runstate.h" -#include "sysemu/replay.h" +#include "exec/target_page.h" +#include "system/system.h" #include "libafl/system.h" #include "libafl/qemu_snapshot.h" @@ -67,11 +66,9 @@ const WRAPPER_HEADER: &str = r#" #include "exec/cpu-common.h" #include "exec/cpu-all.h" #include "exec/exec-all.h" -#include "exec/translate-all.h" #include "exec/log.h" #include "trace/trace-root.h" #include "qemu/accel.h" -#include "hw/core/accel-cpu.h" #include "tcg/tcg.h" #include "tcg/tcg-op.h" @@ -122,6 +119,7 @@ pub fn generate( .derive_default(true) .impl_debug(true) .generate_comments(true) + .wrap_static_fns(true) .default_enum_style(bindgen::EnumVariation::NewType { is_global: true, is_bitfield: true, diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index 0f85b6dc9f..bdf7635f51 100644 --- a/libafl_qemu/libafl_qemu_build/src/build.rs +++ b/libafl_qemu/libafl_qemu_build/src/build.rs @@ -11,7 +11,7 @@ use crate::cargo_add_rpath; pub const QEMU_URL: &str = "https://github.com/AFLplusplus/qemu-libafl-bridge"; pub const QEMU_DIRNAME: &str = "qemu-libafl-bridge"; -pub const QEMU_REVISION: &str = "97bef506eed24ee8d0eda4a07c4419c55dae4acb"; +pub const QEMU_REVISION: &str = "0bea78a122b249cbffafdb130af04cc7331c9aee"; pub struct BuildResult { pub qemu_path: PathBuf, diff --git a/libafl_qemu/libafl_qemu_sys/src/bindings/mod.rs b/libafl_qemu/libafl_qemu_sys/src/bindings/mod.rs index 8f10efd39f..28099a3a22 100644 --- a/libafl_qemu/libafl_qemu_sys/src/bindings/mod.rs +++ b/libafl_qemu/libafl_qemu_sys/src/bindings/mod.rs @@ -6,6 +6,7 @@ #![expect(improper_ctypes)] #![expect(unsafe_op_in_unsafe_fn)] #![allow(unused_imports)] +#![allow(unnecessary_transmutes)] #[cfg(all(not(feature = "clippy"), target_os = "linux"))] #[rustfmt::skip] diff --git a/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs b/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs index f717d1b7b4..a2f8c3158a 100644 --- a/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs +++ b/libafl_qemu/libafl_qemu_sys/src/bindings/x86_64_stub_bindings.rs @@ -1,5 +1,5 @@ /* 1.88.0-nightly */ -/* qemu git hash: 97bef506eed24ee8d0eda4a07c4419c55dae4acb */ +/* qemu git hash: 93663809156a33475ade972cdd5b1301b9310687 */ /* automatically generated by rust-bindgen 0.71.1 */ use libc::siginfo_t; @@ -305,11 +305,12 @@ impl Default for __pthread_mutex_s { pub struct __pthread_cond_s { pub __wseq: __atomic_wide_counter, pub __g1_start: __atomic_wide_counter, - pub __g_refs: [::std::os::raw::c_uint; 2usize], pub __g_size: [::std::os::raw::c_uint; 2usize], pub __g1_orig_size: ::std::os::raw::c_uint, pub __wrefs: ::std::os::raw::c_uint, pub __g_signals: [::std::os::raw::c_uint; 2usize], + pub __unused_initialized_1: ::std::os::raw::c_uint, + pub __unused_initialized_2: ::std::os::raw::c_uint, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { @@ -319,16 +320,18 @@ const _: () = { [::std::mem::offset_of!(__pthread_cond_s, __wseq) - 0usize]; ["Offset of field: __pthread_cond_s::__g1_start"] [::std::mem::offset_of!(__pthread_cond_s, __g1_start) - 8usize]; - ["Offset of field: __pthread_cond_s::__g_refs"] - [::std::mem::offset_of!(__pthread_cond_s, __g_refs) - 16usize]; ["Offset of field: __pthread_cond_s::__g_size"] - [::std::mem::offset_of!(__pthread_cond_s, __g_size) - 24usize]; + [::std::mem::offset_of!(__pthread_cond_s, __g_size) - 16usize]; ["Offset of field: __pthread_cond_s::__g1_orig_size"] - [::std::mem::offset_of!(__pthread_cond_s, __g1_orig_size) - 32usize]; + [::std::mem::offset_of!(__pthread_cond_s, __g1_orig_size) - 24usize]; ["Offset of field: __pthread_cond_s::__wrefs"] - [::std::mem::offset_of!(__pthread_cond_s, __wrefs) - 36usize]; + [::std::mem::offset_of!(__pthread_cond_s, __wrefs) - 28usize]; ["Offset of field: __pthread_cond_s::__g_signals"] - [::std::mem::offset_of!(__pthread_cond_s, __g_signals) - 40usize]; + [::std::mem::offset_of!(__pthread_cond_s, __g_signals) - 32usize]; + ["Offset of field: __pthread_cond_s::__unused_initialized_1"] + [::std::mem::offset_of!(__pthread_cond_s, __unused_initialized_1) - 40usize]; + ["Offset of field: __pthread_cond_s::__unused_initialized_2"] + [::std::mem::offset_of!(__pthread_cond_s, __unused_initialized_2) - 44usize]; }; impl Default for __pthread_cond_s { fn default() -> Self { @@ -343,14 +346,15 @@ impl ::std::fmt::Debug for __pthread_cond_s { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( f, - "__pthread_cond_s {{ __wseq: {:?}, __g1_start: {:?}, __g_refs: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?} }}", + "__pthread_cond_s {{ __wseq: {:?}, __g1_start: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?}, __unused_initialized_1: {:?}, __unused_initialized_2: {:?} }}", self.__wseq, self.__g1_start, - self.__g_refs, self.__g_size, self.__g1_orig_size, self.__wrefs, - self.__g_signals + self.__g_signals, + self.__unused_initialized_1, + self.__unused_initialized_2 ) } } @@ -454,7 +458,9 @@ pub struct _IO_FILE { pub _markers: *mut _IO_marker, pub _chain: *mut _IO_FILE, pub _fileno: ::std::os::raw::c_int, - pub _flags2: ::std::os::raw::c_int, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>, + pub _short_backupbuf: [::std::os::raw::c_char; 1usize], pub _old_offset: __off_t, pub _cur_column: ::std::os::raw::c_ushort, pub _vtable_offset: ::std::os::raw::c_schar, @@ -465,7 +471,7 @@ pub struct _IO_FILE { pub _wide_data: *mut _IO_wide_data, pub _freeres_list: *mut _IO_FILE, pub _freeres_buf: *mut ::std::os::raw::c_void, - pub __pad5: usize, + pub _prevchain: *mut *mut _IO_FILE, pub _mode: ::std::os::raw::c_int, pub _unused2: [::std::os::raw::c_char; 20usize], } @@ -499,7 +505,8 @@ const _: () = { ["Offset of field: _IO_FILE::_markers"][::std::mem::offset_of!(_IO_FILE, _markers) - 96usize]; ["Offset of field: _IO_FILE::_chain"][::std::mem::offset_of!(_IO_FILE, _chain) - 104usize]; ["Offset of field: _IO_FILE::_fileno"][::std::mem::offset_of!(_IO_FILE, _fileno) - 112usize]; - ["Offset of field: _IO_FILE::_flags2"][::std::mem::offset_of!(_IO_FILE, _flags2) - 116usize]; + ["Offset of field: _IO_FILE::_short_backupbuf"] + [::std::mem::offset_of!(_IO_FILE, _short_backupbuf) - 119usize]; ["Offset of field: _IO_FILE::_old_offset"] [::std::mem::offset_of!(_IO_FILE, _old_offset) - 120usize]; ["Offset of field: _IO_FILE::_cur_column"] @@ -517,7 +524,8 @@ const _: () = { [::std::mem::offset_of!(_IO_FILE, _freeres_list) - 168usize]; ["Offset of field: _IO_FILE::_freeres_buf"] [::std::mem::offset_of!(_IO_FILE, _freeres_buf) - 176usize]; - ["Offset of field: _IO_FILE::__pad5"][::std::mem::offset_of!(_IO_FILE, __pad5) - 184usize]; + ["Offset of field: _IO_FILE::_prevchain"] + [::std::mem::offset_of!(_IO_FILE, _prevchain) - 184usize]; ["Offset of field: _IO_FILE::_mode"][::std::mem::offset_of!(_IO_FILE, _mode) - 192usize]; ["Offset of field: _IO_FILE::_unused2"][::std::mem::offset_of!(_IO_FILE, _unused2) - 196usize]; }; @@ -530,6 +538,50 @@ impl Default for _IO_FILE { } } } +impl _IO_FILE { + #[inline] + pub fn _flags2(&self) -> ::std::os::raw::c_int { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } + } + #[inline] + pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } + } + #[inline] + pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 24u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 24u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 24u8, { + let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) }; + _flags2 as u64 + }); + __bindgen_bitfield_unit + } +} pub type __jmp_buf = [::std::os::raw::c_long; 8usize]; #[repr(C)] #[derive(Debug, Default, Copy, Clone)] @@ -1008,11 +1060,6 @@ pub struct MemoryRegion { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct QDict { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct QObject { _unused: [u8; 0], } @@ -1051,7 +1098,7 @@ pub type qemu_irq = *mut IRQState; #[derive(Debug, Copy, Clone)] pub struct QEnumLookup { pub array: *const *const ::std::os::raw::c_char, - pub special_features: *const ::std::os::raw::c_uchar, + pub features: *const u64, pub size: ::std::os::raw::c_int, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] @@ -1059,8 +1106,8 @@ const _: () = { ["Size of QEnumLookup"][::std::mem::size_of::() - 24usize]; ["Alignment of QEnumLookup"][::std::mem::align_of::() - 8usize]; ["Offset of field: QEnumLookup::array"][::std::mem::offset_of!(QEnumLookup, array) - 0usize]; - ["Offset of field: QEnumLookup::special_features"] - [::std::mem::offset_of!(QEnumLookup, special_features) - 8usize]; + ["Offset of field: QEnumLookup::features"] + [::std::mem::offset_of!(QEnumLookup, features) - 8usize]; ["Offset of field: QEnumLookup::size"][::std::mem::offset_of!(QEnumLookup, size) - 16usize]; }; impl Default for QEnumLookup { @@ -1072,11 +1119,31 @@ impl Default for QEnumLookup { } } } -unsafe extern "C" { - pub fn qemu_target_page_size() -> usize; +pub type target_long = i64; +pub type target_ulong = u64; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct QTailQLink { + pub tql_next: *mut ::std::os::raw::c_void, + pub tql_prev: *mut QTailQLink, } -unsafe extern "C" { - pub fn qemu_target_page_mask() -> ::std::os::raw::c_int; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of QTailQLink"][::std::mem::size_of::() - 16usize]; + ["Alignment of QTailQLink"][::std::mem::align_of::() - 8usize]; + ["Offset of field: QTailQLink::tql_next"] + [::std::mem::offset_of!(QTailQLink, tql_next) - 0usize]; + ["Offset of field: QTailQLink::tql_prev"] + [::std::mem::offset_of!(QTailQLink, tql_prev) - 8usize]; +}; +impl Default for QTailQLink { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } } #[repr(C)] #[derive(Copy, Clone)] @@ -1165,316 +1232,6 @@ const _: () = { ["Offset of field: QemuSpin::value"][::std::mem::offset_of!(QemuSpin, value) - 0usize]; }; #[repr(C)] -#[repr(align(4))] -#[derive(Debug, Default, Copy, Clone)] -pub struct MemTxAttrs { - pub _bitfield_align_1: [u16; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of MemTxAttrs"][::std::mem::size_of::() - 4usize]; - ["Alignment of MemTxAttrs"][::std::mem::align_of::() - 4usize]; -}; -impl MemTxAttrs { - #[inline] - pub fn unspecified(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } - } - #[inline] - pub fn set_unspecified(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 1u8, val as u64) - } - } - #[inline] - pub unsafe fn unspecified_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 0usize, - 1u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_unspecified_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 0usize, - 1u8, - val as u64, - ) - } - } - #[inline] - pub fn secure(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u32) } - } - #[inline] - pub fn set_secure(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) - } - } - #[inline] - pub unsafe fn secure_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 1usize, - 1u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_secure_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 1usize, - 1u8, - val as u64, - ) - } - } - #[inline] - pub fn space(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u32) } - } - #[inline] - pub fn set_space(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(2usize, 2u8, val as u64) - } - } - #[inline] - pub unsafe fn space_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 2usize, - 2u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_space_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 2usize, - 2u8, - val as u64, - ) - } - } - #[inline] - pub fn user(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } - } - #[inline] - pub fn set_user(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(4usize, 1u8, val as u64) - } - } - #[inline] - pub unsafe fn user_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 4usize, - 1u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_user_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 4usize, - 1u8, - val as u64, - ) - } - } - #[inline] - pub fn memory(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } - } - #[inline] - pub fn set_memory(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(5usize, 1u8, val as u64) - } - } - #[inline] - pub unsafe fn memory_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 5usize, - 1u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_memory_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 5usize, - 1u8, - val as u64, - ) - } - } - #[inline] - pub fn requester_id(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 16u8) as u32) } - } - #[inline] - pub fn set_requester_id(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(6usize, 16u8, val as u64) - } - } - #[inline] - pub unsafe fn requester_id_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 6usize, - 16u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_requester_id_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 6usize, - 16u8, - val as u64, - ) - } - } - #[inline] - pub fn pid(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 8u8) as u32) } - } - #[inline] - pub fn set_pid(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(22usize, 8u8, val as u64) - } - } - #[inline] - pub unsafe fn pid_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 22usize, - 8u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_pid_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 22usize, - 8u8, - val as u64, - ) - } - } - #[inline] - pub fn new_bitfield_1( - unspecified: ::std::os::raw::c_uint, - secure: ::std::os::raw::c_uint, - space: ::std::os::raw::c_uint, - user: ::std::os::raw::c_uint, - memory: ::std::os::raw::c_uint, - requester_id: ::std::os::raw::c_uint, - pid: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 1u8, { - let unspecified: u32 = unsafe { ::std::mem::transmute(unspecified) }; - unspecified as u64 - }); - __bindgen_bitfield_unit.set(1usize, 1u8, { - let secure: u32 = unsafe { ::std::mem::transmute(secure) }; - secure as u64 - }); - __bindgen_bitfield_unit.set(2usize, 2u8, { - let space: u32 = unsafe { ::std::mem::transmute(space) }; - space as u64 - }); - __bindgen_bitfield_unit.set(4usize, 1u8, { - let user: u32 = unsafe { ::std::mem::transmute(user) }; - user as u64 - }); - __bindgen_bitfield_unit.set(5usize, 1u8, { - let memory: u32 = unsafe { ::std::mem::transmute(memory) }; - memory as u64 - }); - __bindgen_bitfield_unit.set(6usize, 16u8, { - let requester_id: u32 = unsafe { ::std::mem::transmute(requester_id) }; - requester_id as u64 - }); - __bindgen_bitfield_unit.set(22usize, 8u8, { - let pid: u32 = unsafe { ::std::mem::transmute(pid) }; - pid as u64 - }); - __bindgen_bitfield_unit - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct QTailQLink { - pub tql_next: *mut ::std::os::raw::c_void, - pub tql_prev: *mut QTailQLink, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of QTailQLink"][::std::mem::size_of::() - 16usize]; - ["Alignment of QTailQLink"][::std::mem::align_of::() - 8usize]; - ["Offset of field: QTailQLink::tql_next"] - [::std::mem::offset_of!(QTailQLink, tql_next) - 0usize]; - ["Offset of field: QTailQLink::tql_prev"] - [::std::mem::offset_of!(QTailQLink, tql_prev) - 8usize]; -}; -impl Default for QTailQLink { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] #[derive(Debug, Copy, Clone)] pub struct Notifier { pub notify: ::std::option::Option< @@ -1740,6 +1497,8 @@ pub struct DeviceClass { pub desc: *const ::std::os::raw::c_char, #[doc = " @props_: properties associated with device, should only be\n assigned by using device_class_set_props(). The underscore\n ensures a compile-time error if someone attempts to assign\n dc->props directly."] pub props_: *const Property, + #[doc = " @props_count_: number of elements in @props_; should only be\n assigned by using device_class_set_props()."] + pub props_count_: u16, #[doc = " @user_creatable: Can user instantiate with -device / device_add?\n\n All devices should support instantiation with device_add, and\n this flag should not exist. But we're not there, yet. Some\n devices fail to instantiate with cryptic error messages.\n Others instantiate, but don't work. Exposing users to such\n behavior would be cruel; clearing this flag will protect them.\n It should never be cleared without a comment explaining why it\n is cleared.\n\n TODO remove once we're there"] pub user_creatable: bool, pub hotpluggable: bool, @@ -1766,10 +1525,12 @@ const _: () = { ["Offset of field: DeviceClass::desc"][::std::mem::offset_of!(DeviceClass, desc) - 112usize]; ["Offset of field: DeviceClass::props_"] [::std::mem::offset_of!(DeviceClass, props_) - 120usize]; + ["Offset of field: DeviceClass::props_count_"] + [::std::mem::offset_of!(DeviceClass, props_count_) - 128usize]; ["Offset of field: DeviceClass::user_creatable"] - [::std::mem::offset_of!(DeviceClass, user_creatable) - 128usize]; + [::std::mem::offset_of!(DeviceClass, user_creatable) - 130usize]; ["Offset of field: DeviceClass::hotpluggable"] - [::std::mem::offset_of!(DeviceClass, hotpluggable) - 129usize]; + [::std::mem::offset_of!(DeviceClass, hotpluggable) - 131usize]; ["Offset of field: DeviceClass::legacy_reset"] [::std::mem::offset_of!(DeviceClass, legacy_reset) - 136usize]; ["Offset of field: DeviceClass::realize"] @@ -1996,8 +1757,6 @@ pub struct DeviceState { pub pending_deleted_event: bool, #[doc = " @pending_deleted_expires_ms: optional timeout for deletion events"] pub pending_deleted_expires_ms: i64, - #[doc = " @opts: QDict of options for the device"] - pub opts: *mut QDict, #[doc = " @hotplugged: was device added after PHASE_MACHINE_READY?"] pub hotplugged: ::std::os::raw::c_int, #[doc = " @allow_unplug_during_migration: can device be unplugged during migration"] @@ -2025,7 +1784,7 @@ pub struct DeviceState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of DeviceState"][::std::mem::size_of::() - 160usize]; + ["Size of DeviceState"][::std::mem::size_of::() - 152usize]; ["Alignment of DeviceState"][::std::mem::align_of::() - 8usize]; ["Offset of field: DeviceState::parent_obj"] [::std::mem::offset_of!(DeviceState, parent_obj) - 0usize]; @@ -2038,29 +1797,27 @@ const _: () = { [::std::mem::offset_of!(DeviceState, pending_deleted_event) - 57usize]; ["Offset of field: DeviceState::pending_deleted_expires_ms"] [::std::mem::offset_of!(DeviceState, pending_deleted_expires_ms) - 64usize]; - ["Offset of field: DeviceState::opts"][::std::mem::offset_of!(DeviceState, opts) - 72usize]; ["Offset of field: DeviceState::hotplugged"] - [::std::mem::offset_of!(DeviceState, hotplugged) - 80usize]; + [::std::mem::offset_of!(DeviceState, hotplugged) - 72usize]; ["Offset of field: DeviceState::allow_unplug_during_migration"] - [::std::mem::offset_of!(DeviceState, allow_unplug_during_migration) - 84usize]; + [::std::mem::offset_of!(DeviceState, allow_unplug_during_migration) - 76usize]; ["Offset of field: DeviceState::parent_bus"] - [::std::mem::offset_of!(DeviceState, parent_bus) - 88usize]; - ["Offset of field: DeviceState::gpios"][::std::mem::offset_of!(DeviceState, gpios) - 96usize]; - ["Offset of field: DeviceState::clocks"] - [::std::mem::offset_of!(DeviceState, clocks) - 104usize]; + [::std::mem::offset_of!(DeviceState, parent_bus) - 80usize]; + ["Offset of field: DeviceState::gpios"][::std::mem::offset_of!(DeviceState, gpios) - 88usize]; + ["Offset of field: DeviceState::clocks"][::std::mem::offset_of!(DeviceState, clocks) - 96usize]; ["Offset of field: DeviceState::child_bus"] - [::std::mem::offset_of!(DeviceState, child_bus) - 112usize]; + [::std::mem::offset_of!(DeviceState, child_bus) - 104usize]; ["Offset of field: DeviceState::num_child_bus"] - [::std::mem::offset_of!(DeviceState, num_child_bus) - 120usize]; + [::std::mem::offset_of!(DeviceState, num_child_bus) - 112usize]; ["Offset of field: DeviceState::instance_id_alias"] - [::std::mem::offset_of!(DeviceState, instance_id_alias) - 124usize]; + [::std::mem::offset_of!(DeviceState, instance_id_alias) - 116usize]; ["Offset of field: DeviceState::alias_required_for_version"] - [::std::mem::offset_of!(DeviceState, alias_required_for_version) - 128usize]; - ["Offset of field: DeviceState::reset"][::std::mem::offset_of!(DeviceState, reset) - 132usize]; + [::std::mem::offset_of!(DeviceState, alias_required_for_version) - 120usize]; + ["Offset of field: DeviceState::reset"][::std::mem::offset_of!(DeviceState, reset) - 124usize]; ["Offset of field: DeviceState::unplug_blockers"] - [::std::mem::offset_of!(DeviceState, unplug_blockers) - 144usize]; + [::std::mem::offset_of!(DeviceState, unplug_blockers) - 136usize]; ["Offset of field: DeviceState::mem_reentrancy_guard"] - [::std::mem::offset_of!(DeviceState, mem_reentrancy_guard) - 152usize]; + [::std::mem::offset_of!(DeviceState, mem_reentrancy_guard) - 144usize]; }; impl Default for DeviceState { fn default() -> Self { @@ -2254,6 +2011,154 @@ impl ::std::fmt::Debug for BusState { ) } } +#[doc = " Property:\n @set_default: true if the default value should be set from @defval,\n in which case @info->set_default_value must not be NULL\n (if false then no default value is set by the property system\n and the field retains whatever value it was given by instance_init).\n @defval: default value for the property. This is used only if @set_default\n is true."] +#[repr(C)] +#[derive(Copy, Clone)] +pub struct Property { + pub name: *const ::std::os::raw::c_char, + pub info: *const PropertyInfo, + pub offset: isize, + pub link_type: *const ::std::os::raw::c_char, + pub bitmask: u64, + pub defval: Property__bindgen_ty_1, + pub arrayinfo: *const PropertyInfo, + pub arrayoffset: ::std::os::raw::c_int, + pub arrayfieldsize: ::std::os::raw::c_int, + pub bitnr: u8, + pub set_default: bool, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union Property__bindgen_ty_1 { + pub i: i64, + pub u: u64, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Property__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; + ["Alignment of Property__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: Property__bindgen_ty_1::i"] + [::std::mem::offset_of!(Property__bindgen_ty_1, i) - 0usize]; + ["Offset of field: Property__bindgen_ty_1::u"] + [::std::mem::offset_of!(Property__bindgen_ty_1, u) - 0usize]; +}; +impl Default for Property__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for Property__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "Property__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Property"][::std::mem::size_of::() - 72usize]; + ["Alignment of Property"][::std::mem::align_of::() - 8usize]; + ["Offset of field: Property::name"][::std::mem::offset_of!(Property, name) - 0usize]; + ["Offset of field: Property::info"][::std::mem::offset_of!(Property, info) - 8usize]; + ["Offset of field: Property::offset"][::std::mem::offset_of!(Property, offset) - 16usize]; + ["Offset of field: Property::link_type"][::std::mem::offset_of!(Property, link_type) - 24usize]; + ["Offset of field: Property::bitmask"][::std::mem::offset_of!(Property, bitmask) - 32usize]; + ["Offset of field: Property::defval"][::std::mem::offset_of!(Property, defval) - 40usize]; + ["Offset of field: Property::arrayinfo"][::std::mem::offset_of!(Property, arrayinfo) - 48usize]; + ["Offset of field: Property::arrayoffset"] + [::std::mem::offset_of!(Property, arrayoffset) - 56usize]; + ["Offset of field: Property::arrayfieldsize"] + [::std::mem::offset_of!(Property, arrayfieldsize) - 60usize]; + ["Offset of field: Property::bitnr"][::std::mem::offset_of!(Property, bitnr) - 64usize]; + ["Offset of field: Property::set_default"] + [::std::mem::offset_of!(Property, set_default) - 65usize]; +}; +impl Default for Property { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for Property { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "Property {{ name: {:?}, info: {:?}, link_type: {:?}, defval: {:?}, arrayinfo: {:?}, arrayoffset: {:?}, arrayfieldsize: {:?}, set_default: {:?} }}", + self.name, + self.info, + self.link_type, + self.defval, + self.arrayinfo, + self.arrayoffset, + self.arrayfieldsize, + self.set_default + ) + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct PropertyInfo { + pub type_: *const ::std::os::raw::c_char, + pub description: *const ::std::os::raw::c_char, + pub enum_table: *const QEnumLookup, + pub realized_set_allowed: bool, + pub print: ::std::option::Option< + unsafe extern "C" fn( + obj: *mut Object, + prop: *const Property, + dest: *mut ::std::os::raw::c_char, + len: usize, + ) -> ::std::os::raw::c_int, + >, + pub set_default_value: + ::std::option::Option, + pub create: ::std::option::Option< + unsafe extern "C" fn( + oc: *mut ObjectClass, + name: *const ::std::os::raw::c_char, + prop: *const Property, + ) -> *mut ObjectProperty, + >, + pub get: ObjectPropertyAccessor, + pub set: ObjectPropertyAccessor, + pub release: ObjectPropertyRelease, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of PropertyInfo"][::std::mem::size_of::() - 80usize]; + ["Alignment of PropertyInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: PropertyInfo::type_"][::std::mem::offset_of!(PropertyInfo, type_) - 0usize]; + ["Offset of field: PropertyInfo::description"] + [::std::mem::offset_of!(PropertyInfo, description) - 8usize]; + ["Offset of field: PropertyInfo::enum_table"] + [::std::mem::offset_of!(PropertyInfo, enum_table) - 16usize]; + ["Offset of field: PropertyInfo::realized_set_allowed"] + [::std::mem::offset_of!(PropertyInfo, realized_set_allowed) - 24usize]; + ["Offset of field: PropertyInfo::print"][::std::mem::offset_of!(PropertyInfo, print) - 32usize]; + ["Offset of field: PropertyInfo::set_default_value"] + [::std::mem::offset_of!(PropertyInfo, set_default_value) - 40usize]; + ["Offset of field: PropertyInfo::create"] + [::std::mem::offset_of!(PropertyInfo, create) - 48usize]; + ["Offset of field: PropertyInfo::get"][::std::mem::offset_of!(PropertyInfo, get) - 56usize]; + ["Offset of field: PropertyInfo::set"][::std::mem::offset_of!(PropertyInfo, set) - 64usize]; + ["Offset of field: PropertyInfo::release"] + [::std::mem::offset_of!(PropertyInfo, release) - 72usize]; +}; +impl Default for PropertyInfo { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} pub type PTR = *mut ::std::os::raw::c_void; pub type bfd_vma = u64; pub type bfd_byte = u8; @@ -2655,8 +2560,303 @@ impl Default for disassemble_info { } } } -#[doc = " vaddr:\n Type wide enough to contain any #target_ulong virtual address."] -pub type vaddr = u64; +#[doc = " vaddr:\n Type wide enough to contain any #target_ulong virtual address.\n We do not support 64-bit guest on 32-host and detect at configure time.\n Therefore, a host pointer width will always fit a guest pointer."] +pub type vaddr = usize; +#[repr(C)] +#[repr(align(4))] +#[derive(Debug, Default, Copy, Clone)] +pub struct MemTxAttrs { + pub _bitfield_align_1: [u16; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>, + pub unspecified: bool, + pub _reserved1: u8, + pub _reserved2: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of MemTxAttrs"][::std::mem::size_of::() - 8usize]; + ["Alignment of MemTxAttrs"][::std::mem::align_of::() - 4usize]; + ["Offset of field: MemTxAttrs::unspecified"] + [::std::mem::offset_of!(MemTxAttrs, unspecified) - 4usize]; + ["Offset of field: MemTxAttrs::_reserved1"] + [::std::mem::offset_of!(MemTxAttrs, _reserved1) - 5usize]; + ["Offset of field: MemTxAttrs::_reserved2"] + [::std::mem::offset_of!(MemTxAttrs, _reserved2) - 6usize]; +}; +impl MemTxAttrs { + #[inline] + pub fn secure(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) } + } + #[inline] + pub fn set_secure(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn secure_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_secure_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn space(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } + } + #[inline] + pub fn set_space(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn space_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_space_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 1usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn user(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } + } + #[inline] + pub fn set_user(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn user_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 3usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_user_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 3usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn memory(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } + } + #[inline] + pub fn set_memory(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(4usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn memory_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 4usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_memory_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 4usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn debug(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } + } + #[inline] + pub fn set_debug(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(5usize, 1u8, val as u64) + } + } + #[inline] + pub unsafe fn debug_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 5usize, + 1u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_debug_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 5usize, + 1u8, + val as u64, + ) + } + } + #[inline] + pub fn requester_id(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 16u8) as u32) } + } + #[inline] + pub fn set_requester_id(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(6usize, 16u8, val as u64) + } + } + #[inline] + pub unsafe fn requester_id_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 6usize, + 16u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_requester_id_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 6usize, + 16u8, + val as u64, + ) + } + } + #[inline] + pub fn pid(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 8u8) as u32) } + } + #[inline] + pub fn set_pid(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(22usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn pid_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 22usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_pid_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 22usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + secure: ::std::os::raw::c_uint, + space: ::std::os::raw::c_uint, + user: ::std::os::raw::c_uint, + memory: ::std::os::raw::c_uint, + debug: ::std::os::raw::c_uint, + requester_id: ::std::os::raw::c_uint, + pid: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 1u8, { + let secure: u32 = unsafe { ::std::mem::transmute(secure) }; + secure as u64 + }); + __bindgen_bitfield_unit.set(1usize, 2u8, { + let space: u32 = unsafe { ::std::mem::transmute(space) }; + space as u64 + }); + __bindgen_bitfield_unit.set(3usize, 1u8, { + let user: u32 = unsafe { ::std::mem::transmute(user) }; + user as u64 + }); + __bindgen_bitfield_unit.set(4usize, 1u8, { + let memory: u32 = unsafe { ::std::mem::transmute(memory) }; + memory as u64 + }); + __bindgen_bitfield_unit.set(5usize, 1u8, { + let debug: u32 = unsafe { ::std::mem::transmute(debug) }; + debug as u64 + }); + __bindgen_bitfield_unit.set(6usize, 16u8, { + let requester_id: u32 = unsafe { ::std::mem::transmute(requester_id) }; + requester_id as u64 + }); + __bindgen_bitfield_unit.set(22usize, 8u8, { + let pid: u32 = unsafe { ::std::mem::transmute(pid) }; + pid as u64 + }); + __bindgen_bitfield_unit + } +} #[repr(C)] #[derive(Copy, Clone)] pub struct CPUBreakpoint { @@ -2766,7 +2966,7 @@ impl ::std::fmt::Debug for CPUWatchpoint__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUWatchpoint"][::std::mem::size_of::() - 48usize]; + ["Size of CPUWatchpoint"][::std::mem::size_of::() - 56usize]; ["Alignment of CPUWatchpoint"][::std::mem::align_of::() - 8usize]; ["Offset of field: CPUWatchpoint::vaddr"] [::std::mem::offset_of!(CPUWatchpoint, vaddr) - 0usize]; @@ -2776,9 +2976,9 @@ const _: () = { ["Offset of field: CPUWatchpoint::hitattrs"] [::std::mem::offset_of!(CPUWatchpoint, hitattrs) - 24usize]; ["Offset of field: CPUWatchpoint::flags"] - [::std::mem::offset_of!(CPUWatchpoint, flags) - 28usize]; + [::std::mem::offset_of!(CPUWatchpoint, flags) - 32usize]; ["Offset of field: CPUWatchpoint::entry"] - [::std::mem::offset_of!(CPUWatchpoint, entry) - 32usize]; + [::std::mem::offset_of!(CPUWatchpoint, entry) - 40usize]; }; impl Default for CPUWatchpoint { fn default() -> Self { @@ -2803,14 +3003,14 @@ pub type hwaddr = u64; #[derive(Copy, Clone)] pub union CPUTLBEntry { pub __bindgen_anon_1: CPUTLBEntry__bindgen_ty_1, - pub addr_idx: [u64; 4usize], + pub addr_idx: [usize; 4usize], } #[repr(C)] #[derive(Debug, Default, Copy, Clone)] pub struct CPUTLBEntry__bindgen_ty_1 { - pub addr_read: u64, - pub addr_write: u64, - pub addr_code: u64, + pub addr_read: usize, + pub addr_write: usize, + pub addr_code: usize, pub addend: usize, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] @@ -3305,10 +3505,15 @@ pub struct CPUJumpCache { } #[repr(C)] #[derive(Debug, Copy, Clone)] +pub struct AccelCPUClass { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] pub struct SysemuCPUOps { _unused: [u8; 0], } -#[doc = " CPUClass:\n @class_by_name: Callback to map -cpu command line model name to an\n instantiatable CPU type.\n @parse_features: Callback to parse command line arguments.\n @reset_dump_flags: #CPUDumpFlags to use for reset logging.\n @has_work: Callback for checking if there is work to do.\n @mmu_index: Callback for choosing softmmu mmu index;\n may be used internally by memory_rw_debug without TCG.\n @memory_rw_debug: Callback for GDB memory access.\n @dump_state: Callback for dumping state.\n @query_cpu_fast:\n Fill in target specific information for the \"query-cpus-fast\"\n QAPI call.\n @get_arch_id: Callback for getting architecture-dependent CPU ID.\n @set_pc: Callback for setting the Program Counter register. This\n should have the semantics used by the target architecture when\n setting the PC from a source such as an ELF file entry point;\n for example on Arm it will also set the Thumb mode bit based\n on the least significant bit of the new PC value.\n If the target behaviour here is anything other than \"set\n the PC register to the value passed in\" then the target must\n also implement the synchronize_from_tb hook.\n @get_pc: Callback for getting the Program Counter register.\n As above, with the semantics of the target architecture.\n @gdb_read_register: Callback for letting GDB read a register.\n @gdb_write_register: Callback for letting GDB write a register.\n @gdb_adjust_breakpoint: Callback for adjusting the address of a\n breakpoint. Used by AVR to handle a gdb mis-feature with\n its Harvard architecture split code and data.\n @gdb_num_core_regs: Number of core registers accessible to GDB or 0 to infer\n from @gdb_core_xml_file.\n @gdb_core_xml_file: File name for core registers GDB XML description.\n @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop\n before the insn which triggers a watchpoint rather than after it.\n @gdb_arch_name: Optional callback that returns the architecture name known\n to GDB. The caller must free the returned string with g_free.\n @disas_set_info: Setup architecture specific components of disassembly info\n @adjust_watchpoint_address: Perform a target-specific adjustment to an\n address before attempting to match it against watchpoints.\n @deprecation_note: If this CPUClass is deprecated, this field provides\n related information.\n\n Represents a CPU family or model."] +#[doc = " CPUClass:\n @class_by_name: Callback to map -cpu command line model name to an\n instantiatable CPU type.\n @parse_features: Callback to parse command line arguments.\n @reset_dump_flags: #CPUDumpFlags to use for reset logging.\n @mmu_index: Callback for choosing softmmu mmu index;\n may be used internally by memory_rw_debug without TCG.\n @memory_rw_debug: Callback for GDB memory access.\n @dump_state: Callback for dumping state.\n @query_cpu_fast:\n Fill in target specific information for the \"query-cpus-fast\"\n QAPI call.\n @get_arch_id: Callback for getting architecture-dependent CPU ID.\n @set_pc: Callback for setting the Program Counter register. This\n should have the semantics used by the target architecture when\n setting the PC from a source such as an ELF file entry point;\n for example on Arm it will also set the Thumb mode bit based\n on the least significant bit of the new PC value.\n If the target behaviour here is anything other than \"set\n the PC register to the value passed in\" then the target must\n also implement the synchronize_from_tb hook.\n @get_pc: Callback for getting the Program Counter register.\n As above, with the semantics of the target architecture.\n @gdb_read_register: Callback for letting GDB read a register.\n No more than @gdb_num_core_regs registers can be read.\n @gdb_write_register: Callback for letting GDB write a register.\n No more than @gdb_num_core_regs registers can be written.\n @gdb_adjust_breakpoint: Callback for adjusting the address of a\n breakpoint. Used by AVR to handle a gdb mis-feature with\n its Harvard architecture split code and data.\n @gdb_num_core_regs: Number of core registers accessible to GDB or 0 to infer\n from @gdb_core_xml_file.\n @gdb_core_xml_file: File name for core registers GDB XML description.\n @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop\n before the insn which triggers a watchpoint rather than after it.\n @gdb_arch_name: Optional callback that returns the architecture name known\n to GDB. The caller must free the returned string with g_free.\n @disas_set_info: Setup architecture specific components of disassembly info\n @adjust_watchpoint_address: Perform a target-specific adjustment to an\n address before attempting to match it against watchpoints.\n @deprecation_note: If this CPUClass is deprecated, this field provides\n related information.\n\n Represents a CPU family or model."] #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct CPUClass { @@ -3323,7 +3528,6 @@ pub struct CPUClass { errp: *mut *mut Error, ), >, - pub has_work: ::std::option::Option bool>, pub mmu_index: ::std::option::Option< unsafe extern "C" fn(cpu: *mut CPUState, ifetch: bool) -> ::std::os::raw::c_int, >, @@ -3332,7 +3536,7 @@ pub struct CPUClass { cpu: *mut CPUState, addr: vaddr, buf: *mut u8, - len: ::std::os::raw::c_int, + len: usize, is_write: bool, ) -> ::std::os::raw::c_int, >, @@ -3379,7 +3583,7 @@ pub struct CPUClass { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUClass"][::std::mem::size_of::() - 368usize]; + ["Size of CPUClass"][::std::mem::size_of::() - 360usize]; ["Alignment of CPUClass"][::std::mem::align_of::() - 8usize]; ["Offset of field: CPUClass::parent_class"] [::std::mem::offset_of!(CPUClass, parent_class) - 0usize]; @@ -3387,46 +3591,45 @@ const _: () = { [::std::mem::offset_of!(CPUClass, class_by_name) - 184usize]; ["Offset of field: CPUClass::parse_features"] [::std::mem::offset_of!(CPUClass, parse_features) - 192usize]; - ["Offset of field: CPUClass::has_work"][::std::mem::offset_of!(CPUClass, has_work) - 200usize]; ["Offset of field: CPUClass::mmu_index"] - [::std::mem::offset_of!(CPUClass, mmu_index) - 208usize]; + [::std::mem::offset_of!(CPUClass, mmu_index) - 200usize]; ["Offset of field: CPUClass::memory_rw_debug"] - [::std::mem::offset_of!(CPUClass, memory_rw_debug) - 216usize]; + [::std::mem::offset_of!(CPUClass, memory_rw_debug) - 208usize]; ["Offset of field: CPUClass::dump_state"] - [::std::mem::offset_of!(CPUClass, dump_state) - 224usize]; + [::std::mem::offset_of!(CPUClass, dump_state) - 216usize]; ["Offset of field: CPUClass::query_cpu_fast"] - [::std::mem::offset_of!(CPUClass, query_cpu_fast) - 232usize]; + [::std::mem::offset_of!(CPUClass, query_cpu_fast) - 224usize]; ["Offset of field: CPUClass::get_arch_id"] - [::std::mem::offset_of!(CPUClass, get_arch_id) - 240usize]; - ["Offset of field: CPUClass::set_pc"][::std::mem::offset_of!(CPUClass, set_pc) - 248usize]; - ["Offset of field: CPUClass::get_pc"][::std::mem::offset_of!(CPUClass, get_pc) - 256usize]; + [::std::mem::offset_of!(CPUClass, get_arch_id) - 232usize]; + ["Offset of field: CPUClass::set_pc"][::std::mem::offset_of!(CPUClass, set_pc) - 240usize]; + ["Offset of field: CPUClass::get_pc"][::std::mem::offset_of!(CPUClass, get_pc) - 248usize]; ["Offset of field: CPUClass::gdb_read_register"] - [::std::mem::offset_of!(CPUClass, gdb_read_register) - 264usize]; + [::std::mem::offset_of!(CPUClass, gdb_read_register) - 256usize]; ["Offset of field: CPUClass::gdb_write_register"] - [::std::mem::offset_of!(CPUClass, gdb_write_register) - 272usize]; + [::std::mem::offset_of!(CPUClass, gdb_write_register) - 264usize]; ["Offset of field: CPUClass::gdb_adjust_breakpoint"] - [::std::mem::offset_of!(CPUClass, gdb_adjust_breakpoint) - 280usize]; + [::std::mem::offset_of!(CPUClass, gdb_adjust_breakpoint) - 272usize]; ["Offset of field: CPUClass::gdb_core_xml_file"] - [::std::mem::offset_of!(CPUClass, gdb_core_xml_file) - 288usize]; + [::std::mem::offset_of!(CPUClass, gdb_core_xml_file) - 280usize]; ["Offset of field: CPUClass::gdb_arch_name"] - [::std::mem::offset_of!(CPUClass, gdb_arch_name) - 296usize]; + [::std::mem::offset_of!(CPUClass, gdb_arch_name) - 288usize]; ["Offset of field: CPUClass::disas_set_info"] - [::std::mem::offset_of!(CPUClass, disas_set_info) - 304usize]; + [::std::mem::offset_of!(CPUClass, disas_set_info) - 296usize]; ["Offset of field: CPUClass::deprecation_note"] - [::std::mem::offset_of!(CPUClass, deprecation_note) - 312usize]; + [::std::mem::offset_of!(CPUClass, deprecation_note) - 304usize]; ["Offset of field: CPUClass::accel_cpu"] - [::std::mem::offset_of!(CPUClass, accel_cpu) - 320usize]; + [::std::mem::offset_of!(CPUClass, accel_cpu) - 312usize]; ["Offset of field: CPUClass::sysemu_ops"] - [::std::mem::offset_of!(CPUClass, sysemu_ops) - 328usize]; - ["Offset of field: CPUClass::tcg_ops"][::std::mem::offset_of!(CPUClass, tcg_ops) - 336usize]; + [::std::mem::offset_of!(CPUClass, sysemu_ops) - 320usize]; + ["Offset of field: CPUClass::tcg_ops"][::std::mem::offset_of!(CPUClass, tcg_ops) - 328usize]; ["Offset of field: CPUClass::init_accel_cpu"] - [::std::mem::offset_of!(CPUClass, init_accel_cpu) - 344usize]; + [::std::mem::offset_of!(CPUClass, init_accel_cpu) - 336usize]; ["Offset of field: CPUClass::reset_dump_flags"] - [::std::mem::offset_of!(CPUClass, reset_dump_flags) - 352usize]; + [::std::mem::offset_of!(CPUClass, reset_dump_flags) - 344usize]; ["Offset of field: CPUClass::gdb_num_core_regs"] - [::std::mem::offset_of!(CPUClass, gdb_num_core_regs) - 356usize]; + [::std::mem::offset_of!(CPUClass, gdb_num_core_regs) - 348usize]; ["Offset of field: CPUClass::gdb_stop_before_watchpoint"] - [::std::mem::offset_of!(CPUClass, gdb_stop_before_watchpoint) - 360usize]; + [::std::mem::offset_of!(CPUClass, gdb_stop_before_watchpoint) - 352usize]; }; impl Default for CPUClass { fn default() -> Self { @@ -3501,7 +3704,7 @@ impl ::std::fmt::Debug for CPUTLBEntryFull__bindgen_ty_1 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBEntryFull"][::std::mem::size_of::() - 32usize]; + ["Size of CPUTLBEntryFull"][::std::mem::size_of::() - 40usize]; ["Alignment of CPUTLBEntryFull"][::std::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBEntryFull::xlat_section"] [::std::mem::offset_of!(CPUTLBEntryFull, xlat_section) - 0usize]; @@ -3510,15 +3713,15 @@ const _: () = { ["Offset of field: CPUTLBEntryFull::attrs"] [::std::mem::offset_of!(CPUTLBEntryFull, attrs) - 16usize]; ["Offset of field: CPUTLBEntryFull::prot"] - [::std::mem::offset_of!(CPUTLBEntryFull, prot) - 20usize]; + [::std::mem::offset_of!(CPUTLBEntryFull, prot) - 24usize]; ["Offset of field: CPUTLBEntryFull::lg_page_size"] - [::std::mem::offset_of!(CPUTLBEntryFull, lg_page_size) - 21usize]; + [::std::mem::offset_of!(CPUTLBEntryFull, lg_page_size) - 25usize]; ["Offset of field: CPUTLBEntryFull::tlb_fill_flags"] - [::std::mem::offset_of!(CPUTLBEntryFull, tlb_fill_flags) - 22usize]; + [::std::mem::offset_of!(CPUTLBEntryFull, tlb_fill_flags) - 26usize]; ["Offset of field: CPUTLBEntryFull::slow_flags"] - [::std::mem::offset_of!(CPUTLBEntryFull, slow_flags) - 23usize]; + [::std::mem::offset_of!(CPUTLBEntryFull, slow_flags) - 27usize]; ["Offset of field: CPUTLBEntryFull::extra"] - [::std::mem::offset_of!(CPUTLBEntryFull, extra) - 26usize]; + [::std::mem::offset_of!(CPUTLBEntryFull, extra) - 30usize]; }; impl Default for CPUTLBEntryFull { fn default() -> Self { @@ -3553,7 +3756,7 @@ pub struct CPUTLBDesc { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBDesc"][::std::mem::size_of::() - 568usize]; + ["Size of CPUTLBDesc"][::std::mem::size_of::() - 632usize]; ["Alignment of CPUTLBDesc"][::std::mem::align_of::() - 8usize]; ["Offset of field: CPUTLBDesc::large_page_addr"] [::std::mem::offset_of!(CPUTLBDesc, large_page_addr) - 0usize]; @@ -3570,7 +3773,7 @@ const _: () = { ["Offset of field: CPUTLBDesc::vfulltlb"] [::std::mem::offset_of!(CPUTLBDesc, vfulltlb) - 304usize]; ["Offset of field: CPUTLBDesc::fulltlb"] - [::std::mem::offset_of!(CPUTLBDesc, fulltlb) - 560usize]; + [::std::mem::offset_of!(CPUTLBDesc, fulltlb) - 624usize]; }; impl Default for CPUTLBDesc { fn default() -> Self { @@ -3622,11 +3825,11 @@ pub struct CPUTLB { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLB"][::std::mem::size_of::() - 9376usize]; + ["Size of CPUTLB"][::std::mem::size_of::() - 10400usize]; ["Alignment of CPUTLB"][::std::mem::align_of::() - 16usize]; ["Offset of field: CPUTLB::c"][::std::mem::offset_of!(CPUTLB, c) - 0usize]; ["Offset of field: CPUTLB::d"][::std::mem::offset_of!(CPUTLB, d) - 32usize]; - ["Offset of field: CPUTLB::f"][::std::mem::offset_of!(CPUTLB, f) - 9120usize]; + ["Offset of field: CPUTLB::f"][::std::mem::offset_of!(CPUTLB, f) - 10144usize]; }; impl Default for CPUTLB { fn default() -> Self { @@ -3704,21 +3907,22 @@ pub struct CPUNegativeOffsetState { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUNegativeOffsetState"][::std::mem::size_of::() - 9408usize]; + ["Size of CPUNegativeOffsetState"] + [::std::mem::size_of::() - 10432usize]; ["Alignment of CPUNegativeOffsetState"] [::std::mem::align_of::() - 16usize]; ["Offset of field: CPUNegativeOffsetState::tlb"] [::std::mem::offset_of!(CPUNegativeOffsetState, tlb) - 0usize]; ["Offset of field: CPUNegativeOffsetState::plugin_mem_cbs"] - [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_cbs) - 9376usize]; + [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_cbs) - 10400usize]; ["Offset of field: CPUNegativeOffsetState::plugin_mem_value_low"] - [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_low) - 9384usize]; + [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_low) - 10408usize]; ["Offset of field: CPUNegativeOffsetState::plugin_mem_value_high"] - [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_high) - 9392usize]; + [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_high) - 10416usize]; ["Offset of field: CPUNegativeOffsetState::icount_decr"] - [::std::mem::offset_of!(CPUNegativeOffsetState, icount_decr) - 9400usize]; + [::std::mem::offset_of!(CPUNegativeOffsetState, icount_decr) - 10424usize]; ["Offset of field: CPUNegativeOffsetState::can_do_io"] - [::std::mem::offset_of!(CPUNegativeOffsetState, can_do_io) - 9404usize]; + [::std::mem::offset_of!(CPUNegativeOffsetState, can_do_io) - 10428usize]; }; impl Default for CPUNegativeOffsetState { fn default() -> Self { @@ -3753,13 +3957,12 @@ pub struct kvm_run { pub struct qemu_work_item { _unused: [u8; 0], } -#[doc = " struct CPUState - common state of one CPU core or thread.\n\n @cpu_index: CPU index (informative).\n @cluster_index: Identifies which cluster this CPU is in.\n For boards which don't define clusters or for \"loose\" CPUs not assigned\n to a cluster this will be UNASSIGNED_CLUSTER_INDEX; otherwise it will\n be the same as the cluster-id property of the CPU object's TYPE_CPU_CLUSTER\n QOM parent.\n Under TCG this value is propagated to @tcg_cflags.\n See TranslationBlock::TCG CF_CLUSTER_MASK.\n @tcg_cflags: Pre-computed cflags for this cpu.\n @nr_cores: Number of cores within this CPU package.\n @nr_threads: Number of threads within this CPU core.\n @thread: Host thread details, only live once @created is #true\n @sem: WIN32 only semaphore used only for qtest\n @thread_id: native thread id of vCPU, only live once @created is #true\n @running: #true if CPU is currently running (lockless).\n @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end;\n valid under cpu_list_lock.\n @created: Indicates whether the CPU thread has been successfully created.\n @halt_cond: condition variable sleeping threads can wait on.\n @interrupt_request: Indicates a pending interrupt request.\n @halted: Nonzero if the CPU is in suspended state.\n @stop: Indicates a pending stop request.\n @stopped: Indicates the CPU has been artificially stopped.\n @unplug: Indicates a pending CPU unplug request.\n @crash_occurred: Indicates the OS reported a crash (panic) for this CPU\n @singlestep_enabled: Flags for single-stepping.\n @icount_extra: Instructions until next timer event.\n @cpu_ases: Pointer to array of CPUAddressSpaces (which define the\n AddressSpaces this CPU has)\n @num_ases: number of CPUAddressSpaces in @cpu_ases\n @as: Pointer to the first AddressSpace, for the convenience of targets which\n only have a single AddressSpace\n @gdb_regs: Additional GDB registers.\n @gdb_num_regs: Number of total registers accessible to GDB.\n @gdb_num_g_regs: Number of registers in GDB 'g' packets.\n @node: QTAILQ of CPUs sharing TB cache.\n @opaque: User data.\n @mem_io_pc: Host Program Counter at which the memory was accessed.\n @accel: Pointer to accelerator specific state.\n @kvm_fd: vCPU file descriptor for KVM.\n @work_mutex: Lock to prevent multiple access to @work_list.\n @work_list: List of pending asynchronous work.\n @plugin_state: per-CPU plugin state\n @ignore_memory_transaction_failures: Cached copy of the MachineState\n flag of the same name: allows the board to suppress calling of the\n CPU do_transaction_failed hook function.\n @kvm_dirty_gfns: Points to the KVM dirty ring for this CPU when KVM dirty\n ring is enabled.\n @kvm_fetch_index: Keeps the index that we last fetched from the per-vCPU\n dirty ring structure.\n\n @neg_align: The CPUState is the common part of a concrete ArchCPU\n which is allocated when an individual CPU instance is created. As\n such care is taken is ensure there is no gap between between\n CPUState and CPUArchState within ArchCPU.\n\n @neg: The architectural register state (\"cpu_env\") immediately follows\n CPUState in ArchCPU and is passed to TCG code. The @neg structure holds\n some common TCG CPU variables which are accessed with a negative offset\n from cpu_env."] +#[doc = " struct CPUState - common state of one CPU core or thread.\n\n @cpu_index: CPU index (informative).\n @cluster_index: Identifies which cluster this CPU is in.\n For boards which don't define clusters or for \"loose\" CPUs not assigned\n to a cluster this will be UNASSIGNED_CLUSTER_INDEX; otherwise it will\n be the same as the cluster-id property of the CPU object's TYPE_CPU_CLUSTER\n QOM parent.\n Under TCG this value is propagated to @tcg_cflags.\n See TranslationBlock::TCG CF_CLUSTER_MASK.\n @tcg_cflags: Pre-computed cflags for this cpu.\n @nr_threads: Number of threads within this CPU core.\n @thread: Host thread details, only live once @created is #true\n @sem: WIN32 only semaphore used only for qtest\n @thread_id: native thread id of vCPU, only live once @created is #true\n @running: #true if CPU is currently running (lockless).\n @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end;\n valid under cpu_list_lock.\n @created: Indicates whether the CPU thread has been successfully created.\n @halt_cond: condition variable sleeping threads can wait on.\n @interrupt_request: Indicates a pending interrupt request.\n @halted: Nonzero if the CPU is in suspended state.\n @stop: Indicates a pending stop request.\n @stopped: Indicates the CPU has been artificially stopped.\n @unplug: Indicates a pending CPU unplug request.\n @crash_occurred: Indicates the OS reported a crash (panic) for this CPU\n @singlestep_enabled: Flags for single-stepping.\n @icount_extra: Instructions until next timer event.\n @cpu_ases: Pointer to array of CPUAddressSpaces (which define the\n AddressSpaces this CPU has)\n @num_ases: number of CPUAddressSpaces in @cpu_ases\n @as: Pointer to the first AddressSpace, for the convenience of targets which\n only have a single AddressSpace\n @gdb_regs: Additional GDB registers.\n @gdb_num_regs: Number of total registers accessible to GDB.\n @gdb_num_g_regs: Number of registers in GDB 'g' packets.\n @node: QTAILQ of CPUs sharing TB cache.\n @opaque: User data.\n @mem_io_pc: Host Program Counter at which the memory was accessed.\n @accel: Pointer to accelerator specific state.\n @kvm_fd: vCPU file descriptor for KVM.\n @work_mutex: Lock to prevent multiple access to @work_list.\n @work_list: List of pending asynchronous work.\n @plugin_state: per-CPU plugin state\n @ignore_memory_transaction_failures: Cached copy of the MachineState\n flag of the same name: allows the board to suppress calling of the\n CPU do_transaction_failed hook function.\n @kvm_dirty_gfns: Points to the KVM dirty ring for this CPU when KVM dirty\n ring is enabled.\n @kvm_fetch_index: Keeps the index that we last fetched from the per-vCPU\n dirty ring structure.\n\n @neg_align: The CPUState is the common part of a concrete ArchCPU\n which is allocated when an individual CPU instance is created. As\n such care is taken is ensure there is no gap between between\n CPUState and CPUArchState within ArchCPU.\n\n @neg: The architectural register state (\"cpu_env\") immediately follows\n CPUState in ArchCPU and is passed to TCG code. The @neg structure holds\n some common TCG CPU variables which are accessed with a negative offset\n from cpu_env."] #[repr(C)] #[repr(align(16))] pub struct CPUState { pub parent_obj: DeviceState, pub cc: *mut CPUClass, - pub nr_cores: ::std::os::raw::c_int, pub nr_threads: ::std::os::raw::c_int, pub thread: *mut QemuThread, pub thread_id: ::std::os::raw::c_int, @@ -3820,7 +4023,6 @@ pub struct CPUState { pub ignore_memory_transaction_failures: bool, pub prctl_unalign_sigbus: bool, pub iommu_notifiers: *mut GArray, - pub __bindgen_padding_0: [u8; 8usize], pub neg_align: __IncompleteArrayField<::std::os::raw::c_char>, pub neg: CPUNegativeOffsetState, } @@ -3941,117 +4143,116 @@ impl ::std::fmt::Debug for CPUState__bindgen_ty_4 { } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState"][::std::mem::size_of::() - 10192usize]; + ["Size of CPUState"][::std::mem::size_of::() - 11200usize]; ["Alignment of CPUState"][::std::mem::align_of::() - 16usize]; ["Offset of field: CPUState::parent_obj"] [::std::mem::offset_of!(CPUState, parent_obj) - 0usize]; - ["Offset of field: CPUState::cc"][::std::mem::offset_of!(CPUState, cc) - 160usize]; - ["Offset of field: CPUState::nr_cores"][::std::mem::offset_of!(CPUState, nr_cores) - 168usize]; + ["Offset of field: CPUState::cc"][::std::mem::offset_of!(CPUState, cc) - 152usize]; ["Offset of field: CPUState::nr_threads"] - [::std::mem::offset_of!(CPUState, nr_threads) - 172usize]; - ["Offset of field: CPUState::thread"][::std::mem::offset_of!(CPUState, thread) - 176usize]; + [::std::mem::offset_of!(CPUState, nr_threads) - 160usize]; + ["Offset of field: CPUState::thread"][::std::mem::offset_of!(CPUState, thread) - 168usize]; ["Offset of field: CPUState::thread_id"] - [::std::mem::offset_of!(CPUState, thread_id) - 184usize]; - ["Offset of field: CPUState::running"][::std::mem::offset_of!(CPUState, running) - 188usize]; + [::std::mem::offset_of!(CPUState, thread_id) - 176usize]; + ["Offset of field: CPUState::running"][::std::mem::offset_of!(CPUState, running) - 180usize]; ["Offset of field: CPUState::has_waiter"] - [::std::mem::offset_of!(CPUState, has_waiter) - 189usize]; + [::std::mem::offset_of!(CPUState, has_waiter) - 181usize]; ["Offset of field: CPUState::halt_cond"] - [::std::mem::offset_of!(CPUState, halt_cond) - 192usize]; + [::std::mem::offset_of!(CPUState, halt_cond) - 184usize]; ["Offset of field: CPUState::thread_kicked"] - [::std::mem::offset_of!(CPUState, thread_kicked) - 200usize]; - ["Offset of field: CPUState::created"][::std::mem::offset_of!(CPUState, created) - 201usize]; - ["Offset of field: CPUState::stop"][::std::mem::offset_of!(CPUState, stop) - 202usize]; - ["Offset of field: CPUState::stopped"][::std::mem::offset_of!(CPUState, stopped) - 203usize]; + [::std::mem::offset_of!(CPUState, thread_kicked) - 192usize]; + ["Offset of field: CPUState::created"][::std::mem::offset_of!(CPUState, created) - 193usize]; + ["Offset of field: CPUState::stop"][::std::mem::offset_of!(CPUState, stop) - 194usize]; + ["Offset of field: CPUState::stopped"][::std::mem::offset_of!(CPUState, stopped) - 195usize]; ["Offset of field: CPUState::start_powered_off"] - [::std::mem::offset_of!(CPUState, start_powered_off) - 204usize]; - ["Offset of field: CPUState::unplug"][::std::mem::offset_of!(CPUState, unplug) - 205usize]; + [::std::mem::offset_of!(CPUState, start_powered_off) - 196usize]; + ["Offset of field: CPUState::unplug"][::std::mem::offset_of!(CPUState, unplug) - 197usize]; ["Offset of field: CPUState::crash_occurred"] - [::std::mem::offset_of!(CPUState, crash_occurred) - 206usize]; + [::std::mem::offset_of!(CPUState, crash_occurred) - 198usize]; ["Offset of field: CPUState::exit_request"] - [::std::mem::offset_of!(CPUState, exit_request) - 207usize]; + [::std::mem::offset_of!(CPUState, exit_request) - 199usize]; ["Offset of field: CPUState::exclusive_context_count"] - [::std::mem::offset_of!(CPUState, exclusive_context_count) - 208usize]; + [::std::mem::offset_of!(CPUState, exclusive_context_count) - 200usize]; ["Offset of field: CPUState::cflags_next_tb"] - [::std::mem::offset_of!(CPUState, cflags_next_tb) - 212usize]; + [::std::mem::offset_of!(CPUState, cflags_next_tb) - 204usize]; ["Offset of field: CPUState::interrupt_request"] - [::std::mem::offset_of!(CPUState, interrupt_request) - 216usize]; + [::std::mem::offset_of!(CPUState, interrupt_request) - 208usize]; ["Offset of field: CPUState::singlestep_enabled"] - [::std::mem::offset_of!(CPUState, singlestep_enabled) - 220usize]; + [::std::mem::offset_of!(CPUState, singlestep_enabled) - 212usize]; ["Offset of field: CPUState::icount_budget"] - [::std::mem::offset_of!(CPUState, icount_budget) - 224usize]; + [::std::mem::offset_of!(CPUState, icount_budget) - 216usize]; ["Offset of field: CPUState::icount_extra"] - [::std::mem::offset_of!(CPUState, icount_extra) - 232usize]; + [::std::mem::offset_of!(CPUState, icount_extra) - 224usize]; ["Offset of field: CPUState::random_seed"] - [::std::mem::offset_of!(CPUState, random_seed) - 240usize]; - ["Offset of field: CPUState::jmp_env"][::std::mem::offset_of!(CPUState, jmp_env) - 248usize]; + [::std::mem::offset_of!(CPUState, random_seed) - 232usize]; + ["Offset of field: CPUState::jmp_env"][::std::mem::offset_of!(CPUState, jmp_env) - 240usize]; ["Offset of field: CPUState::work_mutex"] - [::std::mem::offset_of!(CPUState, work_mutex) - 448usize]; + [::std::mem::offset_of!(CPUState, work_mutex) - 440usize]; ["Offset of field: CPUState::work_list"] - [::std::mem::offset_of!(CPUState, work_list) - 496usize]; - ["Offset of field: CPUState::cpu_ases"][::std::mem::offset_of!(CPUState, cpu_ases) - 512usize]; + [::std::mem::offset_of!(CPUState, work_list) - 488usize]; + ["Offset of field: CPUState::cpu_ases"][::std::mem::offset_of!(CPUState, cpu_ases) - 504usize]; ["Offset of field: CPUState::cpu_ases_count"] - [::std::mem::offset_of!(CPUState, cpu_ases_count) - 520usize]; - ["Offset of field: CPUState::num_ases"][::std::mem::offset_of!(CPUState, num_ases) - 524usize]; - ["Offset of field: CPUState::as_"][::std::mem::offset_of!(CPUState, as_) - 528usize]; - ["Offset of field: CPUState::memory"][::std::mem::offset_of!(CPUState, memory) - 536usize]; + [::std::mem::offset_of!(CPUState, cpu_ases_count) - 512usize]; + ["Offset of field: CPUState::num_ases"][::std::mem::offset_of!(CPUState, num_ases) - 516usize]; + ["Offset of field: CPUState::as_"][::std::mem::offset_of!(CPUState, as_) - 520usize]; + ["Offset of field: CPUState::memory"][::std::mem::offset_of!(CPUState, memory) - 528usize]; ["Offset of field: CPUState::tb_jmp_cache"] - [::std::mem::offset_of!(CPUState, tb_jmp_cache) - 544usize]; - ["Offset of field: CPUState::gdb_regs"][::std::mem::offset_of!(CPUState, gdb_regs) - 552usize]; + [::std::mem::offset_of!(CPUState, tb_jmp_cache) - 536usize]; + ["Offset of field: CPUState::gdb_regs"][::std::mem::offset_of!(CPUState, gdb_regs) - 544usize]; ["Offset of field: CPUState::gdb_num_regs"] - [::std::mem::offset_of!(CPUState, gdb_num_regs) - 560usize]; + [::std::mem::offset_of!(CPUState, gdb_num_regs) - 552usize]; ["Offset of field: CPUState::gdb_num_g_regs"] - [::std::mem::offset_of!(CPUState, gdb_num_g_regs) - 564usize]; - ["Offset of field: CPUState::node"][::std::mem::offset_of!(CPUState, node) - 568usize]; + [::std::mem::offset_of!(CPUState, gdb_num_g_regs) - 556usize]; + ["Offset of field: CPUState::node"][::std::mem::offset_of!(CPUState, node) - 560usize]; ["Offset of field: CPUState::breakpoints"] - [::std::mem::offset_of!(CPUState, breakpoints) - 584usize]; + [::std::mem::offset_of!(CPUState, breakpoints) - 576usize]; ["Offset of field: CPUState::watchpoints"] - [::std::mem::offset_of!(CPUState, watchpoints) - 600usize]; + [::std::mem::offset_of!(CPUState, watchpoints) - 592usize]; ["Offset of field: CPUState::watchpoint_hit"] - [::std::mem::offset_of!(CPUState, watchpoint_hit) - 616usize]; - ["Offset of field: CPUState::opaque"][::std::mem::offset_of!(CPUState, opaque) - 624usize]; + [::std::mem::offset_of!(CPUState, watchpoint_hit) - 608usize]; + ["Offset of field: CPUState::opaque"][::std::mem::offset_of!(CPUState, opaque) - 616usize]; ["Offset of field: CPUState::mem_io_pc"] - [::std::mem::offset_of!(CPUState, mem_io_pc) - 632usize]; - ["Offset of field: CPUState::kvm_fd"][::std::mem::offset_of!(CPUState, kvm_fd) - 640usize]; + [::std::mem::offset_of!(CPUState, mem_io_pc) - 624usize]; + ["Offset of field: CPUState::kvm_fd"][::std::mem::offset_of!(CPUState, kvm_fd) - 632usize]; ["Offset of field: CPUState::kvm_state"] - [::std::mem::offset_of!(CPUState, kvm_state) - 648usize]; - ["Offset of field: CPUState::kvm_run"][::std::mem::offset_of!(CPUState, kvm_run) - 656usize]; + [::std::mem::offset_of!(CPUState, kvm_state) - 640usize]; + ["Offset of field: CPUState::kvm_run"][::std::mem::offset_of!(CPUState, kvm_run) - 648usize]; ["Offset of field: CPUState::kvm_dirty_gfns"] - [::std::mem::offset_of!(CPUState, kvm_dirty_gfns) - 664usize]; + [::std::mem::offset_of!(CPUState, kvm_dirty_gfns) - 656usize]; ["Offset of field: CPUState::kvm_fetch_index"] - [::std::mem::offset_of!(CPUState, kvm_fetch_index) - 672usize]; + [::std::mem::offset_of!(CPUState, kvm_fetch_index) - 664usize]; ["Offset of field: CPUState::dirty_pages"] - [::std::mem::offset_of!(CPUState, dirty_pages) - 680usize]; + [::std::mem::offset_of!(CPUState, dirty_pages) - 672usize]; ["Offset of field: CPUState::kvm_vcpu_stats_fd"] - [::std::mem::offset_of!(CPUState, kvm_vcpu_stats_fd) - 688usize]; + [::std::mem::offset_of!(CPUState, kvm_vcpu_stats_fd) - 680usize]; ["Offset of field: CPUState::vcpu_dirty"] - [::std::mem::offset_of!(CPUState, vcpu_dirty) - 692usize]; + [::std::mem::offset_of!(CPUState, vcpu_dirty) - 684usize]; ["Offset of field: CPUState::in_ioctl_lock"] - [::std::mem::offset_of!(CPUState, in_ioctl_lock) - 696usize]; + [::std::mem::offset_of!(CPUState, in_ioctl_lock) - 688usize]; ["Offset of field: CPUState::plugin_state"] - [::std::mem::offset_of!(CPUState, plugin_state) - 704usize]; + [::std::mem::offset_of!(CPUState, plugin_state) - 696usize]; ["Offset of field: CPUState::cpu_index"] - [::std::mem::offset_of!(CPUState, cpu_index) - 712usize]; + [::std::mem::offset_of!(CPUState, cpu_index) - 704usize]; ["Offset of field: CPUState::cluster_index"] - [::std::mem::offset_of!(CPUState, cluster_index) - 716usize]; + [::std::mem::offset_of!(CPUState, cluster_index) - 708usize]; ["Offset of field: CPUState::tcg_cflags"] - [::std::mem::offset_of!(CPUState, tcg_cflags) - 720usize]; - ["Offset of field: CPUState::halted"][::std::mem::offset_of!(CPUState, halted) - 724usize]; + [::std::mem::offset_of!(CPUState, tcg_cflags) - 712usize]; + ["Offset of field: CPUState::halted"][::std::mem::offset_of!(CPUState, halted) - 716usize]; ["Offset of field: CPUState::exception_index"] - [::std::mem::offset_of!(CPUState, exception_index) - 728usize]; - ["Offset of field: CPUState::accel"][::std::mem::offset_of!(CPUState, accel) - 736usize]; + [::std::mem::offset_of!(CPUState, exception_index) - 720usize]; + ["Offset of field: CPUState::accel"][::std::mem::offset_of!(CPUState, accel) - 728usize]; ["Offset of field: CPUState::throttle_thread_scheduled"] - [::std::mem::offset_of!(CPUState, throttle_thread_scheduled) - 744usize]; + [::std::mem::offset_of!(CPUState, throttle_thread_scheduled) - 736usize]; ["Offset of field: CPUState::throttle_us_per_full"] - [::std::mem::offset_of!(CPUState, throttle_us_per_full) - 752usize]; + [::std::mem::offset_of!(CPUState, throttle_us_per_full) - 744usize]; ["Offset of field: CPUState::ignore_memory_transaction_failures"] - [::std::mem::offset_of!(CPUState, ignore_memory_transaction_failures) - 760usize]; + [::std::mem::offset_of!(CPUState, ignore_memory_transaction_failures) - 752usize]; ["Offset of field: CPUState::prctl_unalign_sigbus"] - [::std::mem::offset_of!(CPUState, prctl_unalign_sigbus) - 761usize]; + [::std::mem::offset_of!(CPUState, prctl_unalign_sigbus) - 753usize]; ["Offset of field: CPUState::iommu_notifiers"] - [::std::mem::offset_of!(CPUState, iommu_notifiers) - 768usize]; + [::std::mem::offset_of!(CPUState, iommu_notifiers) - 760usize]; ["Offset of field: CPUState::neg_align"] - [::std::mem::offset_of!(CPUState, neg_align) - 784usize]; - ["Offset of field: CPUState::neg"][::std::mem::offset_of!(CPUState, neg) - 784usize]; + [::std::mem::offset_of!(CPUState, neg_align) - 768usize]; + ["Offset of field: CPUState::neg"][::std::mem::offset_of!(CPUState, neg) - 768usize]; }; impl Default for CPUState { fn default() -> Self { @@ -4066,10 +4267,9 @@ impl ::std::fmt::Debug for CPUState { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( f, - "CPUState {{ parent_obj: {:?}, cc: {:?}, nr_cores: {:?}, nr_threads: {:?}, thread: {:?}, thread_id: {:?}, running: {:?}, has_waiter: {:?}, halt_cond: {:?}, thread_kicked: {:?}, created: {:?}, stop: {:?}, stopped: {:?}, start_powered_off: {:?}, unplug: {:?}, crash_occurred: {:?}, exit_request: {:?}, exclusive_context_count: {:?}, singlestep_enabled: {:?}, jmp_env: {:?}, work_mutex: {:?}, work_list: {:?}, cpu_ases: {:?}, cpu_ases_count: {:?}, num_ases: {:?}, as: {:?}, memory: {:?}, tb_jmp_cache: {:?}, gdb_regs: {:?}, gdb_num_regs: {:?}, gdb_num_g_regs: {:?}, node: {:?}, breakpoints: {:?}, watchpoints: {:?}, watchpoint_hit: {:?}, opaque: {:?}, kvm_fd: {:?}, kvm_state: {:?}, kvm_run: {:?}, kvm_dirty_gfns: {:?}, kvm_vcpu_stats_fd: {:?}, vcpu_dirty: {:?}, in_ioctl_lock: {:?}, plugin_state: {:?}, cpu_index: {:?}, cluster_index: {:?}, accel: {:?}, throttle_thread_scheduled: {:?}, ignore_memory_transaction_failures: {:?}, prctl_unalign_sigbus: {:?}, iommu_notifiers: {:?}, neg_align: {:?}, neg: {:?} }}", + "CPUState {{ parent_obj: {:?}, cc: {:?}, nr_threads: {:?}, thread: {:?}, thread_id: {:?}, running: {:?}, has_waiter: {:?}, halt_cond: {:?}, thread_kicked: {:?}, created: {:?}, stop: {:?}, stopped: {:?}, start_powered_off: {:?}, unplug: {:?}, crash_occurred: {:?}, exit_request: {:?}, exclusive_context_count: {:?}, singlestep_enabled: {:?}, jmp_env: {:?}, work_mutex: {:?}, work_list: {:?}, cpu_ases: {:?}, cpu_ases_count: {:?}, num_ases: {:?}, as: {:?}, memory: {:?}, tb_jmp_cache: {:?}, gdb_regs: {:?}, gdb_num_regs: {:?}, gdb_num_g_regs: {:?}, node: {:?}, breakpoints: {:?}, watchpoints: {:?}, watchpoint_hit: {:?}, opaque: {:?}, kvm_fd: {:?}, kvm_state: {:?}, kvm_run: {:?}, kvm_dirty_gfns: {:?}, kvm_vcpu_stats_fd: {:?}, vcpu_dirty: {:?}, in_ioctl_lock: {:?}, plugin_state: {:?}, cpu_index: {:?}, cluster_index: {:?}, accel: {:?}, throttle_thread_scheduled: {:?}, ignore_memory_transaction_failures: {:?}, prctl_unalign_sigbus: {:?}, iommu_notifiers: {:?}, neg_align: {:?}, neg: {:?} }}", self.parent_obj, self.cc, - self.nr_cores, self.nr_threads, self.thread, self.thread_id, @@ -4127,156 +4327,6 @@ unsafe extern "C" { #[doc = " cpu_reset:\n @cpu: The CPU whose state is to be reset."] pub fn cpu_reset(cpu: *mut CPUState); } -pub type target_long = i64; -pub type target_ulong = u64; -#[doc = " Property:\n @set_default: true if the default value should be set from @defval,\n in which case @info->set_default_value must not be NULL\n (if false then no default value is set by the property system\n and the field retains whatever value it was given by instance_init).\n @defval: default value for the property. This is used only if @set_default\n is true."] -#[repr(C)] -#[derive(Copy, Clone)] -pub struct Property { - pub name: *const ::std::os::raw::c_char, - pub info: *const PropertyInfo, - pub offset: isize, - pub bitnr: u8, - pub bitmask: u64, - pub set_default: bool, - pub defval: Property__bindgen_ty_1, - pub arrayoffset: ::std::os::raw::c_int, - pub arrayinfo: *const PropertyInfo, - pub arrayfieldsize: ::std::os::raw::c_int, - pub link_type: *const ::std::os::raw::c_char, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union Property__bindgen_ty_1 { - pub i: i64, - pub u: u64, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of Property__bindgen_ty_1"][::std::mem::size_of::() - 8usize]; - ["Alignment of Property__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: Property__bindgen_ty_1::i"] - [::std::mem::offset_of!(Property__bindgen_ty_1, i) - 0usize]; - ["Offset of field: Property__bindgen_ty_1::u"] - [::std::mem::offset_of!(Property__bindgen_ty_1, u) - 0usize]; -}; -impl Default for Property__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl ::std::fmt::Debug for Property__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "Property__bindgen_ty_1 {{ union }}") - } -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of Property"][::std::mem::size_of::() - 88usize]; - ["Alignment of Property"][::std::mem::align_of::() - 8usize]; - ["Offset of field: Property::name"][::std::mem::offset_of!(Property, name) - 0usize]; - ["Offset of field: Property::info"][::std::mem::offset_of!(Property, info) - 8usize]; - ["Offset of field: Property::offset"][::std::mem::offset_of!(Property, offset) - 16usize]; - ["Offset of field: Property::bitnr"][::std::mem::offset_of!(Property, bitnr) - 24usize]; - ["Offset of field: Property::bitmask"][::std::mem::offset_of!(Property, bitmask) - 32usize]; - ["Offset of field: Property::set_default"] - [::std::mem::offset_of!(Property, set_default) - 40usize]; - ["Offset of field: Property::defval"][::std::mem::offset_of!(Property, defval) - 48usize]; - ["Offset of field: Property::arrayoffset"] - [::std::mem::offset_of!(Property, arrayoffset) - 56usize]; - ["Offset of field: Property::arrayinfo"][::std::mem::offset_of!(Property, arrayinfo) - 64usize]; - ["Offset of field: Property::arrayfieldsize"] - [::std::mem::offset_of!(Property, arrayfieldsize) - 72usize]; - ["Offset of field: Property::link_type"][::std::mem::offset_of!(Property, link_type) - 80usize]; -}; -impl Default for Property { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl ::std::fmt::Debug for Property { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "Property {{ name: {:?}, info: {:?}, set_default: {:?}, defval: {:?}, arrayoffset: {:?}, arrayinfo: {:?}, arrayfieldsize: {:?}, link_type: {:?} }}", - self.name, - self.info, - self.set_default, - self.defval, - self.arrayoffset, - self.arrayinfo, - self.arrayfieldsize, - self.link_type - ) - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct PropertyInfo { - pub name: *const ::std::os::raw::c_char, - pub description: *const ::std::os::raw::c_char, - pub enum_table: *const QEnumLookup, - pub realized_set_allowed: bool, - pub print: ::std::option::Option< - unsafe extern "C" fn( - obj: *mut Object, - prop: *mut Property, - dest: *mut ::std::os::raw::c_char, - len: usize, - ) -> ::std::os::raw::c_int, - >, - pub set_default_value: - ::std::option::Option, - pub create: ::std::option::Option< - unsafe extern "C" fn( - oc: *mut ObjectClass, - name: *const ::std::os::raw::c_char, - prop: *const Property, - ) -> *mut ObjectProperty, - >, - pub get: ObjectPropertyAccessor, - pub set: ObjectPropertyAccessor, - pub release: ObjectPropertyRelease, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of PropertyInfo"][::std::mem::size_of::() - 80usize]; - ["Alignment of PropertyInfo"][::std::mem::align_of::() - 8usize]; - ["Offset of field: PropertyInfo::name"][::std::mem::offset_of!(PropertyInfo, name) - 0usize]; - ["Offset of field: PropertyInfo::description"] - [::std::mem::offset_of!(PropertyInfo, description) - 8usize]; - ["Offset of field: PropertyInfo::enum_table"] - [::std::mem::offset_of!(PropertyInfo, enum_table) - 16usize]; - ["Offset of field: PropertyInfo::realized_set_allowed"] - [::std::mem::offset_of!(PropertyInfo, realized_set_allowed) - 24usize]; - ["Offset of field: PropertyInfo::print"][::std::mem::offset_of!(PropertyInfo, print) - 32usize]; - ["Offset of field: PropertyInfo::set_default_value"] - [::std::mem::offset_of!(PropertyInfo, set_default_value) - 40usize]; - ["Offset of field: PropertyInfo::create"] - [::std::mem::offset_of!(PropertyInfo, create) - 48usize]; - ["Offset of field: PropertyInfo::get"][::std::mem::offset_of!(PropertyInfo, get) - 56usize]; - ["Offset of field: PropertyInfo::set"][::std::mem::offset_of!(PropertyInfo, set) - 64usize]; - ["Offset of field: PropertyInfo::release"] - [::std::mem::offset_of!(PropertyInfo, release) - 72usize]; -}; -impl Default for PropertyInfo { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} #[doc = " X86CPU:\n @env: #CPUX86State\n @migratable: If set, only migratable flags will be accepted when \"enforce\"\n mode is used, and only migratable flags will be included in the \"host\"\n CPU model.\n\n An x86 CPU."] pub type X86CPU = ArchCPU; pub const MemOp_MO_8: MemOp = MemOp(0); @@ -4370,6 +4420,27 @@ impl ::std::ops::BitAndAssign for MemOp { #[repr(transparent)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct MemOp(pub ::std::os::raw::c_uint); +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct X86CPUTopoInfo { + pub dies_per_pkg: ::std::os::raw::c_uint, + pub modules_per_die: ::std::os::raw::c_uint, + pub cores_per_module: ::std::os::raw::c_uint, + pub threads_per_core: ::std::os::raw::c_uint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of X86CPUTopoInfo"][::std::mem::size_of::() - 16usize]; + ["Alignment of X86CPUTopoInfo"][::std::mem::align_of::() - 4usize]; + ["Offset of field: X86CPUTopoInfo::dies_per_pkg"] + [::std::mem::offset_of!(X86CPUTopoInfo, dies_per_pkg) - 0usize]; + ["Offset of field: X86CPUTopoInfo::modules_per_die"] + [::std::mem::offset_of!(X86CPUTopoInfo, modules_per_die) - 4usize]; + ["Offset of field: X86CPUTopoInfo::cores_per_module"] + [::std::mem::offset_of!(X86CPUTopoInfo, cores_per_module) - 8usize]; + ["Offset of field: X86CPUTopoInfo::threads_per_core"] + [::std::mem::offset_of!(X86CPUTopoInfo, threads_per_core) - 12usize]; +}; pub type float16 = u16; pub type float32 = u32; pub type float64 = u64; @@ -4393,6 +4464,7 @@ pub const FloatRoundMode_float_round_to_zero: FloatRoundMode = FloatRoundMode(3) pub const FloatRoundMode_float_round_ties_away: FloatRoundMode = FloatRoundMode(4); pub const FloatRoundMode_float_round_to_odd: FloatRoundMode = FloatRoundMode(5); pub const FloatRoundMode_float_round_to_odd_inf: FloatRoundMode = FloatRoundMode(6); +pub const FloatRoundMode_float_round_nearest_even_max: FloatRoundMode = FloatRoundMode(7); impl ::std::ops::BitOr for FloatRoundMode { type Output = Self; #[inline] @@ -4489,26 +4561,177 @@ impl ::std::ops::BitAndAssign for Float2NaNPropRule { #[repr(transparent)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] pub struct Float2NaNPropRule(pub ::std::os::raw::c_uchar); +pub const Float3NaNPropRule_float_3nan_prop_none: Float3NaNPropRule = Float3NaNPropRule(0); +pub const Float3NaNPropRule_float_3nan_prop_abc: Float3NaNPropRule = Float3NaNPropRule(36); +pub const Float3NaNPropRule_float_3nan_prop_acb: Float3NaNPropRule = Float3NaNPropRule(24); +pub const Float3NaNPropRule_float_3nan_prop_bac: Float3NaNPropRule = Float3NaNPropRule(33); +pub const Float3NaNPropRule_float_3nan_prop_bca: Float3NaNPropRule = Float3NaNPropRule(9); +pub const Float3NaNPropRule_float_3nan_prop_cab: Float3NaNPropRule = Float3NaNPropRule(18); +pub const Float3NaNPropRule_float_3nan_prop_cba: Float3NaNPropRule = Float3NaNPropRule(6); +pub const Float3NaNPropRule_float_3nan_prop_s_abc: Float3NaNPropRule = Float3NaNPropRule(100); +pub const Float3NaNPropRule_float_3nan_prop_s_acb: Float3NaNPropRule = Float3NaNPropRule(88); +pub const Float3NaNPropRule_float_3nan_prop_s_bac: Float3NaNPropRule = Float3NaNPropRule(97); +pub const Float3NaNPropRule_float_3nan_prop_s_bca: Float3NaNPropRule = Float3NaNPropRule(73); +pub const Float3NaNPropRule_float_3nan_prop_s_cab: Float3NaNPropRule = Float3NaNPropRule(82); +pub const Float3NaNPropRule_float_3nan_prop_s_cba: Float3NaNPropRule = Float3NaNPropRule(70); +impl ::std::ops::BitOr for Float3NaNPropRule { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + Float3NaNPropRule(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for Float3NaNPropRule { + #[inline] + fn bitor_assign(&mut self, rhs: Float3NaNPropRule) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for Float3NaNPropRule { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + Float3NaNPropRule(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for Float3NaNPropRule { + #[inline] + fn bitand_assign(&mut self, rhs: Float3NaNPropRule) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct Float3NaNPropRule(pub ::std::os::raw::c_uchar); +pub const FloatInfZeroNaNRule_float_infzeronan_none: FloatInfZeroNaNRule = FloatInfZeroNaNRule(0); +pub const FloatInfZeroNaNRule_float_infzeronan_dnan_never: FloatInfZeroNaNRule = + FloatInfZeroNaNRule(1); +pub const FloatInfZeroNaNRule_float_infzeronan_dnan_always: FloatInfZeroNaNRule = + FloatInfZeroNaNRule(2); +pub const FloatInfZeroNaNRule_float_infzeronan_dnan_if_qnan: FloatInfZeroNaNRule = + FloatInfZeroNaNRule(3); +pub const FloatInfZeroNaNRule_float_infzeronan_suppress_invalid: FloatInfZeroNaNRule = + FloatInfZeroNaNRule(128); +impl ::std::ops::BitOr for FloatInfZeroNaNRule { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + FloatInfZeroNaNRule(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for FloatInfZeroNaNRule { + #[inline] + fn bitor_assign(&mut self, rhs: FloatInfZeroNaNRule) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for FloatInfZeroNaNRule { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + FloatInfZeroNaNRule(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for FloatInfZeroNaNRule { + #[inline] + fn bitand_assign(&mut self, rhs: FloatInfZeroNaNRule) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct FloatInfZeroNaNRule(pub ::std::os::raw::c_uchar); +pub const FloatFTZDetection_float_ftz_after_rounding: FloatFTZDetection = FloatFTZDetection(0); +pub const FloatFTZDetection_float_ftz_before_rounding: FloatFTZDetection = FloatFTZDetection(1); +impl ::std::ops::BitOr for FloatFTZDetection { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + FloatFTZDetection(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for FloatFTZDetection { + #[inline] + fn bitor_assign(&mut self, rhs: FloatFTZDetection) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for FloatFTZDetection { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + FloatFTZDetection(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for FloatFTZDetection { + #[inline] + fn bitand_assign(&mut self, rhs: FloatFTZDetection) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct FloatFTZDetection(pub ::std::os::raw::c_uchar); +pub const FloatX80Behaviour_floatx80_default_inf_int_bit_is_zero: FloatX80Behaviour = + FloatX80Behaviour(1); +pub const FloatX80Behaviour_floatx80_pseudo_inf_valid: FloatX80Behaviour = FloatX80Behaviour(2); +pub const FloatX80Behaviour_floatx80_pseudo_nan_valid: FloatX80Behaviour = FloatX80Behaviour(4); +pub const FloatX80Behaviour_floatx80_unnormal_valid: FloatX80Behaviour = FloatX80Behaviour(8); +pub const FloatX80Behaviour_floatx80_pseudo_denormal_valid: FloatX80Behaviour = + FloatX80Behaviour(16); +impl ::std::ops::BitOr for FloatX80Behaviour { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + FloatX80Behaviour(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for FloatX80Behaviour { + #[inline] + fn bitor_assign(&mut self, rhs: FloatX80Behaviour) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for FloatX80Behaviour { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + FloatX80Behaviour(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for FloatX80Behaviour { + #[inline] + fn bitand_assign(&mut self, rhs: FloatX80Behaviour) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct FloatX80Behaviour(pub ::std::os::raw::c_uchar); #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct float_status { pub float_exception_flags: u16, pub float_rounding_mode: FloatRoundMode, pub floatx80_rounding_precision: FloatX80RoundPrec, + pub floatx80_behaviour: FloatX80Behaviour, pub float_2nan_prop_rule: Float2NaNPropRule, + pub float_3nan_prop_rule: Float3NaNPropRule, + pub float_infzeronan_rule: FloatInfZeroNaNRule, pub tininess_before_rounding: bool, pub flush_to_zero: bool, + pub ftz_detection: FloatFTZDetection, pub flush_inputs_to_zero: bool, pub default_nan_mode: bool, + pub default_nan_pattern: u8, pub snan_bit_is_one: bool, - pub use_first_nan: bool, pub no_signaling_nans: bool, pub rebias_overflow: bool, pub rebias_underflow: bool, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of float_status"][::std::mem::size_of::() - 14usize]; + ["Size of float_status"][::std::mem::size_of::() - 18usize]; ["Alignment of float_status"][::std::mem::align_of::() - 2usize]; ["Offset of field: float_status::float_exception_flags"] [::std::mem::offset_of!(float_status, float_exception_flags) - 0usize]; @@ -4516,26 +4739,34 @@ const _: () = { [::std::mem::offset_of!(float_status, float_rounding_mode) - 2usize]; ["Offset of field: float_status::floatx80_rounding_precision"] [::std::mem::offset_of!(float_status, floatx80_rounding_precision) - 3usize]; + ["Offset of field: float_status::floatx80_behaviour"] + [::std::mem::offset_of!(float_status, floatx80_behaviour) - 4usize]; ["Offset of field: float_status::float_2nan_prop_rule"] - [::std::mem::offset_of!(float_status, float_2nan_prop_rule) - 4usize]; + [::std::mem::offset_of!(float_status, float_2nan_prop_rule) - 5usize]; + ["Offset of field: float_status::float_3nan_prop_rule"] + [::std::mem::offset_of!(float_status, float_3nan_prop_rule) - 6usize]; + ["Offset of field: float_status::float_infzeronan_rule"] + [::std::mem::offset_of!(float_status, float_infzeronan_rule) - 7usize]; ["Offset of field: float_status::tininess_before_rounding"] - [::std::mem::offset_of!(float_status, tininess_before_rounding) - 5usize]; + [::std::mem::offset_of!(float_status, tininess_before_rounding) - 8usize]; ["Offset of field: float_status::flush_to_zero"] - [::std::mem::offset_of!(float_status, flush_to_zero) - 6usize]; + [::std::mem::offset_of!(float_status, flush_to_zero) - 9usize]; + ["Offset of field: float_status::ftz_detection"] + [::std::mem::offset_of!(float_status, ftz_detection) - 10usize]; ["Offset of field: float_status::flush_inputs_to_zero"] - [::std::mem::offset_of!(float_status, flush_inputs_to_zero) - 7usize]; + [::std::mem::offset_of!(float_status, flush_inputs_to_zero) - 11usize]; ["Offset of field: float_status::default_nan_mode"] - [::std::mem::offset_of!(float_status, default_nan_mode) - 8usize]; + [::std::mem::offset_of!(float_status, default_nan_mode) - 12usize]; + ["Offset of field: float_status::default_nan_pattern"] + [::std::mem::offset_of!(float_status, default_nan_pattern) - 13usize]; ["Offset of field: float_status::snan_bit_is_one"] - [::std::mem::offset_of!(float_status, snan_bit_is_one) - 9usize]; - ["Offset of field: float_status::use_first_nan"] - [::std::mem::offset_of!(float_status, use_first_nan) - 10usize]; + [::std::mem::offset_of!(float_status, snan_bit_is_one) - 14usize]; ["Offset of field: float_status::no_signaling_nans"] - [::std::mem::offset_of!(float_status, no_signaling_nans) - 11usize]; + [::std::mem::offset_of!(float_status, no_signaling_nans) - 15usize]; ["Offset of field: float_status::rebias_overflow"] - [::std::mem::offset_of!(float_status, rebias_overflow) - 12usize]; + [::std::mem::offset_of!(float_status, rebias_overflow) - 16usize]; ["Offset of field: float_status::rebias_underflow"] - [::std::mem::offset_of!(float_status, rebias_underflow) - 13usize]; + [::std::mem::offset_of!(float_status, rebias_underflow) - 17usize]; }; impl Default for float_status { fn default() -> Self { @@ -5129,8 +5360,7 @@ pub struct CPUArchState { pub xss: u64, pub umwait: u32, pub tpr_access_type: TPRAccess, - pub nr_dies: ::std::os::raw::c_uint, - pub nr_modules: ::std::os::raw::c_uint, + pub topo_info: X86CPUTopoInfo, pub avail_cpu_topo: [::std::os::raw::c_ulong; 1usize], } #[repr(C)] @@ -5196,7 +5426,7 @@ const _: () = { }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUArchState"][::std::mem::size_of::() - 15072usize]; + ["Size of CPUArchState"][::std::mem::size_of::() - 15104usize]; ["Alignment of CPUArchState"][::std::mem::align_of::() - 16usize]; ["Offset of field: CPUArchState::regs"][::std::mem::offset_of!(CPUArchState, regs) - 0usize]; ["Offset of field: CPUArchState::eip"][::std::mem::offset_of!(CPUArchState, eip) - 128usize]; @@ -5251,345 +5481,343 @@ const _: () = { ["Offset of field: CPUArchState::fpdp"][::std::mem::offset_of!(CPUArchState, fpdp) - 768usize]; ["Offset of field: CPUArchState::fp_status"] [::std::mem::offset_of!(CPUArchState, fp_status) - 776usize]; - ["Offset of field: CPUArchState::ft0"][::std::mem::offset_of!(CPUArchState, ft0) - 792usize]; + ["Offset of field: CPUArchState::ft0"][::std::mem::offset_of!(CPUArchState, ft0) - 800usize]; ["Offset of field: CPUArchState::mmx_status"] - [::std::mem::offset_of!(CPUArchState, mmx_status) - 808usize]; + [::std::mem::offset_of!(CPUArchState, mmx_status) - 816usize]; ["Offset of field: CPUArchState::sse_status"] - [::std::mem::offset_of!(CPUArchState, sse_status) - 822usize]; + [::std::mem::offset_of!(CPUArchState, sse_status) - 834usize]; ["Offset of field: CPUArchState::mxcsr"] - [::std::mem::offset_of!(CPUArchState, mxcsr) - 836usize]; + [::std::mem::offset_of!(CPUArchState, mxcsr) - 852usize]; ["Offset of field: CPUArchState::xmm_regs"] - [::std::mem::offset_of!(CPUArchState, xmm_regs) - 848usize]; + [::std::mem::offset_of!(CPUArchState, xmm_regs) - 864usize]; ["Offset of field: CPUArchState::xmm_t0"] - [::std::mem::offset_of!(CPUArchState, xmm_t0) - 2896usize]; + [::std::mem::offset_of!(CPUArchState, xmm_t0) - 2912usize]; ["Offset of field: CPUArchState::mmx_t0"] - [::std::mem::offset_of!(CPUArchState, mmx_t0) - 2960usize]; + [::std::mem::offset_of!(CPUArchState, mmx_t0) - 2976usize]; ["Offset of field: CPUArchState::opmask_regs"] - [::std::mem::offset_of!(CPUArchState, opmask_regs) - 2968usize]; + [::std::mem::offset_of!(CPUArchState, opmask_regs) - 2984usize]; ["Offset of field: CPUArchState::xtilecfg"] - [::std::mem::offset_of!(CPUArchState, xtilecfg) - 3032usize]; + [::std::mem::offset_of!(CPUArchState, xtilecfg) - 3048usize]; ["Offset of field: CPUArchState::xtiledata"] - [::std::mem::offset_of!(CPUArchState, xtiledata) - 3096usize]; + [::std::mem::offset_of!(CPUArchState, xtiledata) - 3112usize]; ["Offset of field: CPUArchState::sysenter_cs"] - [::std::mem::offset_of!(CPUArchState, sysenter_cs) - 11288usize]; + [::std::mem::offset_of!(CPUArchState, sysenter_cs) - 11304usize]; ["Offset of field: CPUArchState::sysenter_esp"] - [::std::mem::offset_of!(CPUArchState, sysenter_esp) - 11296usize]; + [::std::mem::offset_of!(CPUArchState, sysenter_esp) - 11312usize]; ["Offset of field: CPUArchState::sysenter_eip"] - [::std::mem::offset_of!(CPUArchState, sysenter_eip) - 11304usize]; + [::std::mem::offset_of!(CPUArchState, sysenter_eip) - 11320usize]; ["Offset of field: CPUArchState::star"] - [::std::mem::offset_of!(CPUArchState, star) - 11312usize]; + [::std::mem::offset_of!(CPUArchState, star) - 11328usize]; ["Offset of field: CPUArchState::vm_hsave"] - [::std::mem::offset_of!(CPUArchState, vm_hsave) - 11320usize]; + [::std::mem::offset_of!(CPUArchState, vm_hsave) - 11336usize]; ["Offset of field: CPUArchState::lstar"] - [::std::mem::offset_of!(CPUArchState, lstar) - 11328usize]; + [::std::mem::offset_of!(CPUArchState, lstar) - 11344usize]; ["Offset of field: CPUArchState::cstar"] - [::std::mem::offset_of!(CPUArchState, cstar) - 11336usize]; + [::std::mem::offset_of!(CPUArchState, cstar) - 11352usize]; ["Offset of field: CPUArchState::fmask"] - [::std::mem::offset_of!(CPUArchState, fmask) - 11344usize]; + [::std::mem::offset_of!(CPUArchState, fmask) - 11360usize]; ["Offset of field: CPUArchState::kernelgsbase"] - [::std::mem::offset_of!(CPUArchState, kernelgsbase) - 11352usize]; + [::std::mem::offset_of!(CPUArchState, kernelgsbase) - 11368usize]; ["Offset of field: CPUArchState::fred_rsp0"] - [::std::mem::offset_of!(CPUArchState, fred_rsp0) - 11360usize]; + [::std::mem::offset_of!(CPUArchState, fred_rsp0) - 11376usize]; ["Offset of field: CPUArchState::fred_rsp1"] - [::std::mem::offset_of!(CPUArchState, fred_rsp1) - 11368usize]; + [::std::mem::offset_of!(CPUArchState, fred_rsp1) - 11384usize]; ["Offset of field: CPUArchState::fred_rsp2"] - [::std::mem::offset_of!(CPUArchState, fred_rsp2) - 11376usize]; + [::std::mem::offset_of!(CPUArchState, fred_rsp2) - 11392usize]; ["Offset of field: CPUArchState::fred_rsp3"] - [::std::mem::offset_of!(CPUArchState, fred_rsp3) - 11384usize]; + [::std::mem::offset_of!(CPUArchState, fred_rsp3) - 11400usize]; ["Offset of field: CPUArchState::fred_stklvls"] - [::std::mem::offset_of!(CPUArchState, fred_stklvls) - 11392usize]; + [::std::mem::offset_of!(CPUArchState, fred_stklvls) - 11408usize]; ["Offset of field: CPUArchState::fred_ssp1"] - [::std::mem::offset_of!(CPUArchState, fred_ssp1) - 11400usize]; + [::std::mem::offset_of!(CPUArchState, fred_ssp1) - 11416usize]; ["Offset of field: CPUArchState::fred_ssp2"] - [::std::mem::offset_of!(CPUArchState, fred_ssp2) - 11408usize]; + [::std::mem::offset_of!(CPUArchState, fred_ssp2) - 11424usize]; ["Offset of field: CPUArchState::fred_ssp3"] - [::std::mem::offset_of!(CPUArchState, fred_ssp3) - 11416usize]; + [::std::mem::offset_of!(CPUArchState, fred_ssp3) - 11432usize]; ["Offset of field: CPUArchState::fred_config"] - [::std::mem::offset_of!(CPUArchState, fred_config) - 11424usize]; + [::std::mem::offset_of!(CPUArchState, fred_config) - 11440usize]; ["Offset of field: CPUArchState::tsc_adjust"] - [::std::mem::offset_of!(CPUArchState, tsc_adjust) - 11432usize]; + [::std::mem::offset_of!(CPUArchState, tsc_adjust) - 11448usize]; ["Offset of field: CPUArchState::tsc_deadline"] - [::std::mem::offset_of!(CPUArchState, tsc_deadline) - 11440usize]; + [::std::mem::offset_of!(CPUArchState, tsc_deadline) - 11456usize]; ["Offset of field: CPUArchState::tsc_aux"] - [::std::mem::offset_of!(CPUArchState, tsc_aux) - 11448usize]; + [::std::mem::offset_of!(CPUArchState, tsc_aux) - 11464usize]; ["Offset of field: CPUArchState::xcr0"] - [::std::mem::offset_of!(CPUArchState, xcr0) - 11456usize]; + [::std::mem::offset_of!(CPUArchState, xcr0) - 11472usize]; ["Offset of field: CPUArchState::mcg_status"] - [::std::mem::offset_of!(CPUArchState, mcg_status) - 11464usize]; + [::std::mem::offset_of!(CPUArchState, mcg_status) - 11480usize]; ["Offset of field: CPUArchState::msr_ia32_misc_enable"] - [::std::mem::offset_of!(CPUArchState, msr_ia32_misc_enable) - 11472usize]; + [::std::mem::offset_of!(CPUArchState, msr_ia32_misc_enable) - 11488usize]; ["Offset of field: CPUArchState::msr_ia32_feature_control"] - [::std::mem::offset_of!(CPUArchState, msr_ia32_feature_control) - 11480usize]; + [::std::mem::offset_of!(CPUArchState, msr_ia32_feature_control) - 11496usize]; ["Offset of field: CPUArchState::msr_ia32_sgxlepubkeyhash"] - [::std::mem::offset_of!(CPUArchState, msr_ia32_sgxlepubkeyhash) - 11488usize]; + [::std::mem::offset_of!(CPUArchState, msr_ia32_sgxlepubkeyhash) - 11504usize]; ["Offset of field: CPUArchState::msr_fixed_ctr_ctrl"] - [::std::mem::offset_of!(CPUArchState, msr_fixed_ctr_ctrl) - 11520usize]; + [::std::mem::offset_of!(CPUArchState, msr_fixed_ctr_ctrl) - 11536usize]; ["Offset of field: CPUArchState::msr_global_ctrl"] - [::std::mem::offset_of!(CPUArchState, msr_global_ctrl) - 11528usize]; + [::std::mem::offset_of!(CPUArchState, msr_global_ctrl) - 11544usize]; ["Offset of field: CPUArchState::msr_global_status"] - [::std::mem::offset_of!(CPUArchState, msr_global_status) - 11536usize]; + [::std::mem::offset_of!(CPUArchState, msr_global_status) - 11552usize]; ["Offset of field: CPUArchState::msr_global_ovf_ctrl"] - [::std::mem::offset_of!(CPUArchState, msr_global_ovf_ctrl) - 11544usize]; + [::std::mem::offset_of!(CPUArchState, msr_global_ovf_ctrl) - 11560usize]; ["Offset of field: CPUArchState::msr_fixed_counters"] - [::std::mem::offset_of!(CPUArchState, msr_fixed_counters) - 11552usize]; + [::std::mem::offset_of!(CPUArchState, msr_fixed_counters) - 11568usize]; ["Offset of field: CPUArchState::msr_gp_counters"] - [::std::mem::offset_of!(CPUArchState, msr_gp_counters) - 11576usize]; + [::std::mem::offset_of!(CPUArchState, msr_gp_counters) - 11592usize]; ["Offset of field: CPUArchState::msr_gp_evtsel"] - [::std::mem::offset_of!(CPUArchState, msr_gp_evtsel) - 11720usize]; - ["Offset of field: CPUArchState::pat"][::std::mem::offset_of!(CPUArchState, pat) - 11864usize]; + [::std::mem::offset_of!(CPUArchState, msr_gp_evtsel) - 11736usize]; + ["Offset of field: CPUArchState::pat"][::std::mem::offset_of!(CPUArchState, pat) - 11880usize]; ["Offset of field: CPUArchState::smbase"] - [::std::mem::offset_of!(CPUArchState, smbase) - 11872usize]; + [::std::mem::offset_of!(CPUArchState, smbase) - 11888usize]; ["Offset of field: CPUArchState::msr_smi_count"] - [::std::mem::offset_of!(CPUArchState, msr_smi_count) - 11880usize]; + [::std::mem::offset_of!(CPUArchState, msr_smi_count) - 11896usize]; ["Offset of field: CPUArchState::pkru"] - [::std::mem::offset_of!(CPUArchState, pkru) - 11888usize]; + [::std::mem::offset_of!(CPUArchState, pkru) - 11904usize]; ["Offset of field: CPUArchState::pkrs"] - [::std::mem::offset_of!(CPUArchState, pkrs) - 11892usize]; + [::std::mem::offset_of!(CPUArchState, pkrs) - 11908usize]; ["Offset of field: CPUArchState::tsx_ctrl"] - [::std::mem::offset_of!(CPUArchState, tsx_ctrl) - 11896usize]; + [::std::mem::offset_of!(CPUArchState, tsx_ctrl) - 11912usize]; ["Offset of field: CPUArchState::spec_ctrl"] - [::std::mem::offset_of!(CPUArchState, spec_ctrl) - 11904usize]; + [::std::mem::offset_of!(CPUArchState, spec_ctrl) - 11920usize]; ["Offset of field: CPUArchState::amd_tsc_scale_msr"] - [::std::mem::offset_of!(CPUArchState, amd_tsc_scale_msr) - 11912usize]; + [::std::mem::offset_of!(CPUArchState, amd_tsc_scale_msr) - 11928usize]; ["Offset of field: CPUArchState::virt_ssbd"] - [::std::mem::offset_of!(CPUArchState, virt_ssbd) - 11920usize]; + [::std::mem::offset_of!(CPUArchState, virt_ssbd) - 11936usize]; ["Offset of field: CPUArchState::end_init_save"] - [::std::mem::offset_of!(CPUArchState, end_init_save) - 11928usize]; + [::std::mem::offset_of!(CPUArchState, end_init_save) - 11944usize]; ["Offset of field: CPUArchState::system_time_msr"] - [::std::mem::offset_of!(CPUArchState, system_time_msr) - 11928usize]; + [::std::mem::offset_of!(CPUArchState, system_time_msr) - 11944usize]; ["Offset of field: CPUArchState::wall_clock_msr"] - [::std::mem::offset_of!(CPUArchState, wall_clock_msr) - 11936usize]; + [::std::mem::offset_of!(CPUArchState, wall_clock_msr) - 11952usize]; ["Offset of field: CPUArchState::steal_time_msr"] - [::std::mem::offset_of!(CPUArchState, steal_time_msr) - 11944usize]; + [::std::mem::offset_of!(CPUArchState, steal_time_msr) - 11960usize]; ["Offset of field: CPUArchState::async_pf_en_msr"] - [::std::mem::offset_of!(CPUArchState, async_pf_en_msr) - 11952usize]; + [::std::mem::offset_of!(CPUArchState, async_pf_en_msr) - 11968usize]; ["Offset of field: CPUArchState::async_pf_int_msr"] - [::std::mem::offset_of!(CPUArchState, async_pf_int_msr) - 11960usize]; + [::std::mem::offset_of!(CPUArchState, async_pf_int_msr) - 11976usize]; ["Offset of field: CPUArchState::pv_eoi_en_msr"] - [::std::mem::offset_of!(CPUArchState, pv_eoi_en_msr) - 11968usize]; + [::std::mem::offset_of!(CPUArchState, pv_eoi_en_msr) - 11984usize]; ["Offset of field: CPUArchState::poll_control_msr"] - [::std::mem::offset_of!(CPUArchState, poll_control_msr) - 11976usize]; + [::std::mem::offset_of!(CPUArchState, poll_control_msr) - 11992usize]; ["Offset of field: CPUArchState::msr_hv_hypercall"] - [::std::mem::offset_of!(CPUArchState, msr_hv_hypercall) - 11984usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_hypercall) - 12000usize]; ["Offset of field: CPUArchState::msr_hv_guest_os_id"] - [::std::mem::offset_of!(CPUArchState, msr_hv_guest_os_id) - 11992usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_guest_os_id) - 12008usize]; ["Offset of field: CPUArchState::msr_hv_tsc"] - [::std::mem::offset_of!(CPUArchState, msr_hv_tsc) - 12000usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_tsc) - 12016usize]; ["Offset of field: CPUArchState::msr_hv_syndbg_control"] - [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_control) - 12008usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_control) - 12024usize]; ["Offset of field: CPUArchState::msr_hv_syndbg_status"] - [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_status) - 12016usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_status) - 12032usize]; ["Offset of field: CPUArchState::msr_hv_syndbg_send_page"] - [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_send_page) - 12024usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_send_page) - 12040usize]; ["Offset of field: CPUArchState::msr_hv_syndbg_recv_page"] - [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_recv_page) - 12032usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_recv_page) - 12048usize]; ["Offset of field: CPUArchState::msr_hv_syndbg_pending_page"] - [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_pending_page) - 12040usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_pending_page) - 12056usize]; ["Offset of field: CPUArchState::msr_hv_syndbg_options"] - [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_options) - 12048usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_syndbg_options) - 12064usize]; ["Offset of field: CPUArchState::msr_hv_vapic"] - [::std::mem::offset_of!(CPUArchState, msr_hv_vapic) - 12056usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_vapic) - 12072usize]; ["Offset of field: CPUArchState::msr_hv_crash_params"] - [::std::mem::offset_of!(CPUArchState, msr_hv_crash_params) - 12064usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_crash_params) - 12080usize]; ["Offset of field: CPUArchState::msr_hv_runtime"] - [::std::mem::offset_of!(CPUArchState, msr_hv_runtime) - 12104usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_runtime) - 12120usize]; ["Offset of field: CPUArchState::msr_hv_synic_control"] - [::std::mem::offset_of!(CPUArchState, msr_hv_synic_control) - 12112usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_synic_control) - 12128usize]; ["Offset of field: CPUArchState::msr_hv_synic_evt_page"] - [::std::mem::offset_of!(CPUArchState, msr_hv_synic_evt_page) - 12120usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_synic_evt_page) - 12136usize]; ["Offset of field: CPUArchState::msr_hv_synic_msg_page"] - [::std::mem::offset_of!(CPUArchState, msr_hv_synic_msg_page) - 12128usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_synic_msg_page) - 12144usize]; ["Offset of field: CPUArchState::msr_hv_synic_sint"] - [::std::mem::offset_of!(CPUArchState, msr_hv_synic_sint) - 12136usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_synic_sint) - 12152usize]; ["Offset of field: CPUArchState::msr_hv_stimer_config"] - [::std::mem::offset_of!(CPUArchState, msr_hv_stimer_config) - 12264usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_stimer_config) - 12280usize]; ["Offset of field: CPUArchState::msr_hv_stimer_count"] - [::std::mem::offset_of!(CPUArchState, msr_hv_stimer_count) - 12296usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_stimer_count) - 12312usize]; ["Offset of field: CPUArchState::msr_hv_reenlightenment_control"] - [::std::mem::offset_of!(CPUArchState, msr_hv_reenlightenment_control) - 12328usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_reenlightenment_control) - 12344usize]; ["Offset of field: CPUArchState::msr_hv_tsc_emulation_control"] - [::std::mem::offset_of!(CPUArchState, msr_hv_tsc_emulation_control) - 12336usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_tsc_emulation_control) - 12352usize]; ["Offset of field: CPUArchState::msr_hv_tsc_emulation_status"] - [::std::mem::offset_of!(CPUArchState, msr_hv_tsc_emulation_status) - 12344usize]; + [::std::mem::offset_of!(CPUArchState, msr_hv_tsc_emulation_status) - 12360usize]; ["Offset of field: CPUArchState::msr_rtit_ctrl"] - [::std::mem::offset_of!(CPUArchState, msr_rtit_ctrl) - 12352usize]; + [::std::mem::offset_of!(CPUArchState, msr_rtit_ctrl) - 12368usize]; ["Offset of field: CPUArchState::msr_rtit_status"] - [::std::mem::offset_of!(CPUArchState, msr_rtit_status) - 12360usize]; + [::std::mem::offset_of!(CPUArchState, msr_rtit_status) - 12376usize]; ["Offset of field: CPUArchState::msr_rtit_output_base"] - [::std::mem::offset_of!(CPUArchState, msr_rtit_output_base) - 12368usize]; + [::std::mem::offset_of!(CPUArchState, msr_rtit_output_base) - 12384usize]; ["Offset of field: CPUArchState::msr_rtit_output_mask"] - [::std::mem::offset_of!(CPUArchState, msr_rtit_output_mask) - 12376usize]; + [::std::mem::offset_of!(CPUArchState, msr_rtit_output_mask) - 12392usize]; ["Offset of field: CPUArchState::msr_rtit_cr3_match"] - [::std::mem::offset_of!(CPUArchState, msr_rtit_cr3_match) - 12384usize]; + [::std::mem::offset_of!(CPUArchState, msr_rtit_cr3_match) - 12400usize]; ["Offset of field: CPUArchState::msr_rtit_addrs"] - [::std::mem::offset_of!(CPUArchState, msr_rtit_addrs) - 12392usize]; + [::std::mem::offset_of!(CPUArchState, msr_rtit_addrs) - 12408usize]; ["Offset of field: CPUArchState::msr_xfd"] - [::std::mem::offset_of!(CPUArchState, msr_xfd) - 12456usize]; + [::std::mem::offset_of!(CPUArchState, msr_xfd) - 12472usize]; ["Offset of field: CPUArchState::msr_xfd_err"] - [::std::mem::offset_of!(CPUArchState, msr_xfd_err) - 12464usize]; + [::std::mem::offset_of!(CPUArchState, msr_xfd_err) - 12480usize]; ["Offset of field: CPUArchState::msr_lbr_ctl"] - [::std::mem::offset_of!(CPUArchState, msr_lbr_ctl) - 12472usize]; + [::std::mem::offset_of!(CPUArchState, msr_lbr_ctl) - 12488usize]; ["Offset of field: CPUArchState::msr_lbr_depth"] - [::std::mem::offset_of!(CPUArchState, msr_lbr_depth) - 12480usize]; + [::std::mem::offset_of!(CPUArchState, msr_lbr_depth) - 12496usize]; ["Offset of field: CPUArchState::lbr_records"] - [::std::mem::offset_of!(CPUArchState, lbr_records) - 12488usize]; + [::std::mem::offset_of!(CPUArchState, lbr_records) - 12504usize]; ["Offset of field: CPUArchState::msr_hwcr"] - [::std::mem::offset_of!(CPUArchState, msr_hwcr) - 13256usize]; + [::std::mem::offset_of!(CPUArchState, msr_hwcr) - 13272usize]; ["Offset of field: CPUArchState::error_code"] - [::std::mem::offset_of!(CPUArchState, error_code) - 13264usize]; + [::std::mem::offset_of!(CPUArchState, error_code) - 13280usize]; ["Offset of field: CPUArchState::exception_is_int"] - [::std::mem::offset_of!(CPUArchState, exception_is_int) - 13268usize]; + [::std::mem::offset_of!(CPUArchState, exception_is_int) - 13284usize]; ["Offset of field: CPUArchState::exception_next_eip"] - [::std::mem::offset_of!(CPUArchState, exception_next_eip) - 13272usize]; - ["Offset of field: CPUArchState::dr"][::std::mem::offset_of!(CPUArchState, dr) - 13280usize]; + [::std::mem::offset_of!(CPUArchState, exception_next_eip) - 13288usize]; + ["Offset of field: CPUArchState::dr"][::std::mem::offset_of!(CPUArchState, dr) - 13296usize]; ["Offset of field: CPUArchState::old_exception"] - [::std::mem::offset_of!(CPUArchState, old_exception) - 13376usize]; + [::std::mem::offset_of!(CPUArchState, old_exception) - 13392usize]; ["Offset of field: CPUArchState::vm_vmcb"] - [::std::mem::offset_of!(CPUArchState, vm_vmcb) - 13384usize]; + [::std::mem::offset_of!(CPUArchState, vm_vmcb) - 13400usize]; ["Offset of field: CPUArchState::tsc_offset"] - [::std::mem::offset_of!(CPUArchState, tsc_offset) - 13392usize]; + [::std::mem::offset_of!(CPUArchState, tsc_offset) - 13408usize]; ["Offset of field: CPUArchState::intercept"] - [::std::mem::offset_of!(CPUArchState, intercept) - 13400usize]; + [::std::mem::offset_of!(CPUArchState, intercept) - 13416usize]; ["Offset of field: CPUArchState::intercept_cr_read"] - [::std::mem::offset_of!(CPUArchState, intercept_cr_read) - 13408usize]; + [::std::mem::offset_of!(CPUArchState, intercept_cr_read) - 13424usize]; ["Offset of field: CPUArchState::intercept_cr_write"] - [::std::mem::offset_of!(CPUArchState, intercept_cr_write) - 13410usize]; + [::std::mem::offset_of!(CPUArchState, intercept_cr_write) - 13426usize]; ["Offset of field: CPUArchState::intercept_dr_read"] - [::std::mem::offset_of!(CPUArchState, intercept_dr_read) - 13412usize]; + [::std::mem::offset_of!(CPUArchState, intercept_dr_read) - 13428usize]; ["Offset of field: CPUArchState::intercept_dr_write"] - [::std::mem::offset_of!(CPUArchState, intercept_dr_write) - 13414usize]; + [::std::mem::offset_of!(CPUArchState, intercept_dr_write) - 13430usize]; ["Offset of field: CPUArchState::intercept_exceptions"] - [::std::mem::offset_of!(CPUArchState, intercept_exceptions) - 13416usize]; + [::std::mem::offset_of!(CPUArchState, intercept_exceptions) - 13432usize]; ["Offset of field: CPUArchState::nested_cr3"] - [::std::mem::offset_of!(CPUArchState, nested_cr3) - 13424usize]; + [::std::mem::offset_of!(CPUArchState, nested_cr3) - 13440usize]; ["Offset of field: CPUArchState::nested_pg_mode"] - [::std::mem::offset_of!(CPUArchState, nested_pg_mode) - 13432usize]; + [::std::mem::offset_of!(CPUArchState, nested_pg_mode) - 13448usize]; ["Offset of field: CPUArchState::v_tpr"] - [::std::mem::offset_of!(CPUArchState, v_tpr) - 13436usize]; + [::std::mem::offset_of!(CPUArchState, v_tpr) - 13452usize]; ["Offset of field: CPUArchState::int_ctl"] - [::std::mem::offset_of!(CPUArchState, int_ctl) - 13440usize]; + [::std::mem::offset_of!(CPUArchState, int_ctl) - 13456usize]; ["Offset of field: CPUArchState::nmi_injected"] - [::std::mem::offset_of!(CPUArchState, nmi_injected) - 13444usize]; + [::std::mem::offset_of!(CPUArchState, nmi_injected) - 13460usize]; ["Offset of field: CPUArchState::nmi_pending"] - [::std::mem::offset_of!(CPUArchState, nmi_pending) - 13445usize]; + [::std::mem::offset_of!(CPUArchState, nmi_pending) - 13461usize]; ["Offset of field: CPUArchState::retaddr"] - [::std::mem::offset_of!(CPUArchState, retaddr) - 13448usize]; + [::std::mem::offset_of!(CPUArchState, retaddr) - 13464usize]; ["Offset of field: CPUArchState::msr_rapl_power_unit"] - [::std::mem::offset_of!(CPUArchState, msr_rapl_power_unit) - 13456usize]; + [::std::mem::offset_of!(CPUArchState, msr_rapl_power_unit) - 13472usize]; ["Offset of field: CPUArchState::msr_pkg_energy_status"] - [::std::mem::offset_of!(CPUArchState, msr_pkg_energy_status) - 13464usize]; + [::std::mem::offset_of!(CPUArchState, msr_pkg_energy_status) - 13480usize]; ["Offset of field: CPUArchState::end_reset_fields"] - [::std::mem::offset_of!(CPUArchState, end_reset_fields) - 13472usize]; + [::std::mem::offset_of!(CPUArchState, end_reset_fields) - 13488usize]; ["Offset of field: CPUArchState::cpuid_level_func7"] - [::std::mem::offset_of!(CPUArchState, cpuid_level_func7) - 13472usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_level_func7) - 13488usize]; ["Offset of field: CPUArchState::cpuid_min_level_func7"] - [::std::mem::offset_of!(CPUArchState, cpuid_min_level_func7) - 13476usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_min_level_func7) - 13492usize]; ["Offset of field: CPUArchState::cpuid_min_level"] - [::std::mem::offset_of!(CPUArchState, cpuid_min_level) - 13480usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_min_level) - 13496usize]; ["Offset of field: CPUArchState::cpuid_min_xlevel"] - [::std::mem::offset_of!(CPUArchState, cpuid_min_xlevel) - 13484usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_min_xlevel) - 13500usize]; ["Offset of field: CPUArchState::cpuid_min_xlevel2"] - [::std::mem::offset_of!(CPUArchState, cpuid_min_xlevel2) - 13488usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_min_xlevel2) - 13504usize]; ["Offset of field: CPUArchState::cpuid_max_level"] - [::std::mem::offset_of!(CPUArchState, cpuid_max_level) - 13492usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_max_level) - 13508usize]; ["Offset of field: CPUArchState::cpuid_max_xlevel"] - [::std::mem::offset_of!(CPUArchState, cpuid_max_xlevel) - 13496usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_max_xlevel) - 13512usize]; ["Offset of field: CPUArchState::cpuid_max_xlevel2"] - [::std::mem::offset_of!(CPUArchState, cpuid_max_xlevel2) - 13500usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_max_xlevel2) - 13516usize]; ["Offset of field: CPUArchState::cpuid_level"] - [::std::mem::offset_of!(CPUArchState, cpuid_level) - 13504usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_level) - 13520usize]; ["Offset of field: CPUArchState::cpuid_xlevel"] - [::std::mem::offset_of!(CPUArchState, cpuid_xlevel) - 13508usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_xlevel) - 13524usize]; ["Offset of field: CPUArchState::cpuid_xlevel2"] - [::std::mem::offset_of!(CPUArchState, cpuid_xlevel2) - 13512usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_xlevel2) - 13528usize]; ["Offset of field: CPUArchState::cpuid_vendor1"] - [::std::mem::offset_of!(CPUArchState, cpuid_vendor1) - 13516usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_vendor1) - 13532usize]; ["Offset of field: CPUArchState::cpuid_vendor2"] - [::std::mem::offset_of!(CPUArchState, cpuid_vendor2) - 13520usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_vendor2) - 13536usize]; ["Offset of field: CPUArchState::cpuid_vendor3"] - [::std::mem::offset_of!(CPUArchState, cpuid_vendor3) - 13524usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_vendor3) - 13540usize]; ["Offset of field: CPUArchState::cpuid_version"] - [::std::mem::offset_of!(CPUArchState, cpuid_version) - 13528usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_version) - 13544usize]; ["Offset of field: CPUArchState::features"] - [::std::mem::offset_of!(CPUArchState, features) - 13536usize]; + [::std::mem::offset_of!(CPUArchState, features) - 13552usize]; ["Offset of field: CPUArchState::avx10_version"] - [::std::mem::offset_of!(CPUArchState, avx10_version) - 13880usize]; + [::std::mem::offset_of!(CPUArchState, avx10_version) - 13896usize]; ["Offset of field: CPUArchState::user_features"] - [::std::mem::offset_of!(CPUArchState, user_features) - 13888usize]; + [::std::mem::offset_of!(CPUArchState, user_features) - 13904usize]; ["Offset of field: CPUArchState::cpuid_model"] - [::std::mem::offset_of!(CPUArchState, cpuid_model) - 14232usize]; + [::std::mem::offset_of!(CPUArchState, cpuid_model) - 14248usize]; ["Offset of field: CPUArchState::cache_info_cpuid2"] - [::std::mem::offset_of!(CPUArchState, cache_info_cpuid2) - 14280usize]; + [::std::mem::offset_of!(CPUArchState, cache_info_cpuid2) - 14296usize]; ["Offset of field: CPUArchState::cache_info_cpuid4"] - [::std::mem::offset_of!(CPUArchState, cache_info_cpuid4) - 14312usize]; + [::std::mem::offset_of!(CPUArchState, cache_info_cpuid4) - 14328usize]; ["Offset of field: CPUArchState::cache_info_amd"] - [::std::mem::offset_of!(CPUArchState, cache_info_amd) - 14344usize]; + [::std::mem::offset_of!(CPUArchState, cache_info_amd) - 14360usize]; ["Offset of field: CPUArchState::mtrr_fixed"] - [::std::mem::offset_of!(CPUArchState, mtrr_fixed) - 14376usize]; + [::std::mem::offset_of!(CPUArchState, mtrr_fixed) - 14392usize]; ["Offset of field: CPUArchState::mtrr_deftype"] - [::std::mem::offset_of!(CPUArchState, mtrr_deftype) - 14464usize]; + [::std::mem::offset_of!(CPUArchState, mtrr_deftype) - 14480usize]; ["Offset of field: CPUArchState::mtrr_var"] - [::std::mem::offset_of!(CPUArchState, mtrr_var) - 14472usize]; + [::std::mem::offset_of!(CPUArchState, mtrr_var) - 14488usize]; ["Offset of field: CPUArchState::mp_state"] - [::std::mem::offset_of!(CPUArchState, mp_state) - 14600usize]; + [::std::mem::offset_of!(CPUArchState, mp_state) - 14616usize]; ["Offset of field: CPUArchState::exception_nr"] - [::std::mem::offset_of!(CPUArchState, exception_nr) - 14604usize]; + [::std::mem::offset_of!(CPUArchState, exception_nr) - 14620usize]; ["Offset of field: CPUArchState::interrupt_injected"] - [::std::mem::offset_of!(CPUArchState, interrupt_injected) - 14608usize]; + [::std::mem::offset_of!(CPUArchState, interrupt_injected) - 14624usize]; ["Offset of field: CPUArchState::soft_interrupt"] - [::std::mem::offset_of!(CPUArchState, soft_interrupt) - 14612usize]; + [::std::mem::offset_of!(CPUArchState, soft_interrupt) - 14628usize]; ["Offset of field: CPUArchState::exception_pending"] - [::std::mem::offset_of!(CPUArchState, exception_pending) - 14613usize]; + [::std::mem::offset_of!(CPUArchState, exception_pending) - 14629usize]; ["Offset of field: CPUArchState::exception_injected"] - [::std::mem::offset_of!(CPUArchState, exception_injected) - 14614usize]; + [::std::mem::offset_of!(CPUArchState, exception_injected) - 14630usize]; ["Offset of field: CPUArchState::has_error_code"] - [::std::mem::offset_of!(CPUArchState, has_error_code) - 14615usize]; + [::std::mem::offset_of!(CPUArchState, has_error_code) - 14631usize]; ["Offset of field: CPUArchState::exception_has_payload"] - [::std::mem::offset_of!(CPUArchState, exception_has_payload) - 14616usize]; + [::std::mem::offset_of!(CPUArchState, exception_has_payload) - 14632usize]; ["Offset of field: CPUArchState::exception_payload"] - [::std::mem::offset_of!(CPUArchState, exception_payload) - 14624usize]; + [::std::mem::offset_of!(CPUArchState, exception_payload) - 14640usize]; ["Offset of field: CPUArchState::triple_fault_pending"] - [::std::mem::offset_of!(CPUArchState, triple_fault_pending) - 14632usize]; + [::std::mem::offset_of!(CPUArchState, triple_fault_pending) - 14648usize]; ["Offset of field: CPUArchState::ins_len"] - [::std::mem::offset_of!(CPUArchState, ins_len) - 14636usize]; + [::std::mem::offset_of!(CPUArchState, ins_len) - 14652usize]; ["Offset of field: CPUArchState::sipi_vector"] - [::std::mem::offset_of!(CPUArchState, sipi_vector) - 14640usize]; + [::std::mem::offset_of!(CPUArchState, sipi_vector) - 14656usize]; ["Offset of field: CPUArchState::tsc_valid"] - [::std::mem::offset_of!(CPUArchState, tsc_valid) - 14644usize]; + [::std::mem::offset_of!(CPUArchState, tsc_valid) - 14660usize]; ["Offset of field: CPUArchState::tsc_khz"] - [::std::mem::offset_of!(CPUArchState, tsc_khz) - 14648usize]; + [::std::mem::offset_of!(CPUArchState, tsc_khz) - 14664usize]; ["Offset of field: CPUArchState::user_tsc_khz"] - [::std::mem::offset_of!(CPUArchState, user_tsc_khz) - 14656usize]; + [::std::mem::offset_of!(CPUArchState, user_tsc_khz) - 14672usize]; ["Offset of field: CPUArchState::apic_bus_freq"] - [::std::mem::offset_of!(CPUArchState, apic_bus_freq) - 14664usize]; - ["Offset of field: CPUArchState::tsc"][::std::mem::offset_of!(CPUArchState, tsc) - 14672usize]; + [::std::mem::offset_of!(CPUArchState, apic_bus_freq) - 14680usize]; + ["Offset of field: CPUArchState::tsc"][::std::mem::offset_of!(CPUArchState, tsc) - 14688usize]; ["Offset of field: CPUArchState::mcg_cap"] - [::std::mem::offset_of!(CPUArchState, mcg_cap) - 14680usize]; + [::std::mem::offset_of!(CPUArchState, mcg_cap) - 14696usize]; ["Offset of field: CPUArchState::mcg_ctl"] - [::std::mem::offset_of!(CPUArchState, mcg_ctl) - 14688usize]; + [::std::mem::offset_of!(CPUArchState, mcg_ctl) - 14704usize]; ["Offset of field: CPUArchState::mcg_ext_ctl"] - [::std::mem::offset_of!(CPUArchState, mcg_ext_ctl) - 14696usize]; + [::std::mem::offset_of!(CPUArchState, mcg_ext_ctl) - 14712usize]; ["Offset of field: CPUArchState::mce_banks"] - [::std::mem::offset_of!(CPUArchState, mce_banks) - 14704usize]; + [::std::mem::offset_of!(CPUArchState, mce_banks) - 14720usize]; ["Offset of field: CPUArchState::xstate_bv"] - [::std::mem::offset_of!(CPUArchState, xstate_bv) - 15024usize]; + [::std::mem::offset_of!(CPUArchState, xstate_bv) - 15040usize]; ["Offset of field: CPUArchState::fpus_vmstate"] - [::std::mem::offset_of!(CPUArchState, fpus_vmstate) - 15032usize]; + [::std::mem::offset_of!(CPUArchState, fpus_vmstate) - 15048usize]; ["Offset of field: CPUArchState::fptag_vmstate"] - [::std::mem::offset_of!(CPUArchState, fptag_vmstate) - 15034usize]; + [::std::mem::offset_of!(CPUArchState, fptag_vmstate) - 15050usize]; ["Offset of field: CPUArchState::fpregs_format_vmstate"] - [::std::mem::offset_of!(CPUArchState, fpregs_format_vmstate) - 15036usize]; - ["Offset of field: CPUArchState::xss"][::std::mem::offset_of!(CPUArchState, xss) - 15040usize]; + [::std::mem::offset_of!(CPUArchState, fpregs_format_vmstate) - 15052usize]; + ["Offset of field: CPUArchState::xss"][::std::mem::offset_of!(CPUArchState, xss) - 15056usize]; ["Offset of field: CPUArchState::umwait"] - [::std::mem::offset_of!(CPUArchState, umwait) - 15048usize]; + [::std::mem::offset_of!(CPUArchState, umwait) - 15064usize]; ["Offset of field: CPUArchState::tpr_access_type"] - [::std::mem::offset_of!(CPUArchState, tpr_access_type) - 15052usize]; - ["Offset of field: CPUArchState::nr_dies"] - [::std::mem::offset_of!(CPUArchState, nr_dies) - 15056usize]; - ["Offset of field: CPUArchState::nr_modules"] - [::std::mem::offset_of!(CPUArchState, nr_modules) - 15060usize]; + [::std::mem::offset_of!(CPUArchState, tpr_access_type) - 15068usize]; + ["Offset of field: CPUArchState::topo_info"] + [::std::mem::offset_of!(CPUArchState, topo_info) - 15072usize]; ["Offset of field: CPUArchState::avail_cpu_topo"] - [::std::mem::offset_of!(CPUArchState, avail_cpu_topo) - 15064usize]; + [::std::mem::offset_of!(CPUArchState, avail_cpu_topo) - 15088usize]; }; impl Default for CPUArchState { fn default() -> Self { @@ -5604,7 +5832,7 @@ impl ::std::fmt::Debug for CPUArchState { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( f, - "CPUArchState {{ regs: {:?}, segs: {:?}, ldt: {:?}, tr: {:?}, gdt: {:?}, idt: {:?}, cr: {:?}, pdptrs_valid: {:?}, pdptrs: {:?}, bnd_regs: {:?}, bndcs_regs: {:?}, start_init_save: {:?}, fpstt: {:?}, fptags: {:?}, fpregs: {:?}, fp_status: {:?}, ft0: {:?}, mmx_status: {:?}, sse_status: {:?}, xmm_regs: {:?}, xmm_t0: {:?}, mmx_t0: {:?}, opmask_regs: {:?}, xtilecfg: {:?}, xtiledata: {:?}, msr_ia32_sgxlepubkeyhash: {:?}, msr_fixed_counters: {:?}, msr_gp_counters: {:?}, msr_gp_evtsel: {:?}, end_init_save: {:?}, msr_hv_crash_params: {:?}, msr_hv_synic_sint: {:?}, msr_hv_stimer_config: {:?}, msr_hv_stimer_count: {:?}, msr_rtit_addrs: {:?}, lbr_records: {:?}, error_code: {:?}, exception_is_int: {:?}, dr: {:?}, __bindgen_anon_1: {:?}, old_exception: {:?}, end_reset_fields: {:?}, features: {:?}, user_features: {:?}, cpuid_model: {:?}, cache_info_cpuid2: {:?}, cache_info_cpuid4: {:?}, cache_info_amd: {:?}, mtrr_fixed: {:?}, mtrr_var: {:?}, tsc_valid: {:?}, mce_banks: {:?}, tpr_access_type: {:?}, nr_dies: {:?}, nr_modules: {:?}, avail_cpu_topo: {:?} }}", + "CPUArchState {{ regs: {:?}, segs: {:?}, ldt: {:?}, tr: {:?}, gdt: {:?}, idt: {:?}, cr: {:?}, pdptrs_valid: {:?}, pdptrs: {:?}, bnd_regs: {:?}, bndcs_regs: {:?}, start_init_save: {:?}, fpstt: {:?}, fptags: {:?}, fpregs: {:?}, fp_status: {:?}, ft0: {:?}, mmx_status: {:?}, sse_status: {:?}, xmm_regs: {:?}, xmm_t0: {:?}, mmx_t0: {:?}, opmask_regs: {:?}, xtilecfg: {:?}, xtiledata: {:?}, msr_ia32_sgxlepubkeyhash: {:?}, msr_fixed_counters: {:?}, msr_gp_counters: {:?}, msr_gp_evtsel: {:?}, end_init_save: {:?}, msr_hv_crash_params: {:?}, msr_hv_synic_sint: {:?}, msr_hv_stimer_config: {:?}, msr_hv_stimer_count: {:?}, msr_rtit_addrs: {:?}, lbr_records: {:?}, error_code: {:?}, exception_is_int: {:?}, dr: {:?}, __bindgen_anon_1: {:?}, old_exception: {:?}, end_reset_fields: {:?}, features: {:?}, user_features: {:?}, cpuid_model: {:?}, cache_info_cpuid2: {:?}, cache_info_cpuid4: {:?}, cache_info_amd: {:?}, mtrr_fixed: {:?}, mtrr_var: {:?}, tsc_valid: {:?}, mce_banks: {:?}, tpr_access_type: {:?}, topo_info: {:?}, avail_cpu_topo: {:?} }}", self.regs, self.segs, self.ldt, @@ -5658,8 +5886,7 @@ impl ::std::fmt::Debug for CPUArchState { self.tsc_valid, self.mce_banks, self.tpr_access_type, - self.nr_dies, - self.nr_modules, + self.topo_info, self.avail_cpu_topo ) } @@ -5764,128 +5991,128 @@ const _: () = { }; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of ArchCPU"][::std::mem::size_of::() - 25904usize]; + ["Size of ArchCPU"][::std::mem::size_of::() - 26944usize]; ["Alignment of ArchCPU"][::std::mem::align_of::() - 16usize]; ["Offset of field: ArchCPU::parent_obj"][::std::mem::offset_of!(ArchCPU, parent_obj) - 0usize]; - ["Offset of field: ArchCPU::env"][::std::mem::offset_of!(ArchCPU, env) - 10192usize]; - ["Offset of field: ArchCPU::vmsentry"][::std::mem::offset_of!(ArchCPU, vmsentry) - 25264usize]; + ["Offset of field: ArchCPU::env"][::std::mem::offset_of!(ArchCPU, env) - 11200usize]; + ["Offset of field: ArchCPU::vmsentry"][::std::mem::offset_of!(ArchCPU, vmsentry) - 26304usize]; ["Offset of field: ArchCPU::ucode_rev"] - [::std::mem::offset_of!(ArchCPU, ucode_rev) - 25272usize]; + [::std::mem::offset_of!(ArchCPU, ucode_rev) - 26312usize]; ["Offset of field: ArchCPU::hyperv_spinlock_attempts"] - [::std::mem::offset_of!(ArchCPU, hyperv_spinlock_attempts) - 25280usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_spinlock_attempts) - 26320usize]; ["Offset of field: ArchCPU::hyperv_vendor"] - [::std::mem::offset_of!(ArchCPU, hyperv_vendor) - 25288usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_vendor) - 26328usize]; ["Offset of field: ArchCPU::hyperv_synic_kvm_only"] - [::std::mem::offset_of!(ArchCPU, hyperv_synic_kvm_only) - 25296usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_synic_kvm_only) - 26336usize]; ["Offset of field: ArchCPU::hyperv_features"] - [::std::mem::offset_of!(ArchCPU, hyperv_features) - 25304usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_features) - 26344usize]; ["Offset of field: ArchCPU::hyperv_passthrough"] - [::std::mem::offset_of!(ArchCPU, hyperv_passthrough) - 25312usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_passthrough) - 26352usize]; ["Offset of field: ArchCPU::hyperv_no_nonarch_cs"] - [::std::mem::offset_of!(ArchCPU, hyperv_no_nonarch_cs) - 25316usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_no_nonarch_cs) - 26356usize]; ["Offset of field: ArchCPU::hyperv_vendor_id"] - [::std::mem::offset_of!(ArchCPU, hyperv_vendor_id) - 25320usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_vendor_id) - 26360usize]; ["Offset of field: ArchCPU::hyperv_interface_id"] - [::std::mem::offset_of!(ArchCPU, hyperv_interface_id) - 25332usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_interface_id) - 26372usize]; ["Offset of field: ArchCPU::hyperv_limits"] - [::std::mem::offset_of!(ArchCPU, hyperv_limits) - 25348usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_limits) - 26388usize]; ["Offset of field: ArchCPU::hyperv_enforce_cpuid"] - [::std::mem::offset_of!(ArchCPU, hyperv_enforce_cpuid) - 25360usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_enforce_cpuid) - 26400usize]; ["Offset of field: ArchCPU::hyperv_ver_id_build"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_build) - 25364usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_build) - 26404usize]; ["Offset of field: ArchCPU::hyperv_ver_id_major"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_major) - 25368usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_major) - 26408usize]; ["Offset of field: ArchCPU::hyperv_ver_id_minor"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_minor) - 25370usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_minor) - 26410usize]; ["Offset of field: ArchCPU::hyperv_ver_id_sp"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sp) - 25372usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sp) - 26412usize]; ["Offset of field: ArchCPU::hyperv_ver_id_sb"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sb) - 25376usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sb) - 26416usize]; ["Offset of field: ArchCPU::hyperv_ver_id_sn"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sn) - 25380usize]; + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sn) - 26420usize]; ["Offset of field: ArchCPU::check_cpuid"] - [::std::mem::offset_of!(ArchCPU, check_cpuid) - 25384usize]; + [::std::mem::offset_of!(ArchCPU, check_cpuid) - 26424usize]; ["Offset of field: ArchCPU::enforce_cpuid"] - [::std::mem::offset_of!(ArchCPU, enforce_cpuid) - 25385usize]; + [::std::mem::offset_of!(ArchCPU, enforce_cpuid) - 26425usize]; ["Offset of field: ArchCPU::force_features"] - [::std::mem::offset_of!(ArchCPU, force_features) - 25386usize]; + [::std::mem::offset_of!(ArchCPU, force_features) - 26426usize]; ["Offset of field: ArchCPU::expose_kvm"] - [::std::mem::offset_of!(ArchCPU, expose_kvm) - 25387usize]; + [::std::mem::offset_of!(ArchCPU, expose_kvm) - 26427usize]; ["Offset of field: ArchCPU::expose_tcg"] - [::std::mem::offset_of!(ArchCPU, expose_tcg) - 25388usize]; + [::std::mem::offset_of!(ArchCPU, expose_tcg) - 26428usize]; ["Offset of field: ArchCPU::migratable"] - [::std::mem::offset_of!(ArchCPU, migratable) - 25389usize]; + [::std::mem::offset_of!(ArchCPU, migratable) - 26429usize]; ["Offset of field: ArchCPU::migrate_smi_count"] - [::std::mem::offset_of!(ArchCPU, migrate_smi_count) - 25390usize]; + [::std::mem::offset_of!(ArchCPU, migrate_smi_count) - 26430usize]; ["Offset of field: ArchCPU::max_features"] - [::std::mem::offset_of!(ArchCPU, max_features) - 25391usize]; - ["Offset of field: ArchCPU::apic_id"][::std::mem::offset_of!(ArchCPU, apic_id) - 25392usize]; + [::std::mem::offset_of!(ArchCPU, max_features) - 26431usize]; + ["Offset of field: ArchCPU::apic_id"][::std::mem::offset_of!(ArchCPU, apic_id) - 26432usize]; ["Offset of field: ArchCPU::vmware_cpuid_freq"] - [::std::mem::offset_of!(ArchCPU, vmware_cpuid_freq) - 25396usize]; + [::std::mem::offset_of!(ArchCPU, vmware_cpuid_freq) - 26436usize]; ["Offset of field: ArchCPU::cache_info_passthrough"] - [::std::mem::offset_of!(ArchCPU, cache_info_passthrough) - 25397usize]; - ["Offset of field: ArchCPU::mwait"][::std::mem::offset_of!(ArchCPU, mwait) - 25400usize]; + [::std::mem::offset_of!(ArchCPU, cache_info_passthrough) - 26437usize]; + ["Offset of field: ArchCPU::mwait"][::std::mem::offset_of!(ArchCPU, mwait) - 26440usize]; ["Offset of field: ArchCPU::filtered_features"] - [::std::mem::offset_of!(ArchCPU, filtered_features) - 25416usize]; + [::std::mem::offset_of!(ArchCPU, filtered_features) - 26456usize]; ["Offset of field: ArchCPU::enable_pmu"] - [::std::mem::offset_of!(ArchCPU, enable_pmu) - 25760usize]; - ["Offset of field: ArchCPU::lbr_fmt"][::std::mem::offset_of!(ArchCPU, lbr_fmt) - 25768usize]; + [::std::mem::offset_of!(ArchCPU, enable_pmu) - 26800usize]; + ["Offset of field: ArchCPU::lbr_fmt"][::std::mem::offset_of!(ArchCPU, lbr_fmt) - 26808usize]; ["Offset of field: ArchCPU::enable_lmce"] - [::std::mem::offset_of!(ArchCPU, enable_lmce) - 25776usize]; + [::std::mem::offset_of!(ArchCPU, enable_lmce) - 26816usize]; ["Offset of field: ArchCPU::enable_l3_cache"] - [::std::mem::offset_of!(ArchCPU, enable_l3_cache) - 25777usize]; + [::std::mem::offset_of!(ArchCPU, enable_l3_cache) - 26817usize]; ["Offset of field: ArchCPU::l1_cache_per_core"] - [::std::mem::offset_of!(ArchCPU, l1_cache_per_core) - 25778usize]; + [::std::mem::offset_of!(ArchCPU, l1_cache_per_core) - 26818usize]; ["Offset of field: ArchCPU::legacy_cache"] - [::std::mem::offset_of!(ArchCPU, legacy_cache) - 25779usize]; + [::std::mem::offset_of!(ArchCPU, legacy_cache) - 26819usize]; ["Offset of field: ArchCPU::legacy_multi_node"] - [::std::mem::offset_of!(ArchCPU, legacy_multi_node) - 25780usize]; + [::std::mem::offset_of!(ArchCPU, legacy_multi_node) - 26820usize]; ["Offset of field: ArchCPU::enable_cpuid_0xb"] - [::std::mem::offset_of!(ArchCPU, enable_cpuid_0xb) - 25781usize]; + [::std::mem::offset_of!(ArchCPU, enable_cpuid_0xb) - 26821usize]; ["Offset of field: ArchCPU::full_cpuid_auto_level"] - [::std::mem::offset_of!(ArchCPU, full_cpuid_auto_level) - 25782usize]; + [::std::mem::offset_of!(ArchCPU, full_cpuid_auto_level) - 26822usize]; ["Offset of field: ArchCPU::vendor_cpuid_only"] - [::std::mem::offset_of!(ArchCPU, vendor_cpuid_only) - 25783usize]; + [::std::mem::offset_of!(ArchCPU, vendor_cpuid_only) - 26823usize]; ["Offset of field: ArchCPU::amd_topoext_features_only"] - [::std::mem::offset_of!(ArchCPU, amd_topoext_features_only) - 25784usize]; + [::std::mem::offset_of!(ArchCPU, amd_topoext_features_only) - 26824usize]; ["Offset of field: ArchCPU::intel_pt_auto_level"] - [::std::mem::offset_of!(ArchCPU, intel_pt_auto_level) - 25785usize]; + [::std::mem::offset_of!(ArchCPU, intel_pt_auto_level) - 26825usize]; ["Offset of field: ArchCPU::fill_mtrr_mask"] - [::std::mem::offset_of!(ArchCPU, fill_mtrr_mask) - 25786usize]; + [::std::mem::offset_of!(ArchCPU, fill_mtrr_mask) - 26826usize]; ["Offset of field: ArchCPU::host_phys_bits"] - [::std::mem::offset_of!(ArchCPU, host_phys_bits) - 25787usize]; + [::std::mem::offset_of!(ArchCPU, host_phys_bits) - 26827usize]; ["Offset of field: ArchCPU::host_phys_bits_limit"] - [::std::mem::offset_of!(ArchCPU, host_phys_bits_limit) - 25788usize]; + [::std::mem::offset_of!(ArchCPU, host_phys_bits_limit) - 26828usize]; ["Offset of field: ArchCPU::kvm_pv_enforce_cpuid"] - [::std::mem::offset_of!(ArchCPU, kvm_pv_enforce_cpuid) - 25789usize]; + [::std::mem::offset_of!(ArchCPU, kvm_pv_enforce_cpuid) - 26829usize]; ["Offset of field: ArchCPU::phys_bits"] - [::std::mem::offset_of!(ArchCPU, phys_bits) - 25792usize]; + [::std::mem::offset_of!(ArchCPU, phys_bits) - 26832usize]; ["Offset of field: ArchCPU::guest_phys_bits"] - [::std::mem::offset_of!(ArchCPU, guest_phys_bits) - 25796usize]; + [::std::mem::offset_of!(ArchCPU, guest_phys_bits) - 26836usize]; ["Offset of field: ArchCPU::apic_state"] - [::std::mem::offset_of!(ArchCPU, apic_state) - 25800usize]; + [::std::mem::offset_of!(ArchCPU, apic_state) - 26840usize]; ["Offset of field: ArchCPU::cpu_as_root"] - [::std::mem::offset_of!(ArchCPU, cpu_as_root) - 25808usize]; + [::std::mem::offset_of!(ArchCPU, cpu_as_root) - 26848usize]; ["Offset of field: ArchCPU::cpu_as_mem"] - [::std::mem::offset_of!(ArchCPU, cpu_as_mem) - 25816usize]; - ["Offset of field: ArchCPU::smram"][::std::mem::offset_of!(ArchCPU, smram) - 25824usize]; + [::std::mem::offset_of!(ArchCPU, cpu_as_mem) - 26856usize]; + ["Offset of field: ArchCPU::smram"][::std::mem::offset_of!(ArchCPU, smram) - 26864usize]; ["Offset of field: ArchCPU::machine_done"] - [::std::mem::offset_of!(ArchCPU, machine_done) - 25832usize]; + [::std::mem::offset_of!(ArchCPU, machine_done) - 26872usize]; ["Offset of field: ArchCPU::kvm_msr_buf"] - [::std::mem::offset_of!(ArchCPU, kvm_msr_buf) - 25856usize]; - ["Offset of field: ArchCPU::node_id"][::std::mem::offset_of!(ArchCPU, node_id) - 25864usize]; + [::std::mem::offset_of!(ArchCPU, kvm_msr_buf) - 26896usize]; + ["Offset of field: ArchCPU::node_id"][::std::mem::offset_of!(ArchCPU, node_id) - 26904usize]; ["Offset of field: ArchCPU::socket_id"] - [::std::mem::offset_of!(ArchCPU, socket_id) - 25868usize]; - ["Offset of field: ArchCPU::die_id"][::std::mem::offset_of!(ArchCPU, die_id) - 25872usize]; + [::std::mem::offset_of!(ArchCPU, socket_id) - 26908usize]; + ["Offset of field: ArchCPU::die_id"][::std::mem::offset_of!(ArchCPU, die_id) - 26912usize]; ["Offset of field: ArchCPU::module_id"] - [::std::mem::offset_of!(ArchCPU, module_id) - 25876usize]; - ["Offset of field: ArchCPU::core_id"][::std::mem::offset_of!(ArchCPU, core_id) - 25880usize]; + [::std::mem::offset_of!(ArchCPU, module_id) - 26916usize]; + ["Offset of field: ArchCPU::core_id"][::std::mem::offset_of!(ArchCPU, core_id) - 26920usize]; ["Offset of field: ArchCPU::thread_id"] - [::std::mem::offset_of!(ArchCPU, thread_id) - 25884usize]; + [::std::mem::offset_of!(ArchCPU, thread_id) - 26924usize]; ["Offset of field: ArchCPU::hv_max_vps"] - [::std::mem::offset_of!(ArchCPU, hv_max_vps) - 25888usize]; + [::std::mem::offset_of!(ArchCPU, hv_max_vps) - 26928usize]; ["Offset of field: ArchCPU::xen_vapic"] - [::std::mem::offset_of!(ArchCPU, xen_vapic) - 25892usize]; + [::std::mem::offset_of!(ArchCPU, xen_vapic) - 26932usize]; }; impl Default for ArchCPU { fn default() -> Self { @@ -6057,11 +6284,96 @@ impl Default for IntervalTreeNode { } } pub type IntervalTreeRoot = RBRootLeftCached; +pub type MemOpIdx = u32; pub type abi_ulong = target_ulong; pub type abi_long = target_long; unsafe extern "C" { - #[doc = " --- Begin LibAFL code ---"] - pub fn pageflags_get_root() -> *mut IntervalTreeRoot; + pub static mut guest_base: usize; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct tb_tc { + pub ptr: *const ::std::os::raw::c_void, + pub size: usize, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of tb_tc"][::std::mem::size_of::() - 16usize]; + ["Alignment of tb_tc"][::std::mem::align_of::() - 8usize]; + ["Offset of field: tb_tc::ptr"][::std::mem::offset_of!(tb_tc, ptr) - 0usize]; + ["Offset of field: tb_tc::size"][::std::mem::offset_of!(tb_tc, size) - 8usize]; +}; +impl Default for tb_tc { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TranslationBlock { + pub pc: vaddr, + pub cs_base: u64, + pub flags: u32, + pub cflags: u32, + pub size: u16, + pub icount: u16, + pub tc: tb_tc, + pub itree: IntervalTreeNode, + pub jmp_lock: QemuSpin, + pub jmp_reset_offset: [u16; 2usize], + pub jmp_insn_offset: [u16; 2usize], + pub jmp_target_addr: [usize; 2usize], + pub jmp_list_head: usize, + pub jmp_list_next: [usize; 2usize], + pub jmp_dest: [usize; 2usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of TranslationBlock"][::std::mem::size_of::() - 168usize]; + ["Alignment of TranslationBlock"][::std::mem::align_of::() - 8usize]; + ["Offset of field: TranslationBlock::pc"] + [::std::mem::offset_of!(TranslationBlock, pc) - 0usize]; + ["Offset of field: TranslationBlock::cs_base"] + [::std::mem::offset_of!(TranslationBlock, cs_base) - 8usize]; + ["Offset of field: TranslationBlock::flags"] + [::std::mem::offset_of!(TranslationBlock, flags) - 16usize]; + ["Offset of field: TranslationBlock::cflags"] + [::std::mem::offset_of!(TranslationBlock, cflags) - 20usize]; + ["Offset of field: TranslationBlock::size"] + [::std::mem::offset_of!(TranslationBlock, size) - 24usize]; + ["Offset of field: TranslationBlock::icount"] + [::std::mem::offset_of!(TranslationBlock, icount) - 26usize]; + ["Offset of field: TranslationBlock::tc"] + [::std::mem::offset_of!(TranslationBlock, tc) - 32usize]; + ["Offset of field: TranslationBlock::itree"] + [::std::mem::offset_of!(TranslationBlock, itree) - 48usize]; + ["Offset of field: TranslationBlock::jmp_lock"] + [::std::mem::offset_of!(TranslationBlock, jmp_lock) - 96usize]; + ["Offset of field: TranslationBlock::jmp_reset_offset"] + [::std::mem::offset_of!(TranslationBlock, jmp_reset_offset) - 100usize]; + ["Offset of field: TranslationBlock::jmp_insn_offset"] + [::std::mem::offset_of!(TranslationBlock, jmp_insn_offset) - 104usize]; + ["Offset of field: TranslationBlock::jmp_target_addr"] + [::std::mem::offset_of!(TranslationBlock, jmp_target_addr) - 112usize]; + ["Offset of field: TranslationBlock::jmp_list_head"] + [::std::mem::offset_of!(TranslationBlock, jmp_list_head) - 128usize]; + ["Offset of field: TranslationBlock::jmp_list_next"] + [::std::mem::offset_of!(TranslationBlock, jmp_list_next) - 136usize]; + ["Offset of field: TranslationBlock::jmp_dest"] + [::std::mem::offset_of!(TranslationBlock, jmp_dest) - 152usize]; +}; +impl Default for TranslationBlock { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } } unsafe extern "C" { #[doc = " page_check_range\n @start: first byte of range\n @len: length of range\n @flags: flags required for each page\n\n Return true if every page in [@start, @start+@len) has @flags set.\n Return false if any page is unmapped. Thus testing flags == 0 is\n equivalent to testing for flags == PAGE_VALID."] @@ -6071,9 +6383,9 @@ unsafe extern "C" { flags: ::std::os::raw::c_int, ) -> bool; } -pub type MemOpIdx = u32; unsafe extern "C" { - pub static mut guest_base: usize; + #[doc = " --- Begin LibAFL code ---"] + pub fn pageflags_get_root() -> *mut IntervalTreeRoot; } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -6184,91 +6496,6 @@ impl Default for image_info { } } } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct tb_tc { - pub ptr: *const ::std::os::raw::c_void, - pub size: usize, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of tb_tc"][::std::mem::size_of::() - 16usize]; - ["Alignment of tb_tc"][::std::mem::align_of::() - 8usize]; - ["Offset of field: tb_tc::ptr"][::std::mem::offset_of!(tb_tc, ptr) - 0usize]; - ["Offset of field: tb_tc::size"][::std::mem::offset_of!(tb_tc, size) - 8usize]; -}; -impl Default for tb_tc { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct TranslationBlock { - pub pc: vaddr, - pub cs_base: u64, - pub flags: u32, - pub cflags: u32, - pub size: u16, - pub icount: u16, - pub tc: tb_tc, - pub itree: IntervalTreeNode, - pub jmp_lock: QemuSpin, - pub jmp_reset_offset: [u16; 2usize], - pub jmp_insn_offset: [u16; 2usize], - pub jmp_target_addr: [usize; 2usize], - pub jmp_list_head: usize, - pub jmp_list_next: [usize; 2usize], - pub jmp_dest: [usize; 2usize], -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of TranslationBlock"][::std::mem::size_of::() - 168usize]; - ["Alignment of TranslationBlock"][::std::mem::align_of::() - 8usize]; - ["Offset of field: TranslationBlock::pc"] - [::std::mem::offset_of!(TranslationBlock, pc) - 0usize]; - ["Offset of field: TranslationBlock::cs_base"] - [::std::mem::offset_of!(TranslationBlock, cs_base) - 8usize]; - ["Offset of field: TranslationBlock::flags"] - [::std::mem::offset_of!(TranslationBlock, flags) - 16usize]; - ["Offset of field: TranslationBlock::cflags"] - [::std::mem::offset_of!(TranslationBlock, cflags) - 20usize]; - ["Offset of field: TranslationBlock::size"] - [::std::mem::offset_of!(TranslationBlock, size) - 24usize]; - ["Offset of field: TranslationBlock::icount"] - [::std::mem::offset_of!(TranslationBlock, icount) - 26usize]; - ["Offset of field: TranslationBlock::tc"] - [::std::mem::offset_of!(TranslationBlock, tc) - 32usize]; - ["Offset of field: TranslationBlock::itree"] - [::std::mem::offset_of!(TranslationBlock, itree) - 48usize]; - ["Offset of field: TranslationBlock::jmp_lock"] - [::std::mem::offset_of!(TranslationBlock, jmp_lock) - 96usize]; - ["Offset of field: TranslationBlock::jmp_reset_offset"] - [::std::mem::offset_of!(TranslationBlock, jmp_reset_offset) - 100usize]; - ["Offset of field: TranslationBlock::jmp_insn_offset"] - [::std::mem::offset_of!(TranslationBlock, jmp_insn_offset) - 104usize]; - ["Offset of field: TranslationBlock::jmp_target_addr"] - [::std::mem::offset_of!(TranslationBlock, jmp_target_addr) - 112usize]; - ["Offset of field: TranslationBlock::jmp_list_head"] - [::std::mem::offset_of!(TranslationBlock, jmp_list_head) - 128usize]; - ["Offset of field: TranslationBlock::jmp_list_next"] - [::std::mem::offset_of!(TranslationBlock, jmp_list_next) - 136usize]; - ["Offset of field: TranslationBlock::jmp_dest"] - [::std::mem::offset_of!(TranslationBlock, jmp_dest) - 152usize]; -}; -impl Default for TranslationBlock { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} unsafe extern "C" { pub static mut exec_path: *mut ::std::os::raw::c_char; } @@ -6305,312 +6532,6 @@ unsafe extern "C" { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct libafl_breakpoint { - pub addr: target_ulong, - pub next: *mut libafl_breakpoint, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_breakpoint"][::std::mem::size_of::() - 16usize]; - ["Alignment of libafl_breakpoint"][::std::mem::align_of::() - 8usize]; - ["Offset of field: libafl_breakpoint::addr"] - [::std::mem::offset_of!(libafl_breakpoint, addr) - 0usize]; - ["Offset of field: libafl_breakpoint::next"] - [::std::mem::offset_of!(libafl_breakpoint, next) - 8usize]; -}; -impl Default for libafl_breakpoint { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -pub const libafl_exit_reason_kind_INTERNAL: libafl_exit_reason_kind = libafl_exit_reason_kind(0); -pub const libafl_exit_reason_kind_BREAKPOINT: libafl_exit_reason_kind = libafl_exit_reason_kind(1); -pub const libafl_exit_reason_kind_CUSTOM_INSN: libafl_exit_reason_kind = libafl_exit_reason_kind(2); -pub const libafl_exit_reason_kind_CRASH: libafl_exit_reason_kind = libafl_exit_reason_kind(3); -pub const libafl_exit_reason_kind_TIMEOUT: libafl_exit_reason_kind = libafl_exit_reason_kind(4); -impl ::std::ops::BitOr for libafl_exit_reason_kind { - type Output = Self; - #[inline] - fn bitor(self, other: Self) -> Self { - libafl_exit_reason_kind(self.0 | other.0) - } -} -impl ::std::ops::BitOrAssign for libafl_exit_reason_kind { - #[inline] - fn bitor_assign(&mut self, rhs: libafl_exit_reason_kind) { - self.0 |= rhs.0; - } -} -impl ::std::ops::BitAnd for libafl_exit_reason_kind { - type Output = Self; - #[inline] - fn bitand(self, other: Self) -> Self { - libafl_exit_reason_kind(self.0 & other.0) - } -} -impl ::std::ops::BitAndAssign for libafl_exit_reason_kind { - #[inline] - fn bitand_assign(&mut self, rhs: libafl_exit_reason_kind) { - self.0 &= rhs.0; - } -} -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct libafl_exit_reason_kind(pub ::std::os::raw::c_uint); -pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_UNDEFINED: libafl_custom_insn_kind = - libafl_custom_insn_kind(0); -pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_LIBAFL: libafl_custom_insn_kind = - libafl_custom_insn_kind(1); -pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_NYX: libafl_custom_insn_kind = - libafl_custom_insn_kind(2); -impl ::std::ops::BitOr for libafl_custom_insn_kind { - type Output = Self; - #[inline] - fn bitor(self, other: Self) -> Self { - libafl_custom_insn_kind(self.0 | other.0) - } -} -impl ::std::ops::BitOrAssign for libafl_custom_insn_kind { - #[inline] - fn bitor_assign(&mut self, rhs: libafl_custom_insn_kind) { - self.0 |= rhs.0; - } -} -impl ::std::ops::BitAnd for libafl_custom_insn_kind { - type Output = Self; - #[inline] - fn bitand(self, other: Self) -> Self { - libafl_custom_insn_kind(self.0 & other.0) - } -} -impl ::std::ops::BitAndAssign for libafl_custom_insn_kind { - #[inline] - fn bitand_assign(&mut self, rhs: libafl_custom_insn_kind) { - self.0 &= rhs.0; - } -} -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct libafl_custom_insn_kind(pub ::std::os::raw::c_uint); -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct libafl_exit_reason_internal { - pub cause: ShutdownCause, - pub signal: ::std::os::raw::c_int, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason_internal"] - [::std::mem::size_of::() - 8usize]; - ["Alignment of libafl_exit_reason_internal"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: libafl_exit_reason_internal::cause"] - [::std::mem::offset_of!(libafl_exit_reason_internal, cause) - 0usize]; - ["Offset of field: libafl_exit_reason_internal::signal"] - [::std::mem::offset_of!(libafl_exit_reason_internal, signal) - 4usize]; -}; -impl Default for libafl_exit_reason_internal { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct libafl_exit_reason_breakpoint { - pub addr: target_ulong, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason_breakpoint"] - [::std::mem::size_of::() - 8usize]; - ["Alignment of libafl_exit_reason_breakpoint"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: libafl_exit_reason_breakpoint::addr"] - [::std::mem::offset_of!(libafl_exit_reason_breakpoint, addr) - 0usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct libafl_exit_reason_custom_insn { - pub kind: libafl_custom_insn_kind, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason_custom_insn"] - [::std::mem::size_of::() - 4usize]; - ["Alignment of libafl_exit_reason_custom_insn"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: libafl_exit_reason_custom_insn::kind"] - [::std::mem::offset_of!(libafl_exit_reason_custom_insn, kind) - 0usize]; -}; -impl Default for libafl_exit_reason_custom_insn { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct libafl_exit_reason_crash {} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason_crash"] - [::std::mem::size_of::() - 0usize]; - ["Alignment of libafl_exit_reason_crash"] - [::std::mem::align_of::() - 1usize]; -}; -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct libafl_exit_reason_timeout {} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason_timeout"] - [::std::mem::size_of::() - 0usize]; - ["Alignment of libafl_exit_reason_timeout"] - [::std::mem::align_of::() - 1usize]; -}; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct libafl_exit_reason { - pub kind: libafl_exit_reason_kind, - pub cpu: *mut CPUState, - pub next_pc: vaddr, - pub data: libafl_exit_reason__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union libafl_exit_reason__bindgen_ty_1 { - pub internal: libafl_exit_reason_internal, - pub breakpoint: libafl_exit_reason_breakpoint, - pub custom_insn: libafl_exit_reason_custom_insn, - pub crash: libafl_exit_reason_crash, - pub timeout: libafl_exit_reason_timeout, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason__bindgen_ty_1"] - [::std::mem::size_of::() - 8usize]; - ["Alignment of libafl_exit_reason__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: libafl_exit_reason__bindgen_ty_1::internal"] - [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, internal) - 0usize]; - ["Offset of field: libafl_exit_reason__bindgen_ty_1::breakpoint"] - [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, breakpoint) - 0usize]; - ["Offset of field: libafl_exit_reason__bindgen_ty_1::custom_insn"] - [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, custom_insn) - 0usize]; - ["Offset of field: libafl_exit_reason__bindgen_ty_1::crash"] - [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, crash) - 0usize]; - ["Offset of field: libafl_exit_reason__bindgen_ty_1::timeout"] - [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, timeout) - 0usize]; -}; -impl Default for libafl_exit_reason__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl ::std::fmt::Debug for libafl_exit_reason__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "libafl_exit_reason__bindgen_ty_1 {{ union }}") - } -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_exit_reason"][::std::mem::size_of::() - 32usize]; - ["Alignment of libafl_exit_reason"][::std::mem::align_of::() - 8usize]; - ["Offset of field: libafl_exit_reason::kind"] - [::std::mem::offset_of!(libafl_exit_reason, kind) - 0usize]; - ["Offset of field: libafl_exit_reason::cpu"] - [::std::mem::offset_of!(libafl_exit_reason, cpu) - 8usize]; - ["Offset of field: libafl_exit_reason::next_pc"] - [::std::mem::offset_of!(libafl_exit_reason, next_pc) - 16usize]; - ["Offset of field: libafl_exit_reason::data"] - [::std::mem::offset_of!(libafl_exit_reason, data) - 24usize]; -}; -impl Default for libafl_exit_reason { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} -impl ::std::fmt::Debug for libafl_exit_reason { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "libafl_exit_reason {{ kind: {:?}, cpu: {:?}, data: {:?} }}", - self.kind, self.cpu, self.data - ) - } -} -unsafe extern "C" { - pub fn libafl_qemu_set_breakpoint(pc: target_ulong) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - pub fn libafl_qemu_remove_breakpoint(pc: target_ulong) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - pub fn libafl_qemu_trigger_breakpoint(cpu: *mut CPUState); -} -unsafe extern "C" { - pub fn libafl_qemu_breakpoint_run(pc_next: vaddr); -} -unsafe extern "C" { - pub fn libafl_last_exit_cpu() -> *mut CPUState; -} -unsafe extern "C" { - pub fn libafl_exit_signal_vm_start(); -} -unsafe extern "C" { - pub fn libafl_exit_asap() -> bool; -} -unsafe extern "C" { - pub fn libafl_sync_exit_cpu(); -} -unsafe extern "C" { - pub fn libafl_exit_request_internal( - cpu: *mut CPUState, - pc: u64, - cause: ShutdownCause, - signal: ::std::os::raw::c_int, - ); -} -unsafe extern "C" { - pub fn libafl_exit_request_breakpoint(cpu: *mut CPUState, pc: target_ulong); -} -unsafe extern "C" { - pub fn libafl_exit_request_custom_insn( - cpu: *mut CPUState, - pc: target_ulong, - kind: libafl_custom_insn_kind, - ); -} -unsafe extern "C" { - pub fn libafl_exit_request_crash(cpu: *mut CPUState); -} -unsafe extern "C" { - pub fn libafl_exit_request_timeout(); -} -unsafe extern "C" { - pub fn libafl_get_exit_reason() -> *mut libafl_exit_reason; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] pub struct libafl_mapinfo { pub start: target_ulong, pub end: target_ulong, @@ -6725,38 +6646,6 @@ unsafe extern "C" { unsafe extern "C" { pub fn libafl_qemu_init(argc: ::std::os::raw::c_int, argv: *mut *mut ::std::os::raw::c_char); } -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct AccelCPUClass { - pub parent_class: ObjectClass, - pub cpu_class_init: ::std::option::Option, - pub cpu_instance_init: ::std::option::Option, - pub cpu_target_realize: ::std::option::Option< - unsafe extern "C" fn(cpu: *mut CPUState, errp: *mut *mut Error) -> bool, - >, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of AccelCPUClass"][::std::mem::size_of::() - 120usize]; - ["Alignment of AccelCPUClass"][::std::mem::align_of::() - 8usize]; - ["Offset of field: AccelCPUClass::parent_class"] - [::std::mem::offset_of!(AccelCPUClass, parent_class) - 0usize]; - ["Offset of field: AccelCPUClass::cpu_class_init"] - [::std::mem::offset_of!(AccelCPUClass, cpu_class_init) - 96usize]; - ["Offset of field: AccelCPUClass::cpu_instance_init"] - [::std::mem::offset_of!(AccelCPUClass, cpu_instance_init) - 104usize]; - ["Offset of field: AccelCPUClass::cpu_target_realize"] - [::std::mem::offset_of!(AccelCPUClass, cpu_target_realize) - 112usize]; -}; -impl Default for AccelCPUClass { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } - } -} pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_R: qemu_plugin_mem_rw = qemu_plugin_mem_rw(1); pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_W: qemu_plugin_mem_rw = qemu_plugin_mem_rw(2); pub const qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_RW: qemu_plugin_mem_rw = qemu_plugin_mem_rw(3); @@ -8104,6 +7993,312 @@ unsafe extern "C" { unsafe extern "C" { pub fn libafl_qemu_gdb_exec() -> bool; } +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct libafl_breakpoint { + pub addr: target_ulong, + pub next: *mut libafl_breakpoint, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_breakpoint"][::std::mem::size_of::() - 16usize]; + ["Alignment of libafl_breakpoint"][::std::mem::align_of::() - 8usize]; + ["Offset of field: libafl_breakpoint::addr"] + [::std::mem::offset_of!(libafl_breakpoint, addr) - 0usize]; + ["Offset of field: libafl_breakpoint::next"] + [::std::mem::offset_of!(libafl_breakpoint, next) - 8usize]; +}; +impl Default for libafl_breakpoint { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +pub const libafl_exit_reason_kind_INTERNAL: libafl_exit_reason_kind = libafl_exit_reason_kind(0); +pub const libafl_exit_reason_kind_BREAKPOINT: libafl_exit_reason_kind = libafl_exit_reason_kind(1); +pub const libafl_exit_reason_kind_CUSTOM_INSN: libafl_exit_reason_kind = libafl_exit_reason_kind(2); +pub const libafl_exit_reason_kind_CRASH: libafl_exit_reason_kind = libafl_exit_reason_kind(3); +pub const libafl_exit_reason_kind_TIMEOUT: libafl_exit_reason_kind = libafl_exit_reason_kind(4); +impl ::std::ops::BitOr for libafl_exit_reason_kind { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + libafl_exit_reason_kind(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for libafl_exit_reason_kind { + #[inline] + fn bitor_assign(&mut self, rhs: libafl_exit_reason_kind) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for libafl_exit_reason_kind { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + libafl_exit_reason_kind(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for libafl_exit_reason_kind { + #[inline] + fn bitand_assign(&mut self, rhs: libafl_exit_reason_kind) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct libafl_exit_reason_kind(pub ::std::os::raw::c_uint); +pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_UNDEFINED: libafl_custom_insn_kind = + libafl_custom_insn_kind(0); +pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_LIBAFL: libafl_custom_insn_kind = + libafl_custom_insn_kind(1); +pub const libafl_custom_insn_kind_LIBAFL_CUSTOM_INSN_NYX: libafl_custom_insn_kind = + libafl_custom_insn_kind(2); +impl ::std::ops::BitOr for libafl_custom_insn_kind { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + libafl_custom_insn_kind(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for libafl_custom_insn_kind { + #[inline] + fn bitor_assign(&mut self, rhs: libafl_custom_insn_kind) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for libafl_custom_insn_kind { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + libafl_custom_insn_kind(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for libafl_custom_insn_kind { + #[inline] + fn bitand_assign(&mut self, rhs: libafl_custom_insn_kind) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct libafl_custom_insn_kind(pub ::std::os::raw::c_uint); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct libafl_exit_reason_internal { + pub cause: ShutdownCause, + pub signal: ::std::os::raw::c_int, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason_internal"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of libafl_exit_reason_internal"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: libafl_exit_reason_internal::cause"] + [::std::mem::offset_of!(libafl_exit_reason_internal, cause) - 0usize]; + ["Offset of field: libafl_exit_reason_internal::signal"] + [::std::mem::offset_of!(libafl_exit_reason_internal, signal) - 4usize]; +}; +impl Default for libafl_exit_reason_internal { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct libafl_exit_reason_breakpoint { + pub addr: target_ulong, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason_breakpoint"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of libafl_exit_reason_breakpoint"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: libafl_exit_reason_breakpoint::addr"] + [::std::mem::offset_of!(libafl_exit_reason_breakpoint, addr) - 0usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct libafl_exit_reason_custom_insn { + pub kind: libafl_custom_insn_kind, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason_custom_insn"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of libafl_exit_reason_custom_insn"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: libafl_exit_reason_custom_insn::kind"] + [::std::mem::offset_of!(libafl_exit_reason_custom_insn, kind) - 0usize]; +}; +impl Default for libafl_exit_reason_custom_insn { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct libafl_exit_reason_crash {} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason_crash"] + [::std::mem::size_of::() - 0usize]; + ["Alignment of libafl_exit_reason_crash"] + [::std::mem::align_of::() - 1usize]; +}; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct libafl_exit_reason_timeout {} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason_timeout"] + [::std::mem::size_of::() - 0usize]; + ["Alignment of libafl_exit_reason_timeout"] + [::std::mem::align_of::() - 1usize]; +}; +#[repr(C)] +#[derive(Copy, Clone)] +pub struct libafl_exit_reason { + pub kind: libafl_exit_reason_kind, + pub cpu: *mut CPUState, + pub next_pc: vaddr, + pub data: libafl_exit_reason__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union libafl_exit_reason__bindgen_ty_1 { + pub internal: libafl_exit_reason_internal, + pub breakpoint: libafl_exit_reason_breakpoint, + pub custom_insn: libafl_exit_reason_custom_insn, + pub crash: libafl_exit_reason_crash, + pub timeout: libafl_exit_reason_timeout, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason__bindgen_ty_1"] + [::std::mem::size_of::() - 8usize]; + ["Alignment of libafl_exit_reason__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: libafl_exit_reason__bindgen_ty_1::internal"] + [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, internal) - 0usize]; + ["Offset of field: libafl_exit_reason__bindgen_ty_1::breakpoint"] + [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, breakpoint) - 0usize]; + ["Offset of field: libafl_exit_reason__bindgen_ty_1::custom_insn"] + [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, custom_insn) - 0usize]; + ["Offset of field: libafl_exit_reason__bindgen_ty_1::crash"] + [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, crash) - 0usize]; + ["Offset of field: libafl_exit_reason__bindgen_ty_1::timeout"] + [::std::mem::offset_of!(libafl_exit_reason__bindgen_ty_1, timeout) - 0usize]; +}; +impl Default for libafl_exit_reason__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for libafl_exit_reason__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "libafl_exit_reason__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_exit_reason"][::std::mem::size_of::() - 32usize]; + ["Alignment of libafl_exit_reason"][::std::mem::align_of::() - 8usize]; + ["Offset of field: libafl_exit_reason::kind"] + [::std::mem::offset_of!(libafl_exit_reason, kind) - 0usize]; + ["Offset of field: libafl_exit_reason::cpu"] + [::std::mem::offset_of!(libafl_exit_reason, cpu) - 8usize]; + ["Offset of field: libafl_exit_reason::next_pc"] + [::std::mem::offset_of!(libafl_exit_reason, next_pc) - 16usize]; + ["Offset of field: libafl_exit_reason::data"] + [::std::mem::offset_of!(libafl_exit_reason, data) - 24usize]; +}; +impl Default for libafl_exit_reason { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl ::std::fmt::Debug for libafl_exit_reason { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "libafl_exit_reason {{ kind: {:?}, cpu: {:?}, data: {:?} }}", + self.kind, self.cpu, self.data + ) + } +} +unsafe extern "C" { + pub fn libafl_qemu_set_breakpoint(pc: target_ulong) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_remove_breakpoint(pc: target_ulong) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_trigger_breakpoint(cpu: *mut CPUState); +} +unsafe extern "C" { + pub fn libafl_qemu_breakpoint_run(pc_next: vaddr); +} +unsafe extern "C" { + pub fn libafl_last_exit_cpu() -> *mut CPUState; +} +unsafe extern "C" { + pub fn libafl_exit_signal_vm_start(); +} +unsafe extern "C" { + pub fn libafl_exit_asap() -> bool; +} +unsafe extern "C" { + pub fn libafl_sync_exit_cpu(); +} +unsafe extern "C" { + pub fn libafl_exit_request_internal( + cpu: *mut CPUState, + pc: u64, + cause: ShutdownCause, + signal: ::std::os::raw::c_int, + ); +} +unsafe extern "C" { + pub fn libafl_exit_request_breakpoint(cpu: *mut CPUState, pc: target_ulong); +} +unsafe extern "C" { + pub fn libafl_exit_request_custom_insn( + cpu: *mut CPUState, + pc: target_ulong, + kind: libafl_custom_insn_kind, + ); +} +unsafe extern "C" { + pub fn libafl_exit_request_crash(cpu: *mut CPUState); +} +unsafe extern "C" { + pub fn libafl_exit_request_timeout(); +} +unsafe extern "C" { + pub fn libafl_get_exit_reason() -> *mut libafl_exit_reason; +} unsafe extern "C" { pub fn libafl_jit_trace_edge_hitcount(data: u64, id: u64) -> usize; } diff --git a/libafl_qemu/runtime/libafl_qemu_stub_bindings.rs b/libafl_qemu/runtime/libafl_qemu_stub_bindings.rs index 9c58756db0..1fcb3b2595 100644 --- a/libafl_qemu/runtime/libafl_qemu_stub_bindings.rs +++ b/libafl_qemu/runtime/libafl_qemu_stub_bindings.rs @@ -1,5 +1,5 @@ -/* 1.87.0-nightly */ -/* qemu git hash: 97bef506eed24ee8d0eda4a07c4419c55dae4acb */ +/* 1.88.0-nightly */ +/* qemu git hash: 93663809156a33475ade972cdd5b1301b9310687 */ /* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] @@ -661,17 +661,19 @@ impl Default for _IO_FILE { impl _IO_FILE { #[inline] pub fn _flags2(&self) -> ::std::os::raw::c_int { - u32::cast_signed(self._bitfield_1.get(0usize, 24u8) as u32) + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) } } #[inline] pub fn set__flags2(&mut self, val: ::std::os::raw::c_int) { - let val: u32 = i32::cast_unsigned(val); - self._bitfield_1.set(0usize, 24u8, val as u64) + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 24u8, val as u64) + } } #[inline] pub unsafe fn _flags2_raw(this: *const Self) -> ::std::os::raw::c_int { unsafe { - u32::cast_signed(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 3usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), 0usize, 24u8, @@ -681,7 +683,7 @@ impl _IO_FILE { #[inline] pub unsafe fn set__flags2_raw(this: *mut Self, val: ::std::os::raw::c_int) { unsafe { - let val: u32 = i32::cast_unsigned(val); + let val: u32 = ::std::mem::transmute(val); <__BindgenBitfieldUnit<[u8; 3usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), 0usize, @@ -694,7 +696,7 @@ impl _IO_FILE { pub fn new_bitfield_1(_flags2: ::std::os::raw::c_int) -> __BindgenBitfieldUnit<[u8; 3usize]> { let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default(); __bindgen_bitfield_unit.set(0usize, 24u8, { - let _flags2: u32 = i32::cast_unsigned(_flags2); + let _flags2: u32 = unsafe { ::std::mem::transmute(_flags2) }; _flags2 as u64 }); __bindgen_bitfield_unit diff --git a/libafl_qemu/runtime/nyx_stub_bindings.rs b/libafl_qemu/runtime/nyx_stub_bindings.rs index 8d38d38894..76099c0409 100644 --- a/libafl_qemu/runtime/nyx_stub_bindings.rs +++ b/libafl_qemu/runtime/nyx_stub_bindings.rs @@ -1,5 +1,5 @@ -/* 1.87.0-nightly */ -/* qemu git hash: 97bef506eed24ee8d0eda4a07c4419c55dae4acb */ +/* 1.88.0-nightly */ +/* qemu git hash: 93663809156a33475ade972cdd5b1301b9310687 */ /* automatically generated by rust-bindgen 0.71.1 */ #[repr(C)] diff --git a/libafl_qemu/src/command/mod.rs b/libafl_qemu/src/command/mod.rs index 341c652241..b37fa403a3 100644 --- a/libafl_qemu/src/command/mod.rs +++ b/libafl_qemu/src/command/mod.rs @@ -44,6 +44,7 @@ mod bindings { #![expect(clippy::all)] #![expect(clippy::pedantic)] #![allow(unsafe_op_in_unsafe_fn)] + #![allow(unnecessary_transmutes)] include!(concat!(env!("OUT_DIR"), "/libafl_qemu_bindings.rs")); } diff --git a/libafl_qemu/src/command/nyx.rs b/libafl_qemu/src/command/nyx.rs index e854c811af..3ab32e68b9 100644 --- a/libafl_qemu/src/command/nyx.rs +++ b/libafl_qemu/src/command/nyx.rs @@ -49,6 +49,7 @@ pub(crate) mod bindings { #![allow(unused_variables)] #![expect(clippy::all)] #![expect(clippy::pedantic)] + #![allow(unnecessary_transmutes)] include!(concat!(env!("OUT_DIR"), "/nyx_bindings.rs")); } diff --git a/libafl_qemu/src/command/parser/mod.rs b/libafl_qemu/src/command/parser/mod.rs index 182306399d..48fdcfcf14 100644 --- a/libafl_qemu/src/command/parser/mod.rs +++ b/libafl_qemu/src/command/parser/mod.rs @@ -77,7 +77,8 @@ where qemu: Qemu, arch_regs_map: &'static EnumMap, ) -> Result { - let input_virt_addr: GuestVirtAddr = qemu.read_reg(arch_regs_map[ExitArgs::Arg1])?.into(); + let input_virt_addr: GuestVirtAddr = + qemu.read_reg(arch_regs_map[ExitArgs::Arg1])? as GuestVirtAddr; let max_input_size: GuestReg = qemu.read_reg(arch_regs_map[ExitArgs::Arg2])?; Ok(InputCommand::new( @@ -134,7 +135,8 @@ where qemu: Qemu, arch_regs_map: &'static EnumMap, ) -> Result { - let input_virt_addr: GuestVirtAddr = qemu.read_reg(arch_regs_map[ExitArgs::Arg1])?.into(); + let input_virt_addr: GuestVirtAddr = + qemu.read_reg(arch_regs_map[ExitArgs::Arg1])? as GuestVirtAddr; let max_input_size: GuestReg = qemu.read_reg(arch_regs_map[ExitArgs::Arg2])?; Ok(StartCommand::new(QemuMemoryChunk::virt( diff --git a/libafl_qemu/src/command/parser/nyx.rs b/libafl_qemu/src/command/parser/nyx.rs index b6ff91cb14..3cd9cf2813 100644 --- a/libafl_qemu/src/command/parser/nyx.rs +++ b/libafl_qemu/src/command/parser/nyx.rs @@ -6,7 +6,7 @@ use libafl_qemu_sys::GuestVirtAddr; use libc::c_uint; use crate::{ - IsSnapshotManager, NyxEmulatorDriver, Qemu, QemuMemoryChunk, Regs, + GuestReg, IsSnapshotManager, NyxEmulatorDriver, Qemu, QemuMemoryChunk, Regs, command::{ CommandError, NativeExitKind, nyx::{ @@ -26,7 +26,7 @@ fn get_guest_string(qemu: Qemu, string_ptr_reg: Regs) -> Result()).unwrap(), + GuestReg::try_from(size_of::()).unwrap(), qemu.current_cpu().unwrap(), ))) } @@ -270,7 +270,7 @@ where // # Safety // We use the C struct directly to get the agent config let agent_config: bindings::agent_config_t = - unsafe { qemu.read_mem_val(agent_config_addr)? }; + unsafe { qemu.read_mem_val(agent_config_addr as u64)? }; Ok(SetAgentConfigCommand::new(agent_config)) } diff --git a/libafl_qemu/src/qemu/mod.rs b/libafl_qemu/src/qemu/mod.rs index fd6297b98e..24c5ddf5e2 100644 --- a/libafl_qemu/src/qemu/mod.rs +++ b/libafl_qemu/src/qemu/mod.rs @@ -916,7 +916,7 @@ impl Qemu { #[cfg(feature = "systemmode")] pub fn set_hw_breakpoint(&self, addr: GuestAddr) -> Result<(), Error> { - let ret = unsafe { libafl_qemu_set_hw_breakpoint(addr.into()) }; + let ret = unsafe { libafl_qemu_set_hw_breakpoint(addr as GuestVirtAddr) }; match ret { 0 => Ok(()), errno => Err(Error::unsupported(format!( @@ -927,7 +927,7 @@ impl Qemu { #[cfg(feature = "systemmode")] pub fn remove_hw_breakpoint(&self, addr: GuestAddr) -> Result<(), Error> { - let ret = unsafe { libafl_qemu_remove_hw_breakpoint(addr.into()) }; + let ret = unsafe { libafl_qemu_remove_hw_breakpoint(addr as GuestVirtAddr) }; match ret { 0 => Ok(()), errno => Err(Error::unsupported(format!( diff --git a/libafl_qemu/src/qemu/systemmode.rs b/libafl_qemu/src/qemu/systemmode.rs index a6d99aeb28..4d890deeed 100644 --- a/libafl_qemu/src/qemu/systemmode.rs +++ b/libafl_qemu/src/qemu/systemmode.rs @@ -97,7 +97,7 @@ impl CPU { attrs.as_mut_ptr(), ); let mask = Qemu::get_unchecked().target_page_mask(); - let offset = vaddr & (mask as GuestVirtAddr); + let offset = (vaddr & (mask as GuestVirtAddr)) as GuestPhysAddr; #[expect(clippy::cast_sign_loss)] if paddr == (-1i64 as GuestPhysAddr) { None @@ -123,7 +123,7 @@ impl CPU { libafl_qemu_sys::qemu_plugin_mem_rw_QEMU_PLUGIN_MEM_R }, ); - let phwaddr = libafl_qemu_sys::qemu_plugin_get_hwaddr(pminfo, vaddr as GuestVirtAddr); + let phwaddr = libafl_qemu_sys::qemu_plugin_get_hwaddr(pminfo, vaddr as u64); if phwaddr.is_null() { None } else { @@ -438,7 +438,7 @@ impl Iterator for PhysMemoryIter { ); self.remaining_len -= size_taken; - *vaddr += size_taken as GuestPhysAddr; + *vaddr += size_taken as GuestVirtAddr; // Now self.addr is host-page aligned while self.remaining_len > 0 { @@ -458,7 +458,7 @@ impl Iterator for PhysMemoryIter { size_taken += std::cmp::min(self.remaining_len, phys_page_size); self.remaining_len -= size_taken; - *vaddr += size_taken as GuestPhysAddr; + *vaddr += size_taken as GuestVirtAddr; } // We finished to explore the memory, return the last slice.