From 8099ddeb8d45c2e5c62e5dccafd779cb62a0dbc3 Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Tue, 29 Apr 2025 14:31:09 +0200 Subject: [PATCH 1/8] update qemu hash --- libafl_qemu/libafl_qemu_build/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index 0f85b6dc9f..066047d091 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 = "93663809156a33475ade972cdd5b1301b9310687"; pub struct BuildResult { pub qemu_path: PathBuf, From d49b904e4bdf29f9e8126fa7a46dbb07281c90ff Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Tue, 29 Apr 2025 19:53:03 +0200 Subject: [PATCH 2/8] clippy, fmt --- libafl_qemu/libafl_qemu_build/src/bindings.rs | 2 - .../libafl_qemu_sys/src/bindings/mod.rs | 1 + .../src/bindings/x86_64_stub_bindings.rs | 7039 +++++++++-------- .../runtime/libafl_qemu_stub_bindings.rs | 18 +- libafl_qemu/runtime/nyx_stub_bindings.rs | 4 +- libafl_qemu/src/command/mod.rs | 1 + libafl_qemu/src/command/parser/mod.rs | 6 +- 7 files changed, 3635 insertions(+), 3436 deletions(-) diff --git a/libafl_qemu/libafl_qemu_build/src/bindings.rs b/libafl_qemu/libafl_qemu_build/src/bindings.rs index a1b578841c..aa6e83dbf3 100644 --- a/libafl_qemu/libafl_qemu_build/src/bindings.rs +++ b/libafl_qemu/libafl_qemu_build/src/bindings.rs @@ -67,11 +67,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" 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,307 +1232,219 @@ 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]>, +#[derive(Debug, Copy, Clone)] +pub struct Notifier { + pub notify: ::std::option::Option< + unsafe extern "C" fn(notifier: *mut Notifier, data: *mut ::std::os::raw::c_void), + >, + pub node: Notifier__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct Notifier__bindgen_ty_1 { + pub le_next: *mut Notifier, + pub le_prev: *mut *mut Notifier, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of MemTxAttrs"][::std::mem::size_of::() - 4usize]; - ["Alignment of MemTxAttrs"][::std::mem::align_of::() - 4usize]; + ["Size of Notifier__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Alignment of Notifier__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: Notifier__bindgen_ty_1::le_next"] + [::std::mem::offset_of!(Notifier__bindgen_ty_1, le_next) - 0usize]; + ["Offset of field: Notifier__bindgen_ty_1::le_prev"] + [::std::mem::offset_of!(Notifier__bindgen_ty_1, le_prev) - 8usize]; }; -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) { +impl Default for Notifier__bindgen_ty_1 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); 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, - ) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[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) { +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of Notifier"][::std::mem::size_of::() - 24usize]; + ["Alignment of Notifier"][::std::mem::align_of::() - 8usize]; + ["Offset of field: Notifier::notify"][::std::mem::offset_of!(Notifier, notify) - 0usize]; + ["Offset of field: Notifier::node"][::std::mem::offset_of!(Notifier, node) - 8usize]; +}; +impl Default for Notifier { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(1usize, 1u8, val as u64) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[inline] - pub unsafe fn secure_raw(this: *const Self) -> ::std::os::raw::c_uint { +} +pub type RCUCBFunc = ::std::option::Option; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct rcu_head { + pub next: *mut rcu_head, + pub func: RCUCBFunc, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of rcu_head"][::std::mem::size_of::() - 16usize]; + ["Alignment of rcu_head"][::std::mem::align_of::() - 8usize]; + ["Offset of field: rcu_head::next"][::std::mem::offset_of!(rcu_head, next) - 0usize]; + ["Offset of field: rcu_head::func"][::std::mem::offset_of!(rcu_head, func) - 8usize]; +}; +impl Default for rcu_head { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 1usize, - 1u8, - ) as u32) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[inline] - pub unsafe fn set_secure_raw(this: *mut Self, val: ::std::os::raw::c_uint) { +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TypeImpl { + _unused: [u8; 0], +} +pub type Type = *mut TypeImpl; +#[doc = " typedef ObjectPropertyAccessor:\n @obj: the object that owns the property\n @v: the visitor that contains the property data\n @name: the name of the property\n @opaque: the object property opaque\n @errp: a pointer to an Error that is filled if getting/setting fails.\n\n Called when trying to get/set a property."] +pub type ObjectPropertyAccessor = ::std::option::Option< + unsafe extern "C" fn( + obj: *mut Object, + v: *mut Visitor, + name: *const ::std::os::raw::c_char, + opaque: *mut ::std::os::raw::c_void, + errp: *mut *mut Error, + ), +>; +#[doc = " typedef ObjectPropertyResolve:\n @obj: the object that owns the property\n @opaque: the opaque registered with the property\n @part: the name of the property\n\n Resolves the #Object corresponding to property @part.\n\n The returned object can also be used as a starting point\n to resolve a relative path starting with \"@part\".\n\n Returns: If @path is the path that led to @obj, the function\n returns the #Object corresponding to \"@path/@part\".\n If \"@path/@part\" is not a valid object path, it returns #NULL."] +pub type ObjectPropertyResolve = ::std::option::Option< + unsafe extern "C" fn( + obj: *mut Object, + opaque: *mut ::std::os::raw::c_void, + part: *const ::std::os::raw::c_char, + ) -> *mut Object, +>; +#[doc = " typedef ObjectPropertyRelease:\n @obj: the object that owns the property\n @name: the name of the property\n @opaque: the opaque registered with the property\n\n Called when a property is removed from a object."] +pub type ObjectPropertyRelease = ::std::option::Option< + unsafe extern "C" fn( + obj: *mut Object, + name: *const ::std::os::raw::c_char, + opaque: *mut ::std::os::raw::c_void, + ), +>; +#[doc = " typedef ObjectPropertyInit:\n @obj: the object that owns the property\n @prop: the property to set\n\n Called when a property is initialized."] +pub type ObjectPropertyInit = + ::std::option::Option; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ObjectProperty { + pub name: *mut ::std::os::raw::c_char, + pub type_: *mut ::std::os::raw::c_char, + pub description: *mut ::std::os::raw::c_char, + pub get: ObjectPropertyAccessor, + pub set: ObjectPropertyAccessor, + pub resolve: ObjectPropertyResolve, + pub release: ObjectPropertyRelease, + pub init: ObjectPropertyInit, + pub opaque: *mut ::std::os::raw::c_void, + pub defval: *mut QObject, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ObjectProperty"][::std::mem::size_of::() - 80usize]; + ["Alignment of ObjectProperty"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ObjectProperty::name"] + [::std::mem::offset_of!(ObjectProperty, name) - 0usize]; + ["Offset of field: ObjectProperty::type_"] + [::std::mem::offset_of!(ObjectProperty, type_) - 8usize]; + ["Offset of field: ObjectProperty::description"] + [::std::mem::offset_of!(ObjectProperty, description) - 16usize]; + ["Offset of field: ObjectProperty::get"][::std::mem::offset_of!(ObjectProperty, get) - 24usize]; + ["Offset of field: ObjectProperty::set"][::std::mem::offset_of!(ObjectProperty, set) - 32usize]; + ["Offset of field: ObjectProperty::resolve"] + [::std::mem::offset_of!(ObjectProperty, resolve) - 40usize]; + ["Offset of field: ObjectProperty::release"] + [::std::mem::offset_of!(ObjectProperty, release) - 48usize]; + ["Offset of field: ObjectProperty::init"] + [::std::mem::offset_of!(ObjectProperty, init) - 56usize]; + ["Offset of field: ObjectProperty::opaque"] + [::std::mem::offset_of!(ObjectProperty, opaque) - 64usize]; + ["Offset of field: ObjectProperty::defval"] + [::std::mem::offset_of!(ObjectProperty, defval) - 72usize]; +}; +impl Default for ObjectProperty { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); 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, - ) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[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) { +} +#[doc = " typedef ObjectUnparent:\n @obj: the object that is being removed from the composition tree\n\n Called when an object is being removed from the QOM composition tree.\n The function should remove any backlinks from children objects to @obj."] +pub type ObjectUnparent = ::std::option::Option; +#[doc = " typedef ObjectFree:\n @obj: the object being freed\n\n Called when an object's last reference is removed."] +pub type ObjectFree = ::std::option::Option; +#[doc = " struct ObjectClass:\n\n The base for all classes. The only thing that #ObjectClass contains is an\n integer type handle."] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct ObjectClass { + pub type_: Type, + pub interfaces: *mut GSList, + pub object_cast_cache: [*const ::std::os::raw::c_char; 4usize], + pub class_cast_cache: [*const ::std::os::raw::c_char; 4usize], + pub unparent: ObjectUnparent, + pub properties: *mut GHashTable, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of ObjectClass"][::std::mem::size_of::() - 96usize]; + ["Alignment of ObjectClass"][::std::mem::align_of::() - 8usize]; + ["Offset of field: ObjectClass::type_"][::std::mem::offset_of!(ObjectClass, type_) - 0usize]; + ["Offset of field: ObjectClass::interfaces"] + [::std::mem::offset_of!(ObjectClass, interfaces) - 8usize]; + ["Offset of field: ObjectClass::object_cast_cache"] + [::std::mem::offset_of!(ObjectClass, object_cast_cache) - 16usize]; + ["Offset of field: ObjectClass::class_cast_cache"] + [::std::mem::offset_of!(ObjectClass, class_cast_cache) - 48usize]; + ["Offset of field: ObjectClass::unparent"] + [::std::mem::offset_of!(ObjectClass, unparent) - 80usize]; + ["Offset of field: ObjectClass::properties"] + [::std::mem::offset_of!(ObjectClass, properties) - 88usize]; +}; +impl Default for ObjectClass { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); 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, - ) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[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 - } } +#[doc = " struct Object:\n\n The base for all objects. The first member of this object is a pointer to\n a #ObjectClass. Since C guarantees that the first member of a structure\n always begins at byte 0 of that structure, as long as any sub-object places\n its parent as the first member, we can cast directly to a #Object.\n\n As a result, #Object contains a reference to the objects type as its\n first member. This allows identification of the real type of the object at\n run time."] #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct QTailQLink { - pub tql_next: *mut ::std::os::raw::c_void, - pub tql_prev: *mut QTailQLink, +pub struct Object { + pub class: *mut ObjectClass, + pub free: ObjectFree, + pub properties: *mut GHashTable, + pub ref_: u32, + pub parent: *mut Object, } #[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]; + ["Size of Object"][::std::mem::size_of::() - 40usize]; + ["Alignment of Object"][::std::mem::align_of::() - 8usize]; + ["Offset of field: Object::class"][::std::mem::offset_of!(Object, class) - 0usize]; + ["Offset of field: Object::free"][::std::mem::offset_of!(Object, free) - 8usize]; + ["Offset of field: Object::properties"][::std::mem::offset_of!(Object, properties) - 16usize]; + ["Offset of field: Object::ref_"][::std::mem::offset_of!(Object, ref_) - 24usize]; + ["Offset of field: Object::parent"][::std::mem::offset_of!(Object, parent) - 32usize]; }; -impl Default for QTailQLink { +impl Default for Object { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -1476,230 +1455,8 @@ impl Default for QTailQLink { } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct Notifier { - pub notify: ::std::option::Option< - unsafe extern "C" fn(notifier: *mut Notifier, data: *mut ::std::os::raw::c_void), - >, - pub node: Notifier__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Notifier__bindgen_ty_1 { - pub le_next: *mut Notifier, - pub le_prev: *mut *mut Notifier, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of Notifier__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; - ["Alignment of Notifier__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: Notifier__bindgen_ty_1::le_next"] - [::std::mem::offset_of!(Notifier__bindgen_ty_1, le_next) - 0usize]; - ["Offset of field: Notifier__bindgen_ty_1::le_prev"] - [::std::mem::offset_of!(Notifier__bindgen_ty_1, le_prev) - 8usize]; -}; -impl Default for Notifier__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() - } - } -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of Notifier"][::std::mem::size_of::() - 24usize]; - ["Alignment of Notifier"][::std::mem::align_of::() - 8usize]; - ["Offset of field: Notifier::notify"][::std::mem::offset_of!(Notifier, notify) - 0usize]; - ["Offset of field: Notifier::node"][::std::mem::offset_of!(Notifier, node) - 8usize]; -}; -impl Default for Notifier { - 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 RCUCBFunc = ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct rcu_head { - pub next: *mut rcu_head, - pub func: RCUCBFunc, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of rcu_head"][::std::mem::size_of::() - 16usize]; - ["Alignment of rcu_head"][::std::mem::align_of::() - 8usize]; - ["Offset of field: rcu_head::next"][::std::mem::offset_of!(rcu_head, next) - 0usize]; - ["Offset of field: rcu_head::func"][::std::mem::offset_of!(rcu_head, func) - 8usize]; -}; -impl Default for rcu_head { - 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 TypeImpl { - _unused: [u8; 0], -} -pub type Type = *mut TypeImpl; -#[doc = " typedef ObjectPropertyAccessor:\n @obj: the object that owns the property\n @v: the visitor that contains the property data\n @name: the name of the property\n @opaque: the object property opaque\n @errp: a pointer to an Error that is filled if getting/setting fails.\n\n Called when trying to get/set a property."] -pub type ObjectPropertyAccessor = ::std::option::Option< - unsafe extern "C" fn( - obj: *mut Object, - v: *mut Visitor, - name: *const ::std::os::raw::c_char, - opaque: *mut ::std::os::raw::c_void, - errp: *mut *mut Error, - ), ->; -#[doc = " typedef ObjectPropertyResolve:\n @obj: the object that owns the property\n @opaque: the opaque registered with the property\n @part: the name of the property\n\n Resolves the #Object corresponding to property @part.\n\n The returned object can also be used as a starting point\n to resolve a relative path starting with \"@part\".\n\n Returns: If @path is the path that led to @obj, the function\n returns the #Object corresponding to \"@path/@part\".\n If \"@path/@part\" is not a valid object path, it returns #NULL."] -pub type ObjectPropertyResolve = ::std::option::Option< - unsafe extern "C" fn( - obj: *mut Object, - opaque: *mut ::std::os::raw::c_void, - part: *const ::std::os::raw::c_char, - ) -> *mut Object, ->; -#[doc = " typedef ObjectPropertyRelease:\n @obj: the object that owns the property\n @name: the name of the property\n @opaque: the opaque registered with the property\n\n Called when a property is removed from a object."] -pub type ObjectPropertyRelease = ::std::option::Option< - unsafe extern "C" fn( - obj: *mut Object, - name: *const ::std::os::raw::c_char, - opaque: *mut ::std::os::raw::c_void, - ), ->; -#[doc = " typedef ObjectPropertyInit:\n @obj: the object that owns the property\n @prop: the property to set\n\n Called when a property is initialized."] -pub type ObjectPropertyInit = - ::std::option::Option; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ObjectProperty { - pub name: *mut ::std::os::raw::c_char, - pub type_: *mut ::std::os::raw::c_char, - pub description: *mut ::std::os::raw::c_char, - pub get: ObjectPropertyAccessor, - pub set: ObjectPropertyAccessor, - pub resolve: ObjectPropertyResolve, - pub release: ObjectPropertyRelease, - pub init: ObjectPropertyInit, - pub opaque: *mut ::std::os::raw::c_void, - pub defval: *mut QObject, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ObjectProperty"][::std::mem::size_of::() - 80usize]; - ["Alignment of ObjectProperty"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ObjectProperty::name"] - [::std::mem::offset_of!(ObjectProperty, name) - 0usize]; - ["Offset of field: ObjectProperty::type_"] - [::std::mem::offset_of!(ObjectProperty, type_) - 8usize]; - ["Offset of field: ObjectProperty::description"] - [::std::mem::offset_of!(ObjectProperty, description) - 16usize]; - ["Offset of field: ObjectProperty::get"][::std::mem::offset_of!(ObjectProperty, get) - 24usize]; - ["Offset of field: ObjectProperty::set"][::std::mem::offset_of!(ObjectProperty, set) - 32usize]; - ["Offset of field: ObjectProperty::resolve"] - [::std::mem::offset_of!(ObjectProperty, resolve) - 40usize]; - ["Offset of field: ObjectProperty::release"] - [::std::mem::offset_of!(ObjectProperty, release) - 48usize]; - ["Offset of field: ObjectProperty::init"] - [::std::mem::offset_of!(ObjectProperty, init) - 56usize]; - ["Offset of field: ObjectProperty::opaque"] - [::std::mem::offset_of!(ObjectProperty, opaque) - 64usize]; - ["Offset of field: ObjectProperty::defval"] - [::std::mem::offset_of!(ObjectProperty, defval) - 72usize]; -}; -impl Default for ObjectProperty { - 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 = " typedef ObjectUnparent:\n @obj: the object that is being removed from the composition tree\n\n Called when an object is being removed from the QOM composition tree.\n The function should remove any backlinks from children objects to @obj."] -pub type ObjectUnparent = ::std::option::Option; -#[doc = " typedef ObjectFree:\n @obj: the object being freed\n\n Called when an object's last reference is removed."] -pub type ObjectFree = ::std::option::Option; -#[doc = " struct ObjectClass:\n\n The base for all classes. The only thing that #ObjectClass contains is an\n integer type handle."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct ObjectClass { - pub type_: Type, - pub interfaces: *mut GSList, - pub object_cast_cache: [*const ::std::os::raw::c_char; 4usize], - pub class_cast_cache: [*const ::std::os::raw::c_char; 4usize], - pub unparent: ObjectUnparent, - pub properties: *mut GHashTable, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ObjectClass"][::std::mem::size_of::() - 96usize]; - ["Alignment of ObjectClass"][::std::mem::align_of::() - 8usize]; - ["Offset of field: ObjectClass::type_"][::std::mem::offset_of!(ObjectClass, type_) - 0usize]; - ["Offset of field: ObjectClass::interfaces"] - [::std::mem::offset_of!(ObjectClass, interfaces) - 8usize]; - ["Offset of field: ObjectClass::object_cast_cache"] - [::std::mem::offset_of!(ObjectClass, object_cast_cache) - 16usize]; - ["Offset of field: ObjectClass::class_cast_cache"] - [::std::mem::offset_of!(ObjectClass, class_cast_cache) - 48usize]; - ["Offset of field: ObjectClass::unparent"] - [::std::mem::offset_of!(ObjectClass, unparent) - 80usize]; - ["Offset of field: ObjectClass::properties"] - [::std::mem::offset_of!(ObjectClass, properties) - 88usize]; -}; -impl Default for ObjectClass { - 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 = " struct Object:\n\n The base for all objects. The first member of this object is a pointer to\n a #ObjectClass. Since C guarantees that the first member of a structure\n always begins at byte 0 of that structure, as long as any sub-object places\n its parent as the first member, we can cast directly to a #Object.\n\n As a result, #Object contains a reference to the objects type as its\n first member. This allows identification of the real type of the object at\n run time."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct Object { - pub class: *mut ObjectClass, - pub free: ObjectFree, - pub properties: *mut GHashTable, - pub ref_: u32, - pub parent: *mut Object, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of Object"][::std::mem::size_of::() - 40usize]; - ["Alignment of Object"][::std::mem::align_of::() - 8usize]; - ["Offset of field: Object::class"][::std::mem::offset_of!(Object, class) - 0usize]; - ["Offset of field: Object::free"][::std::mem::offset_of!(Object, free) - 8usize]; - ["Offset of field: Object::properties"][::std::mem::offset_of!(Object, properties) - 16usize]; - ["Offset of field: Object::ref_"][::std::mem::offset_of!(Object, ref_) - 24usize]; - ["Offset of field: Object::parent"][::std::mem::offset_of!(Object, parent) - 32usize]; -}; -impl Default for Object { - 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 HotplugHandler { - _unused: [u8; 0], +pub struct HotplugHandler { + _unused: [u8; 0], } #[doc = " ResettableState:\n Structure holding reset related state. The fields should not be accessed\n directly; the definition is here to allow further inclusion into other\n objects.\n\n @count: Number of reset level the object is into. It is incremented when\n the reset operation starts and decremented when it finishes.\n @hold_phase_pending: flag which indicates that we need to invoke the 'hold'\n phase handler for this object.\n @exit_phase_in_progress: true if we are currently in the exit phase"] #[repr(C)] @@ -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,43 +2011,191 @@ impl ::std::fmt::Debug for BusState { ) } } -pub type PTR = *mut ::std::os::raw::c_void; -pub type bfd_vma = u64; -pub type bfd_byte = u8; -pub const bfd_flavour_bfd_target_unknown_flavour: bfd_flavour = bfd_flavour(0); -pub const bfd_flavour_bfd_target_aout_flavour: bfd_flavour = bfd_flavour(1); -pub const bfd_flavour_bfd_target_coff_flavour: bfd_flavour = bfd_flavour(2); -pub const bfd_flavour_bfd_target_ecoff_flavour: bfd_flavour = bfd_flavour(3); -pub const bfd_flavour_bfd_target_elf_flavour: bfd_flavour = bfd_flavour(4); -pub const bfd_flavour_bfd_target_ieee_flavour: bfd_flavour = bfd_flavour(5); -pub const bfd_flavour_bfd_target_nlm_flavour: bfd_flavour = bfd_flavour(6); -pub const bfd_flavour_bfd_target_oasys_flavour: bfd_flavour = bfd_flavour(7); -pub const bfd_flavour_bfd_target_tekhex_flavour: bfd_flavour = bfd_flavour(8); -pub const bfd_flavour_bfd_target_srec_flavour: bfd_flavour = bfd_flavour(9); -pub const bfd_flavour_bfd_target_ihex_flavour: bfd_flavour = bfd_flavour(10); -pub const bfd_flavour_bfd_target_som_flavour: bfd_flavour = bfd_flavour(11); -pub const bfd_flavour_bfd_target_os9k_flavour: bfd_flavour = bfd_flavour(12); -pub const bfd_flavour_bfd_target_versados_flavour: bfd_flavour = bfd_flavour(13); -pub const bfd_flavour_bfd_target_msdos_flavour: bfd_flavour = bfd_flavour(14); -pub const bfd_flavour_bfd_target_evax_flavour: bfd_flavour = bfd_flavour(15); -impl ::std::ops::BitOr for bfd_flavour { - type Output = Self; - #[inline] - fn bitor(self, other: Self) -> Self { - bfd_flavour(self.0 | other.0) - } -} -impl ::std::ops::BitOrAssign for bfd_flavour { - #[inline] - fn bitor_assign(&mut self, rhs: bfd_flavour) { - self.0 |= rhs.0; - } -} -impl ::std::ops::BitAnd for bfd_flavour { - type Output = Self; - #[inline] - fn bitand(self, other: Self) -> Self { - bfd_flavour(self.0 & other.0) +#[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; +pub const bfd_flavour_bfd_target_unknown_flavour: bfd_flavour = bfd_flavour(0); +pub const bfd_flavour_bfd_target_aout_flavour: bfd_flavour = bfd_flavour(1); +pub const bfd_flavour_bfd_target_coff_flavour: bfd_flavour = bfd_flavour(2); +pub const bfd_flavour_bfd_target_ecoff_flavour: bfd_flavour = bfd_flavour(3); +pub const bfd_flavour_bfd_target_elf_flavour: bfd_flavour = bfd_flavour(4); +pub const bfd_flavour_bfd_target_ieee_flavour: bfd_flavour = bfd_flavour(5); +pub const bfd_flavour_bfd_target_nlm_flavour: bfd_flavour = bfd_flavour(6); +pub const bfd_flavour_bfd_target_oasys_flavour: bfd_flavour = bfd_flavour(7); +pub const bfd_flavour_bfd_target_tekhex_flavour: bfd_flavour = bfd_flavour(8); +pub const bfd_flavour_bfd_target_srec_flavour: bfd_flavour = bfd_flavour(9); +pub const bfd_flavour_bfd_target_ihex_flavour: bfd_flavour = bfd_flavour(10); +pub const bfd_flavour_bfd_target_som_flavour: bfd_flavour = bfd_flavour(11); +pub const bfd_flavour_bfd_target_os9k_flavour: bfd_flavour = bfd_flavour(12); +pub const bfd_flavour_bfd_target_versados_flavour: bfd_flavour = bfd_flavour(13); +pub const bfd_flavour_bfd_target_msdos_flavour: bfd_flavour = bfd_flavour(14); +pub const bfd_flavour_bfd_target_evax_flavour: bfd_flavour = bfd_flavour(15); +impl ::std::ops::BitOr for bfd_flavour { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + bfd_flavour(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for bfd_flavour { + #[inline] + fn bitor_assign(&mut self, rhs: bfd_flavour) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for bfd_flavour { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + bfd_flavour(self.0 & other.0) } } impl ::std::ops::BitAndAssign for bfd_flavour { @@ -2655,450 +2560,328 @@ impl Default for disassemble_info { } } } -#[doc = " vaddr:\n Type wide enough to contain any #target_ulong virtual address."] -pub type vaddr = u64; -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CPUBreakpoint { - pub pc: vaddr, - pub flags: ::std::os::raw::c_int, - pub entry: CPUBreakpoint__bindgen_ty_1, -} +#[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)] -#[derive(Copy, Clone)] -pub union CPUBreakpoint__bindgen_ty_1 { - pub tqe_next: *mut CPUBreakpoint, - pub tqe_circ: QTailQLink, +#[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 CPUBreakpoint__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; - ["Alignment of CPUBreakpoint__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_next"] - [::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_next) - 0usize]; - ["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_circ"] - [::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_circ) - 0usize]; + ["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 Default for CPUBreakpoint__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); +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 { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 1u8, val as u64) } } -} -impl ::std::fmt::Debug for CPUBreakpoint__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUBreakpoint__bindgen_ty_1 {{ union }}") + #[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) + } } -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUBreakpoint"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUBreakpoint"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUBreakpoint::pc"][::std::mem::offset_of!(CPUBreakpoint, pc) - 0usize]; - ["Offset of field: CPUBreakpoint::flags"] - [::std::mem::offset_of!(CPUBreakpoint, flags) - 8usize]; - ["Offset of field: CPUBreakpoint::entry"] - [::std::mem::offset_of!(CPUBreakpoint, entry) - 16usize]; -}; -impl Default for CPUBreakpoint { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + #[inline] + pub unsafe fn set_secure_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() + 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, + ) } } -} -impl ::std::fmt::Debug for CPUBreakpoint { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "CPUBreakpoint {{ flags: {:?}, entry: {:?} }}", - self.flags, self.entry - ) + #[inline] + pub fn space(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 2u8) as u32) } } -} -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CPUWatchpoint { - pub vaddr: vaddr, - pub len: vaddr, - pub hitaddr: vaddr, - pub hitattrs: MemTxAttrs, - pub flags: ::std::os::raw::c_int, - pub entry: CPUWatchpoint__bindgen_ty_1, -} -#[repr(C)] -#[derive(Copy, Clone)] -pub union CPUWatchpoint__bindgen_ty_1 { - pub tqe_next: *mut CPUWatchpoint, - pub tqe_circ: QTailQLink, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUWatchpoint__bindgen_ty_1"] - [::std::mem::size_of::() - 16usize]; - ["Alignment of CPUWatchpoint__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_next"] - [::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_next) - 0usize]; - ["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_circ"] - [::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_circ) - 0usize]; -}; -impl Default for CPUWatchpoint__bindgen_ty_1 { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + #[inline] + pub fn set_space(&mut self, val: ::std::os::raw::c_uint) { unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(1usize, 2u8, val as u64) } } -} -impl ::std::fmt::Debug for CPUWatchpoint__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUWatchpoint__bindgen_ty_1 {{ union }}") - } -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUWatchpoint"][::std::mem::size_of::() - 48usize]; - ["Alignment of CPUWatchpoint"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUWatchpoint::vaddr"] - [::std::mem::offset_of!(CPUWatchpoint, vaddr) - 0usize]; - ["Offset of field: CPUWatchpoint::len"][::std::mem::offset_of!(CPUWatchpoint, len) - 8usize]; - ["Offset of field: CPUWatchpoint::hitaddr"] - [::std::mem::offset_of!(CPUWatchpoint, hitaddr) - 16usize]; - ["Offset of field: CPUWatchpoint::hitattrs"] - [::std::mem::offset_of!(CPUWatchpoint, hitattrs) - 24usize]; - ["Offset of field: CPUWatchpoint::flags"] - [::std::mem::offset_of!(CPUWatchpoint, flags) - 28usize]; - ["Offset of field: CPUWatchpoint::entry"] - [::std::mem::offset_of!(CPUWatchpoint, entry) - 32usize]; -}; -impl Default for CPUWatchpoint { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + #[inline] + pub unsafe fn space_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 1usize, + 2u8, + ) as u32) } } -} -impl ::std::fmt::Debug for CPUWatchpoint { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "CPUWatchpoint {{ hitattrs: {:?}, flags: {:?}, entry: {:?} }}", - self.hitattrs, self.flags, self.entry - ) - } -} -pub type hwaddr = u64; -#[repr(C)] -#[derive(Copy, Clone)] -pub union CPUTLBEntry { - pub __bindgen_anon_1: CPUTLBEntry__bindgen_ty_1, - pub addr_idx: [u64; 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 addend: usize, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBEntry__bindgen_ty_1"] - [::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBEntry__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_read"] - [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_read) - 0usize]; - ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_write"] - [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_write) - 8usize]; - ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_code"] - [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_code) - 16usize]; - ["Offset of field: CPUTLBEntry__bindgen_ty_1::addend"] - [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addend) - 24usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBEntry"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBEntry"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUTLBEntry::addr_idx"] - [::std::mem::offset_of!(CPUTLBEntry, addr_idx) - 0usize]; -}; -impl Default for CPUTLBEntry { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + #[inline] + pub unsafe fn set_space_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() + 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, + ) } } -} -impl ::std::fmt::Debug for CPUTLBEntry { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUTLBEntry {{ union }}") + #[inline] + pub fn user(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u32) } } -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPUTLBDescFast { - pub mask: usize, - pub table: *mut CPUTLBEntry, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBDescFast"][::std::mem::size_of::() - 16usize]; - ["Alignment of CPUTLBDescFast"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUTLBDescFast::mask"] - [::std::mem::offset_of!(CPUTLBDescFast, mask) - 0usize]; - ["Offset of field: CPUTLBDescFast::table"] - [::std::mem::offset_of!(CPUTLBDescFast, table) - 8usize]; -}; -impl Default for CPUTLBDescFast { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); + #[inline] + pub fn set_user(&mut self, val: ::std::os::raw::c_uint) { unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(3usize, 1u8, val as u64) } } -} -pub const OnOffAuto_ON_OFF_AUTO_AUTO: OnOffAuto = OnOffAuto(0); -pub const OnOffAuto_ON_OFF_AUTO_ON: OnOffAuto = OnOffAuto(1); -pub const OnOffAuto_ON_OFF_AUTO_OFF: OnOffAuto = OnOffAuto(2); -pub const OnOffAuto_ON_OFF_AUTO__MAX: OnOffAuto = OnOffAuto(3); -impl ::std::ops::BitOr for OnOffAuto { - type Output = Self; #[inline] - fn bitor(self, other: Self) -> Self { - OnOffAuto(self.0 | other.0) + 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) + } } -} -impl ::std::ops::BitOrAssign for OnOffAuto { #[inline] - fn bitor_assign(&mut self, rhs: OnOffAuto) { - self.0 |= rhs.0; + 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, + ) + } } -} -impl ::std::ops::BitAnd for OnOffAuto { - type Output = Self; #[inline] - fn bitand(self, other: Self) -> Self { - OnOffAuto(self.0 & other.0) + pub fn memory(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(4usize, 1u8) as u32) } } -} -impl ::std::ops::BitAndAssign for OnOffAuto { #[inline] - fn bitand_assign(&mut self, rhs: OnOffAuto) { - self.0 &= rhs.0; + 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) + } } -} -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct OnOffAuto(pub ::std::os::raw::c_uint); -pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_AUTO: S390CpuEntitlement = S390CpuEntitlement(0); -pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_LOW: S390CpuEntitlement = S390CpuEntitlement(1); -pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_MEDIUM: S390CpuEntitlement = - S390CpuEntitlement(2); -pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_HIGH: S390CpuEntitlement = S390CpuEntitlement(3); -pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT__MAX: S390CpuEntitlement = S390CpuEntitlement(4); -impl ::std::ops::BitOr for S390CpuEntitlement { - type Output = Self; #[inline] - fn bitor(self, other: Self) -> Self { - S390CpuEntitlement(self.0 | other.0) + 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) + } } -} -impl ::std::ops::BitOrAssign for S390CpuEntitlement { #[inline] - fn bitor_assign(&mut self, rhs: S390CpuEntitlement) { - self.0 |= rhs.0; + 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, + ) + } } -} -impl ::std::ops::BitAnd for S390CpuEntitlement { - type Output = Self; #[inline] - fn bitand(self, other: Self) -> Self { - S390CpuEntitlement(self.0 & other.0) + pub fn debug(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(5usize, 1u8) as u32) } } -} -impl ::std::ops::BitAndAssign for S390CpuEntitlement { #[inline] - fn bitand_assign(&mut self, rhs: S390CpuEntitlement) { - self.0 &= rhs.0; + 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) + } } -} -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct S390CpuEntitlement(pub ::std::os::raw::c_uint); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_THREAD: CpuTopologyLevel = CpuTopologyLevel(0); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_CORE: CpuTopologyLevel = CpuTopologyLevel(1); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_MODULE: CpuTopologyLevel = CpuTopologyLevel(2); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_CLUSTER: CpuTopologyLevel = CpuTopologyLevel(3); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DIE: CpuTopologyLevel = CpuTopologyLevel(4); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_SOCKET: CpuTopologyLevel = CpuTopologyLevel(5); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_BOOK: CpuTopologyLevel = CpuTopologyLevel(6); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DRAWER: CpuTopologyLevel = CpuTopologyLevel(7); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DEFAULT: CpuTopologyLevel = CpuTopologyLevel(8); -pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL__MAX: CpuTopologyLevel = CpuTopologyLevel(9); -impl ::std::ops::BitOr for CpuTopologyLevel { - type Output = Self; #[inline] - fn bitor(self, other: Self) -> Self { - CpuTopologyLevel(self.0 | other.0) + 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) + } } -} -impl ::std::ops::BitOrAssign for CpuTopologyLevel { #[inline] - fn bitor_assign(&mut self, rhs: CpuTopologyLevel) { - self.0 |= rhs.0; + 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, + ) + } } -} -impl ::std::ops::BitAnd for CpuTopologyLevel { - type Output = Self; #[inline] - fn bitand(self, other: Self) -> Self { - CpuTopologyLevel(self.0 & other.0) + pub fn requester_id(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(6usize, 16u8) as u32) } } -} -impl ::std::ops::BitAndAssign for CpuTopologyLevel { #[inline] - fn bitand_assign(&mut self, rhs: CpuTopologyLevel) { - self.0 &= rhs.0; + 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) + } } -} -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct CpuTopologyLevel(pub ::std::os::raw::c_uint); -pub const SysEmuTarget_SYS_EMU_TARGET_AARCH64: SysEmuTarget = SysEmuTarget(0); -pub const SysEmuTarget_SYS_EMU_TARGET_ALPHA: SysEmuTarget = SysEmuTarget(1); -pub const SysEmuTarget_SYS_EMU_TARGET_ARM: SysEmuTarget = SysEmuTarget(2); -pub const SysEmuTarget_SYS_EMU_TARGET_AVR: SysEmuTarget = SysEmuTarget(3); -pub const SysEmuTarget_SYS_EMU_TARGET_HPPA: SysEmuTarget = SysEmuTarget(4); -pub const SysEmuTarget_SYS_EMU_TARGET_I386: SysEmuTarget = SysEmuTarget(5); -pub const SysEmuTarget_SYS_EMU_TARGET_LOONGARCH64: SysEmuTarget = SysEmuTarget(6); -pub const SysEmuTarget_SYS_EMU_TARGET_M68K: SysEmuTarget = SysEmuTarget(7); -pub const SysEmuTarget_SYS_EMU_TARGET_MICROBLAZE: SysEmuTarget = SysEmuTarget(8); -pub const SysEmuTarget_SYS_EMU_TARGET_MICROBLAZEEL: SysEmuTarget = SysEmuTarget(9); -pub const SysEmuTarget_SYS_EMU_TARGET_MIPS: SysEmuTarget = SysEmuTarget(10); -pub const SysEmuTarget_SYS_EMU_TARGET_MIPS64: SysEmuTarget = SysEmuTarget(11); -pub const SysEmuTarget_SYS_EMU_TARGET_MIPS64EL: SysEmuTarget = SysEmuTarget(12); -pub const SysEmuTarget_SYS_EMU_TARGET_MIPSEL: SysEmuTarget = SysEmuTarget(13); -pub const SysEmuTarget_SYS_EMU_TARGET_OR1K: SysEmuTarget = SysEmuTarget(14); -pub const SysEmuTarget_SYS_EMU_TARGET_PPC: SysEmuTarget = SysEmuTarget(15); -pub const SysEmuTarget_SYS_EMU_TARGET_PPC64: SysEmuTarget = SysEmuTarget(16); -pub const SysEmuTarget_SYS_EMU_TARGET_RISCV32: SysEmuTarget = SysEmuTarget(17); -pub const SysEmuTarget_SYS_EMU_TARGET_RISCV64: SysEmuTarget = SysEmuTarget(18); -pub const SysEmuTarget_SYS_EMU_TARGET_RX: SysEmuTarget = SysEmuTarget(19); -pub const SysEmuTarget_SYS_EMU_TARGET_S390X: SysEmuTarget = SysEmuTarget(20); -pub const SysEmuTarget_SYS_EMU_TARGET_SH4: SysEmuTarget = SysEmuTarget(21); -pub const SysEmuTarget_SYS_EMU_TARGET_SH4EB: SysEmuTarget = SysEmuTarget(22); -pub const SysEmuTarget_SYS_EMU_TARGET_SPARC: SysEmuTarget = SysEmuTarget(23); -pub const SysEmuTarget_SYS_EMU_TARGET_SPARC64: SysEmuTarget = SysEmuTarget(24); -pub const SysEmuTarget_SYS_EMU_TARGET_TRICORE: SysEmuTarget = SysEmuTarget(25); -pub const SysEmuTarget_SYS_EMU_TARGET_X86_64: SysEmuTarget = SysEmuTarget(26); -pub const SysEmuTarget_SYS_EMU_TARGET_XTENSA: SysEmuTarget = SysEmuTarget(27); -pub const SysEmuTarget_SYS_EMU_TARGET_XTENSAEB: SysEmuTarget = SysEmuTarget(28); -pub const SysEmuTarget_SYS_EMU_TARGET__MAX: SysEmuTarget = SysEmuTarget(29); -impl ::std::ops::BitOr for SysEmuTarget { - type Output = Self; #[inline] - fn bitor(self, other: Self) -> Self { - SysEmuTarget(self.0 | other.0) + 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) + } } -} -impl ::std::ops::BitOrAssign for SysEmuTarget { #[inline] - fn bitor_assign(&mut self, rhs: SysEmuTarget) { - self.0 |= rhs.0; + 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, + ) + } } -} -impl ::std::ops::BitAnd for SysEmuTarget { - type Output = Self; #[inline] - fn bitand(self, other: Self) -> Self { - SysEmuTarget(self.0 & other.0) + pub fn pid(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(22usize, 8u8) as u32) } } -} -impl ::std::ops::BitAndAssign for SysEmuTarget { #[inline] - fn bitand_assign(&mut self, rhs: SysEmuTarget) { - self.0 &= rhs.0; + 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) + } } -} -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct SysEmuTarget(pub ::std::os::raw::c_uint); -pub const S390CpuState_S390_CPU_STATE_UNINITIALIZED: S390CpuState = S390CpuState(0); -pub const S390CpuState_S390_CPU_STATE_STOPPED: S390CpuState = S390CpuState(1); -pub const S390CpuState_S390_CPU_STATE_CHECK_STOP: S390CpuState = S390CpuState(2); -pub const S390CpuState_S390_CPU_STATE_OPERATING: S390CpuState = S390CpuState(3); -pub const S390CpuState_S390_CPU_STATE_LOAD: S390CpuState = S390CpuState(4); -pub const S390CpuState_S390_CPU_STATE__MAX: S390CpuState = S390CpuState(5); -impl ::std::ops::BitOr for S390CpuState { - type Output = Self; #[inline] - fn bitor(self, other: Self) -> Self { - S390CpuState(self.0 | other.0) + 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) + } } -} -impl ::std::ops::BitOrAssign for S390CpuState { #[inline] - fn bitor_assign(&mut self, rhs: S390CpuState) { - self.0 |= rhs.0; + 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, + ) + } } -} -impl ::std::ops::BitAnd for S390CpuState { - type Output = Self; #[inline] - fn bitand(self, other: Self) -> Self { - S390CpuState(self.0 & other.0) + 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 } } -impl ::std::ops::BitAndAssign for S390CpuState { - #[inline] - fn bitand_assign(&mut self, rhs: S390CpuState) { - self.0 &= rhs.0; - } +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CPUBreakpoint { + pub pc: vaddr, + pub flags: ::std::os::raw::c_int, + pub entry: CPUBreakpoint__bindgen_ty_1, } -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct S390CpuState(pub ::std::os::raw::c_uint); #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CpuInfoS390 { - pub cpu_state: S390CpuState, - pub has_dedicated: bool, - pub dedicated: bool, - pub has_entitlement: bool, - pub entitlement: S390CpuEntitlement, +#[derive(Copy, Clone)] +pub union CPUBreakpoint__bindgen_ty_1 { + pub tqe_next: *mut CPUBreakpoint, + pub tqe_circ: QTailQLink, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInfoS390"][::std::mem::size_of::() - 12usize]; - ["Alignment of CpuInfoS390"][::std::mem::align_of::() - 4usize]; - ["Offset of field: CpuInfoS390::cpu_state"] - [::std::mem::offset_of!(CpuInfoS390, cpu_state) - 0usize]; - ["Offset of field: CpuInfoS390::has_dedicated"] - [::std::mem::offset_of!(CpuInfoS390, has_dedicated) - 4usize]; - ["Offset of field: CpuInfoS390::dedicated"] - [::std::mem::offset_of!(CpuInfoS390, dedicated) - 5usize]; - ["Offset of field: CpuInfoS390::has_entitlement"] - [::std::mem::offset_of!(CpuInfoS390, has_entitlement) - 6usize]; - ["Offset of field: CpuInfoS390::entitlement"] - [::std::mem::offset_of!(CpuInfoS390, entitlement) - 8usize]; + ["Size of CPUBreakpoint__bindgen_ty_1"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CPUBreakpoint__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_next"] + [::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_next) - 0usize]; + ["Offset of field: CPUBreakpoint__bindgen_ty_1::tqe_circ"] + [::std::mem::offset_of!(CPUBreakpoint__bindgen_ty_1, tqe_circ) - 0usize]; }; -impl Default for CpuInfoS390 { +impl Default for CPUBreakpoint__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3107,31 +2890,67 @@ impl Default for CpuInfoS390 { } } } -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CpuInfoFast { - pub cpu_index: i64, - pub qom_path: *mut ::std::os::raw::c_char, - pub thread_id: i64, - pub props: *mut CpuInstanceProperties, - pub target: SysEmuTarget, - pub u: CpuInfoFast__bindgen_ty_1, +impl ::std::fmt::Debug for CPUBreakpoint__bindgen_ty_1 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "CPUBreakpoint__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUBreakpoint"][::std::mem::size_of::() - 32usize]; + ["Alignment of CPUBreakpoint"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUBreakpoint::pc"][::std::mem::offset_of!(CPUBreakpoint, pc) - 0usize]; + ["Offset of field: CPUBreakpoint::flags"] + [::std::mem::offset_of!(CPUBreakpoint, flags) - 8usize]; + ["Offset of field: CPUBreakpoint::entry"] + [::std::mem::offset_of!(CPUBreakpoint, entry) - 16usize]; +}; +impl Default for CPUBreakpoint { + 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 CPUBreakpoint { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "CPUBreakpoint {{ flags: {:?}, entry: {:?} }}", + self.flags, self.entry + ) + } } #[repr(C)] #[derive(Copy, Clone)] -pub union CpuInfoFast__bindgen_ty_1 { - pub s390x: CpuInfoS390, +pub struct CPUWatchpoint { + pub vaddr: vaddr, + pub len: vaddr, + pub hitaddr: vaddr, + pub hitattrs: MemTxAttrs, + pub flags: ::std::os::raw::c_int, + pub entry: CPUWatchpoint__bindgen_ty_1, +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union CPUWatchpoint__bindgen_ty_1 { + pub tqe_next: *mut CPUWatchpoint, + pub tqe_circ: QTailQLink, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInfoFast__bindgen_ty_1"] - [::std::mem::size_of::() - 12usize]; - ["Alignment of CpuInfoFast__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: CpuInfoFast__bindgen_ty_1::s390x"] - [::std::mem::offset_of!(CpuInfoFast__bindgen_ty_1, s390x) - 0usize]; + ["Size of CPUWatchpoint__bindgen_ty_1"] + [::std::mem::size_of::() - 16usize]; + ["Alignment of CPUWatchpoint__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_next"] + [::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_next) - 0usize]; + ["Offset of field: CPUWatchpoint__bindgen_ty_1::tqe_circ"] + [::std::mem::offset_of!(CPUWatchpoint__bindgen_ty_1, tqe_circ) - 0usize]; }; -impl Default for CpuInfoFast__bindgen_ty_1 { +impl Default for CPUWatchpoint__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3140,26 +2959,28 @@ impl Default for CpuInfoFast__bindgen_ty_1 { } } } -impl ::std::fmt::Debug for CpuInfoFast__bindgen_ty_1 { +impl ::std::fmt::Debug for CPUWatchpoint__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CpuInfoFast__bindgen_ty_1 {{ union }}") + write!(f, "CPUWatchpoint__bindgen_ty_1 {{ union }}") } } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInfoFast"][::std::mem::size_of::() - 48usize]; - ["Alignment of CpuInfoFast"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CpuInfoFast::cpu_index"] - [::std::mem::offset_of!(CpuInfoFast, cpu_index) - 0usize]; - ["Offset of field: CpuInfoFast::qom_path"] - [::std::mem::offset_of!(CpuInfoFast, qom_path) - 8usize]; - ["Offset of field: CpuInfoFast::thread_id"] - [::std::mem::offset_of!(CpuInfoFast, thread_id) - 16usize]; - ["Offset of field: CpuInfoFast::props"][::std::mem::offset_of!(CpuInfoFast, props) - 24usize]; - ["Offset of field: CpuInfoFast::target"][::std::mem::offset_of!(CpuInfoFast, target) - 32usize]; - ["Offset of field: CpuInfoFast::u"][::std::mem::offset_of!(CpuInfoFast, u) - 36usize]; + ["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]; + ["Offset of field: CPUWatchpoint::len"][::std::mem::offset_of!(CPUWatchpoint, len) - 8usize]; + ["Offset of field: CPUWatchpoint::hitaddr"] + [::std::mem::offset_of!(CPUWatchpoint, hitaddr) - 16usize]; + ["Offset of field: CPUWatchpoint::hitattrs"] + [::std::mem::offset_of!(CPUWatchpoint, hitattrs) - 24usize]; + ["Offset of field: CPUWatchpoint::flags"] + [::std::mem::offset_of!(CPUWatchpoint, flags) - 32usize]; + ["Offset of field: CPUWatchpoint::entry"] + [::std::mem::offset_of!(CPUWatchpoint, entry) - 40usize]; }; -impl Default for CpuInfoFast { +impl Default for CPUWatchpoint { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3168,411 +2989,316 @@ impl Default for CpuInfoFast { } } } -impl ::std::fmt::Debug for CpuInfoFast { +impl ::std::fmt::Debug for CPUWatchpoint { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { write!( f, - "CpuInfoFast {{ qom_path: {:?}, props: {:?}, target: {:?}, u: {:?} }}", - self.qom_path, self.props, self.target, self.u + "CPUWatchpoint {{ hitattrs: {:?}, flags: {:?}, entry: {:?} }}", + self.hitattrs, self.flags, self.entry ) } } +pub type hwaddr = u64; +#[repr(C)] +#[derive(Copy, Clone)] +pub union CPUTLBEntry { + pub __bindgen_anon_1: CPUTLBEntry__bindgen_ty_1, + pub addr_idx: [usize; 4usize], +} #[repr(C)] #[derive(Debug, Default, Copy, Clone)] -pub struct CpuInstanceProperties { - pub has_node_id: bool, - pub node_id: i64, - pub has_drawer_id: bool, - pub drawer_id: i64, - pub has_book_id: bool, - pub book_id: i64, - pub has_socket_id: bool, - pub socket_id: i64, - pub has_die_id: bool, - pub die_id: i64, - pub has_cluster_id: bool, - pub cluster_id: i64, - pub has_module_id: bool, - pub module_id: i64, - pub has_core_id: bool, - pub core_id: i64, - pub has_thread_id: bool, - pub thread_id: i64, +pub struct CPUTLBEntry__bindgen_ty_1 { + pub addr_read: usize, + pub addr_write: usize, + pub addr_code: usize, + pub addend: usize, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CpuInstanceProperties"][::std::mem::size_of::() - 144usize]; - ["Alignment of CpuInstanceProperties"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CpuInstanceProperties::has_node_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_node_id) - 0usize]; - ["Offset of field: CpuInstanceProperties::node_id"] - [::std::mem::offset_of!(CpuInstanceProperties, node_id) - 8usize]; - ["Offset of field: CpuInstanceProperties::has_drawer_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_drawer_id) - 16usize]; - ["Offset of field: CpuInstanceProperties::drawer_id"] - [::std::mem::offset_of!(CpuInstanceProperties, drawer_id) - 24usize]; - ["Offset of field: CpuInstanceProperties::has_book_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_book_id) - 32usize]; - ["Offset of field: CpuInstanceProperties::book_id"] - [::std::mem::offset_of!(CpuInstanceProperties, book_id) - 40usize]; - ["Offset of field: CpuInstanceProperties::has_socket_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_socket_id) - 48usize]; - ["Offset of field: CpuInstanceProperties::socket_id"] - [::std::mem::offset_of!(CpuInstanceProperties, socket_id) - 56usize]; - ["Offset of field: CpuInstanceProperties::has_die_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_die_id) - 64usize]; - ["Offset of field: CpuInstanceProperties::die_id"] - [::std::mem::offset_of!(CpuInstanceProperties, die_id) - 72usize]; - ["Offset of field: CpuInstanceProperties::has_cluster_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_cluster_id) - 80usize]; - ["Offset of field: CpuInstanceProperties::cluster_id"] - [::std::mem::offset_of!(CpuInstanceProperties, cluster_id) - 88usize]; - ["Offset of field: CpuInstanceProperties::has_module_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_module_id) - 96usize]; - ["Offset of field: CpuInstanceProperties::module_id"] - [::std::mem::offset_of!(CpuInstanceProperties, module_id) - 104usize]; - ["Offset of field: CpuInstanceProperties::has_core_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_core_id) - 112usize]; - ["Offset of field: CpuInstanceProperties::core_id"] - [::std::mem::offset_of!(CpuInstanceProperties, core_id) - 120usize]; - ["Offset of field: CpuInstanceProperties::has_thread_id"] - [::std::mem::offset_of!(CpuInstanceProperties, has_thread_id) - 128usize]; - ["Offset of field: CpuInstanceProperties::thread_id"] - [::std::mem::offset_of!(CpuInstanceProperties, thread_id) - 136usize]; + ["Size of CPUTLBEntry__bindgen_ty_1"] + [::std::mem::size_of::() - 32usize]; + ["Alignment of CPUTLBEntry__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_read"] + [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_read) - 0usize]; + ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_write"] + [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_write) - 8usize]; + ["Offset of field: CPUTLBEntry__bindgen_ty_1::addr_code"] + [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addr_code) - 16usize]; + ["Offset of field: CPUTLBEntry__bindgen_ty_1::addend"] + [::std::mem::offset_of!(CPUTLBEntry__bindgen_ty_1, addend) - 24usize]; }; -pub const ShutdownCause_SHUTDOWN_CAUSE_NONE: ShutdownCause = ShutdownCause(0); -pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_ERROR: ShutdownCause = ShutdownCause(1); -pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_QMP_QUIT: ShutdownCause = ShutdownCause(2); -pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET: ShutdownCause = ShutdownCause(3); -pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_SIGNAL: ShutdownCause = ShutdownCause(4); -pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_UI: ShutdownCause = ShutdownCause(5); -pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_SHUTDOWN: ShutdownCause = ShutdownCause(6); -pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_RESET: ShutdownCause = ShutdownCause(7); -pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_PANIC: ShutdownCause = ShutdownCause(8); -pub const ShutdownCause_SHUTDOWN_CAUSE_SUBSYSTEM_RESET: ShutdownCause = ShutdownCause(9); -pub const ShutdownCause_SHUTDOWN_CAUSE_SNAPSHOT_LOAD: ShutdownCause = ShutdownCause(10); -pub const ShutdownCause_SHUTDOWN_CAUSE__MAX: ShutdownCause = ShutdownCause(11); -impl ::std::ops::BitOr for ShutdownCause { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUTLBEntry"][::std::mem::size_of::() - 32usize]; + ["Alignment of CPUTLBEntry"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUTLBEntry::addr_idx"] + [::std::mem::offset_of!(CPUTLBEntry, addr_idx) - 0usize]; +}; +impl Default for CPUTLBEntry { + 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 CPUTLBEntry { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "CPUTLBEntry {{ union }}") + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CPUTLBDescFast { + pub mask: usize, + pub table: *mut CPUTLBEntry, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUTLBDescFast"][::std::mem::size_of::() - 16usize]; + ["Alignment of CPUTLBDescFast"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUTLBDescFast::mask"] + [::std::mem::offset_of!(CPUTLBDescFast, mask) - 0usize]; + ["Offset of field: CPUTLBDescFast::table"] + [::std::mem::offset_of!(CPUTLBDescFast, table) - 8usize]; +}; +impl Default for CPUTLBDescFast { + 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 OnOffAuto_ON_OFF_AUTO_AUTO: OnOffAuto = OnOffAuto(0); +pub const OnOffAuto_ON_OFF_AUTO_ON: OnOffAuto = OnOffAuto(1); +pub const OnOffAuto_ON_OFF_AUTO_OFF: OnOffAuto = OnOffAuto(2); +pub const OnOffAuto_ON_OFF_AUTO__MAX: OnOffAuto = OnOffAuto(3); +impl ::std::ops::BitOr for OnOffAuto { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { - ShutdownCause(self.0 | other.0) + OnOffAuto(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for ShutdownCause { +impl ::std::ops::BitOrAssign for OnOffAuto { #[inline] - fn bitor_assign(&mut self, rhs: ShutdownCause) { + fn bitor_assign(&mut self, rhs: OnOffAuto) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for ShutdownCause { +impl ::std::ops::BitAnd for OnOffAuto { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { - ShutdownCause(self.0 & other.0) + OnOffAuto(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for ShutdownCause { +impl ::std::ops::BitAndAssign for OnOffAuto { #[inline] - fn bitand_assign(&mut self, rhs: ShutdownCause) { + fn bitand_assign(&mut self, rhs: OnOffAuto) { self.0 &= rhs.0; } } #[repr(transparent)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct ShutdownCause(pub ::std::os::raw::c_uint); -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct QemuLockCnt { - pub count: ::std::os::raw::c_uint, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of QemuLockCnt"][::std::mem::size_of::() - 4usize]; - ["Alignment of QemuLockCnt"][::std::mem::align_of::() - 4usize]; - ["Offset of field: QemuLockCnt::count"][::std::mem::offset_of!(QemuLockCnt, count) - 0usize]; -}; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPUAddressSpace { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPUJumpCache { - _unused: [u8; 0], -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct SysemuCPUOps { - _unused: [u8; 0], +pub struct OnOffAuto(pub ::std::os::raw::c_uint); +pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_AUTO: S390CpuEntitlement = S390CpuEntitlement(0); +pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_LOW: S390CpuEntitlement = S390CpuEntitlement(1); +pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_MEDIUM: S390CpuEntitlement = + S390CpuEntitlement(2); +pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT_HIGH: S390CpuEntitlement = S390CpuEntitlement(3); +pub const S390CpuEntitlement_S390_CPU_ENTITLEMENT__MAX: S390CpuEntitlement = S390CpuEntitlement(4); +impl ::std::ops::BitOr for S390CpuEntitlement { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + S390CpuEntitlement(self.0 | other.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."] -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct CPUClass { - pub parent_class: DeviceClass, - pub class_by_name: ::std::option::Option< - unsafe extern "C" fn(cpu_model: *const ::std::os::raw::c_char) -> *mut ObjectClass, - >, - pub parse_features: ::std::option::Option< - unsafe extern "C" fn( - typename: *const ::std::os::raw::c_char, - str_: *mut ::std::os::raw::c_char, - 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, - >, - pub memory_rw_debug: ::std::option::Option< - unsafe extern "C" fn( - cpu: *mut CPUState, - addr: vaddr, - buf: *mut u8, - len: ::std::os::raw::c_int, - is_write: bool, - ) -> ::std::os::raw::c_int, - >, - pub dump_state: ::std::option::Option< - unsafe extern "C" fn(cpu: *mut CPUState, arg1: *mut FILE, flags: ::std::os::raw::c_int), - >, - pub query_cpu_fast: - ::std::option::Option, - pub get_arch_id: ::std::option::Option i64>, - pub set_pc: ::std::option::Option, - pub get_pc: ::std::option::Option vaddr>, - pub gdb_read_register: ::std::option::Option< - unsafe extern "C" fn( - cpu: *mut CPUState, - buf: *mut GByteArray, - reg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub gdb_write_register: ::std::option::Option< - unsafe extern "C" fn( - cpu: *mut CPUState, - buf: *mut u8, - reg: ::std::os::raw::c_int, - ) -> ::std::os::raw::c_int, - >, - pub gdb_adjust_breakpoint: - ::std::option::Option vaddr>, - pub gdb_core_xml_file: *const ::std::os::raw::c_char, - pub gdb_arch_name: - ::std::option::Option *const gchar>, - pub disas_set_info: ::std::option::Option< - unsafe extern "C" fn(cpu: *mut CPUState, info: *mut disassemble_info), - >, - pub deprecation_note: *const ::std::os::raw::c_char, - pub accel_cpu: *mut AccelCPUClass, - pub sysemu_ops: *const SysemuCPUOps, - pub tcg_ops: *const TCGCPUOps, - pub init_accel_cpu: ::std::option::Option< - unsafe extern "C" fn(accel_cpu: *mut AccelCPUClass, cc: *mut CPUClass), - >, - pub reset_dump_flags: ::std::os::raw::c_int, - pub gdb_num_core_regs: ::std::os::raw::c_int, - pub gdb_stop_before_watchpoint: bool, +impl ::std::ops::BitOrAssign for S390CpuEntitlement { + #[inline] + fn bitor_assign(&mut self, rhs: S390CpuEntitlement) { + self.0 |= rhs.0; + } } -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUClass"][::std::mem::size_of::() - 368usize]; - ["Alignment of CPUClass"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUClass::parent_class"] - [::std::mem::offset_of!(CPUClass, parent_class) - 0usize]; - ["Offset of field: CPUClass::class_by_name"] - [::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]; - ["Offset of field: CPUClass::memory_rw_debug"] - [::std::mem::offset_of!(CPUClass, memory_rw_debug) - 216usize]; - ["Offset of field: CPUClass::dump_state"] - [::std::mem::offset_of!(CPUClass, dump_state) - 224usize]; - ["Offset of field: CPUClass::query_cpu_fast"] - [::std::mem::offset_of!(CPUClass, query_cpu_fast) - 232usize]; - ["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]; - ["Offset of field: CPUClass::gdb_read_register"] - [::std::mem::offset_of!(CPUClass, gdb_read_register) - 264usize]; - ["Offset of field: CPUClass::gdb_write_register"] - [::std::mem::offset_of!(CPUClass, gdb_write_register) - 272usize]; - ["Offset of field: CPUClass::gdb_adjust_breakpoint"] - [::std::mem::offset_of!(CPUClass, gdb_adjust_breakpoint) - 280usize]; - ["Offset of field: CPUClass::gdb_core_xml_file"] - [::std::mem::offset_of!(CPUClass, gdb_core_xml_file) - 288usize]; - ["Offset of field: CPUClass::gdb_arch_name"] - [::std::mem::offset_of!(CPUClass, gdb_arch_name) - 296usize]; - ["Offset of field: CPUClass::disas_set_info"] - [::std::mem::offset_of!(CPUClass, disas_set_info) - 304usize]; - ["Offset of field: CPUClass::deprecation_note"] - [::std::mem::offset_of!(CPUClass, deprecation_note) - 312usize]; - ["Offset of field: CPUClass::accel_cpu"] - [::std::mem::offset_of!(CPUClass, accel_cpu) - 320usize]; - ["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]; - ["Offset of field: CPUClass::init_accel_cpu"] - [::std::mem::offset_of!(CPUClass, init_accel_cpu) - 344usize]; - ["Offset of field: CPUClass::reset_dump_flags"] - [::std::mem::offset_of!(CPUClass, reset_dump_flags) - 352usize]; - ["Offset of field: CPUClass::gdb_num_core_regs"] - [::std::mem::offset_of!(CPUClass, gdb_num_core_regs) - 356usize]; - ["Offset of field: CPUClass::gdb_stop_before_watchpoint"] - [::std::mem::offset_of!(CPUClass, gdb_stop_before_watchpoint) - 360usize]; -}; -impl Default for CPUClass { - 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::ops::BitAnd for S390CpuEntitlement { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + S390CpuEntitlement(self.0 & other.0) } } -#[repr(C)] -#[derive(Copy, Clone)] -pub struct CPUTLBEntryFull { - pub xlat_section: hwaddr, - pub phys_addr: hwaddr, - pub attrs: MemTxAttrs, - pub prot: u8, - pub lg_page_size: u8, - pub tlb_fill_flags: u8, - pub slow_flags: [u8; 3usize], - pub extra: CPUTLBEntryFull__bindgen_ty_1, +impl ::std::ops::BitAndAssign for S390CpuEntitlement { + #[inline] + fn bitand_assign(&mut self, rhs: S390CpuEntitlement) { + self.0 &= rhs.0; + } } -#[repr(C)] -#[derive(Copy, Clone)] -pub union CPUTLBEntryFull__bindgen_ty_1 { - pub arm: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct S390CpuEntitlement(pub ::std::os::raw::c_uint); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_THREAD: CpuTopologyLevel = CpuTopologyLevel(0); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_CORE: CpuTopologyLevel = CpuTopologyLevel(1); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_MODULE: CpuTopologyLevel = CpuTopologyLevel(2); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_CLUSTER: CpuTopologyLevel = CpuTopologyLevel(3); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DIE: CpuTopologyLevel = CpuTopologyLevel(4); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_SOCKET: CpuTopologyLevel = CpuTopologyLevel(5); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_BOOK: CpuTopologyLevel = CpuTopologyLevel(6); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DRAWER: CpuTopologyLevel = CpuTopologyLevel(7); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL_DEFAULT: CpuTopologyLevel = CpuTopologyLevel(8); +pub const CpuTopologyLevel_CPU_TOPOLOGY_LEVEL__MAX: CpuTopologyLevel = CpuTopologyLevel(9); +impl ::std::ops::BitOr for CpuTopologyLevel { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + CpuTopologyLevel(self.0 | other.0) + } } -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1 { - pub pte_attrs: u8, - pub shareability: u8, - pub guarded: bool, +impl ::std::ops::BitOrAssign for CpuTopologyLevel { + #[inline] + fn bitor_assign(&mut self, rhs: CpuTopologyLevel) { + self.0 |= rhs.0; + } } -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::size_of::() - 3usize]; - ["Alignment of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"] - [::std::mem::align_of::() - 1usize]; - ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::pte_attrs"] - [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, pte_attrs) - 0usize]; - ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::shareability"][::std::mem::offset_of!( - CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, - shareability - ) - 1usize]; - ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::guarded"] - [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, guarded) - 2usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBEntryFull__bindgen_ty_1"] - [::std::mem::size_of::() - 3usize]; - ["Alignment of CPUTLBEntryFull__bindgen_ty_1"] - [::std::mem::align_of::() - 1usize]; - ["Offset of field: CPUTLBEntryFull__bindgen_ty_1::arm"] - [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1, arm) - 0usize]; -}; -impl Default for CPUTLBEntryFull__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::ops::BitAnd for CpuTopologyLevel { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + CpuTopologyLevel(self.0 & other.0) } } -impl ::std::fmt::Debug for CPUTLBEntryFull__bindgen_ty_1 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUTLBEntryFull__bindgen_ty_1 {{ union }}") +impl ::std::ops::BitAndAssign for CpuTopologyLevel { + #[inline] + fn bitand_assign(&mut self, rhs: CpuTopologyLevel) { + self.0 &= rhs.0; } } -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBEntryFull"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBEntryFull"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUTLBEntryFull::xlat_section"] - [::std::mem::offset_of!(CPUTLBEntryFull, xlat_section) - 0usize]; - ["Offset of field: CPUTLBEntryFull::phys_addr"] - [::std::mem::offset_of!(CPUTLBEntryFull, phys_addr) - 8usize]; - ["Offset of field: CPUTLBEntryFull::attrs"] - [::std::mem::offset_of!(CPUTLBEntryFull, attrs) - 16usize]; - ["Offset of field: CPUTLBEntryFull::prot"] - [::std::mem::offset_of!(CPUTLBEntryFull, prot) - 20usize]; - ["Offset of field: CPUTLBEntryFull::lg_page_size"] - [::std::mem::offset_of!(CPUTLBEntryFull, lg_page_size) - 21usize]; - ["Offset of field: CPUTLBEntryFull::tlb_fill_flags"] - [::std::mem::offset_of!(CPUTLBEntryFull, tlb_fill_flags) - 22usize]; - ["Offset of field: CPUTLBEntryFull::slow_flags"] - [::std::mem::offset_of!(CPUTLBEntryFull, slow_flags) - 23usize]; - ["Offset of field: CPUTLBEntryFull::extra"] - [::std::mem::offset_of!(CPUTLBEntryFull, extra) - 26usize]; -}; -impl Default for CPUTLBEntryFull { - 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(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct CpuTopologyLevel(pub ::std::os::raw::c_uint); +pub const SysEmuTarget_SYS_EMU_TARGET_AARCH64: SysEmuTarget = SysEmuTarget(0); +pub const SysEmuTarget_SYS_EMU_TARGET_ALPHA: SysEmuTarget = SysEmuTarget(1); +pub const SysEmuTarget_SYS_EMU_TARGET_ARM: SysEmuTarget = SysEmuTarget(2); +pub const SysEmuTarget_SYS_EMU_TARGET_AVR: SysEmuTarget = SysEmuTarget(3); +pub const SysEmuTarget_SYS_EMU_TARGET_HPPA: SysEmuTarget = SysEmuTarget(4); +pub const SysEmuTarget_SYS_EMU_TARGET_I386: SysEmuTarget = SysEmuTarget(5); +pub const SysEmuTarget_SYS_EMU_TARGET_LOONGARCH64: SysEmuTarget = SysEmuTarget(6); +pub const SysEmuTarget_SYS_EMU_TARGET_M68K: SysEmuTarget = SysEmuTarget(7); +pub const SysEmuTarget_SYS_EMU_TARGET_MICROBLAZE: SysEmuTarget = SysEmuTarget(8); +pub const SysEmuTarget_SYS_EMU_TARGET_MICROBLAZEEL: SysEmuTarget = SysEmuTarget(9); +pub const SysEmuTarget_SYS_EMU_TARGET_MIPS: SysEmuTarget = SysEmuTarget(10); +pub const SysEmuTarget_SYS_EMU_TARGET_MIPS64: SysEmuTarget = SysEmuTarget(11); +pub const SysEmuTarget_SYS_EMU_TARGET_MIPS64EL: SysEmuTarget = SysEmuTarget(12); +pub const SysEmuTarget_SYS_EMU_TARGET_MIPSEL: SysEmuTarget = SysEmuTarget(13); +pub const SysEmuTarget_SYS_EMU_TARGET_OR1K: SysEmuTarget = SysEmuTarget(14); +pub const SysEmuTarget_SYS_EMU_TARGET_PPC: SysEmuTarget = SysEmuTarget(15); +pub const SysEmuTarget_SYS_EMU_TARGET_PPC64: SysEmuTarget = SysEmuTarget(16); +pub const SysEmuTarget_SYS_EMU_TARGET_RISCV32: SysEmuTarget = SysEmuTarget(17); +pub const SysEmuTarget_SYS_EMU_TARGET_RISCV64: SysEmuTarget = SysEmuTarget(18); +pub const SysEmuTarget_SYS_EMU_TARGET_RX: SysEmuTarget = SysEmuTarget(19); +pub const SysEmuTarget_SYS_EMU_TARGET_S390X: SysEmuTarget = SysEmuTarget(20); +pub const SysEmuTarget_SYS_EMU_TARGET_SH4: SysEmuTarget = SysEmuTarget(21); +pub const SysEmuTarget_SYS_EMU_TARGET_SH4EB: SysEmuTarget = SysEmuTarget(22); +pub const SysEmuTarget_SYS_EMU_TARGET_SPARC: SysEmuTarget = SysEmuTarget(23); +pub const SysEmuTarget_SYS_EMU_TARGET_SPARC64: SysEmuTarget = SysEmuTarget(24); +pub const SysEmuTarget_SYS_EMU_TARGET_TRICORE: SysEmuTarget = SysEmuTarget(25); +pub const SysEmuTarget_SYS_EMU_TARGET_X86_64: SysEmuTarget = SysEmuTarget(26); +pub const SysEmuTarget_SYS_EMU_TARGET_XTENSA: SysEmuTarget = SysEmuTarget(27); +pub const SysEmuTarget_SYS_EMU_TARGET_XTENSAEB: SysEmuTarget = SysEmuTarget(28); +pub const SysEmuTarget_SYS_EMU_TARGET__MAX: SysEmuTarget = SysEmuTarget(29); +impl ::std::ops::BitOr for SysEmuTarget { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + SysEmuTarget(self.0 | other.0) } } -impl ::std::fmt::Debug for CPUTLBEntryFull { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "CPUTLBEntryFull {{ attrs: {:?}, slow_flags: {:?}, extra: {:?} }}", - self.attrs, self.slow_flags, self.extra - ) +impl ::std::ops::BitOrAssign for SysEmuTarget { + #[inline] + fn bitor_assign(&mut self, rhs: SysEmuTarget) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for SysEmuTarget { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + SysEmuTarget(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for SysEmuTarget { + #[inline] + fn bitand_assign(&mut self, rhs: SysEmuTarget) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct SysEmuTarget(pub ::std::os::raw::c_uint); +pub const S390CpuState_S390_CPU_STATE_UNINITIALIZED: S390CpuState = S390CpuState(0); +pub const S390CpuState_S390_CPU_STATE_STOPPED: S390CpuState = S390CpuState(1); +pub const S390CpuState_S390_CPU_STATE_CHECK_STOP: S390CpuState = S390CpuState(2); +pub const S390CpuState_S390_CPU_STATE_OPERATING: S390CpuState = S390CpuState(3); +pub const S390CpuState_S390_CPU_STATE_LOAD: S390CpuState = S390CpuState(4); +pub const S390CpuState_S390_CPU_STATE__MAX: S390CpuState = S390CpuState(5); +impl ::std::ops::BitOr for S390CpuState { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + S390CpuState(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for S390CpuState { + #[inline] + fn bitor_assign(&mut self, rhs: S390CpuState) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for S390CpuState { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + S390CpuState(self.0 & other.0) } } +impl ::std::ops::BitAndAssign for S390CpuState { + #[inline] + fn bitand_assign(&mut self, rhs: S390CpuState) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct S390CpuState(pub ::std::os::raw::c_uint); #[repr(C)] -#[derive(Copy, Clone)] -pub struct CPUTLBDesc { - pub large_page_addr: vaddr, - pub large_page_mask: vaddr, - pub window_begin_ns: i64, - pub window_max_entries: usize, - pub n_used_entries: usize, - pub vindex: usize, - pub vtable: [CPUTLBEntry; 8usize], - pub vfulltlb: [CPUTLBEntryFull; 8usize], - pub fulltlb: *mut CPUTLBEntryFull, +#[derive(Debug, Copy, Clone)] +pub struct CpuInfoS390 { + pub cpu_state: S390CpuState, + pub has_dedicated: bool, + pub dedicated: bool, + pub has_entitlement: bool, + pub entitlement: S390CpuEntitlement, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLBDesc"][::std::mem::size_of::() - 568usize]; - ["Alignment of CPUTLBDesc"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUTLBDesc::large_page_addr"] - [::std::mem::offset_of!(CPUTLBDesc, large_page_addr) - 0usize]; - ["Offset of field: CPUTLBDesc::large_page_mask"] - [::std::mem::offset_of!(CPUTLBDesc, large_page_mask) - 8usize]; - ["Offset of field: CPUTLBDesc::window_begin_ns"] - [::std::mem::offset_of!(CPUTLBDesc, window_begin_ns) - 16usize]; - ["Offset of field: CPUTLBDesc::window_max_entries"] - [::std::mem::offset_of!(CPUTLBDesc, window_max_entries) - 24usize]; - ["Offset of field: CPUTLBDesc::n_used_entries"] - [::std::mem::offset_of!(CPUTLBDesc, n_used_entries) - 32usize]; - ["Offset of field: CPUTLBDesc::vindex"][::std::mem::offset_of!(CPUTLBDesc, vindex) - 40usize]; - ["Offset of field: CPUTLBDesc::vtable"][::std::mem::offset_of!(CPUTLBDesc, vtable) - 48usize]; - ["Offset of field: CPUTLBDesc::vfulltlb"] - [::std::mem::offset_of!(CPUTLBDesc, vfulltlb) - 304usize]; - ["Offset of field: CPUTLBDesc::fulltlb"] - [::std::mem::offset_of!(CPUTLBDesc, fulltlb) - 560usize]; + ["Size of CpuInfoS390"][::std::mem::size_of::() - 12usize]; + ["Alignment of CpuInfoS390"][::std::mem::align_of::() - 4usize]; + ["Offset of field: CpuInfoS390::cpu_state"] + [::std::mem::offset_of!(CpuInfoS390, cpu_state) - 0usize]; + ["Offset of field: CpuInfoS390::has_dedicated"] + [::std::mem::offset_of!(CpuInfoS390, has_dedicated) - 4usize]; + ["Offset of field: CpuInfoS390::dedicated"] + [::std::mem::offset_of!(CpuInfoS390, dedicated) - 5usize]; + ["Offset of field: CpuInfoS390::has_entitlement"] + [::std::mem::offset_of!(CpuInfoS390, has_entitlement) - 6usize]; + ["Offset of field: CpuInfoS390::entitlement"] + [::std::mem::offset_of!(CpuInfoS390, entitlement) - 8usize]; }; -impl Default for CPUTLBDesc { +impl Default for CpuInfoS390 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3581,54 +3307,31 @@ impl Default for CPUTLBDesc { } } } -impl ::std::fmt::Debug for CPUTLBDesc { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "CPUTLBDesc {{ vtable: {:?}, vfulltlb: {:?}, fulltlb: {:?} }}", - self.vtable, self.vfulltlb, self.fulltlb - ) - } -} #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct CPUTLBCommon { - pub lock: QemuSpin, - pub dirty: u16, - pub full_flush_count: usize, - pub part_flush_count: usize, - pub elide_flush_count: usize, +#[derive(Copy, Clone)] +pub struct CpuInfoFast { + pub cpu_index: i64, + pub qom_path: *mut ::std::os::raw::c_char, + pub thread_id: i64, + pub props: *mut CpuInstanceProperties, + pub target: SysEmuTarget, + pub u: CpuInfoFast__bindgen_ty_1, } -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUTLBCommon"][::std::mem::size_of::() - 32usize]; - ["Alignment of CPUTLBCommon"][::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUTLBCommon::lock"][::std::mem::offset_of!(CPUTLBCommon, lock) - 0usize]; - ["Offset of field: CPUTLBCommon::dirty"][::std::mem::offset_of!(CPUTLBCommon, dirty) - 4usize]; - ["Offset of field: CPUTLBCommon::full_flush_count"] - [::std::mem::offset_of!(CPUTLBCommon, full_flush_count) - 8usize]; - ["Offset of field: CPUTLBCommon::part_flush_count"] - [::std::mem::offset_of!(CPUTLBCommon, part_flush_count) - 16usize]; - ["Offset of field: CPUTLBCommon::elide_flush_count"] - [::std::mem::offset_of!(CPUTLBCommon, elide_flush_count) - 24usize]; -}; #[repr(C)] -#[repr(align(16))] #[derive(Copy, Clone)] -pub struct CPUTLB { - pub c: CPUTLBCommon, - pub d: [CPUTLBDesc; 16usize], - pub f: [CPUTLBDescFast; 16usize], +pub union CpuInfoFast__bindgen_ty_1 { + pub s390x: CpuInfoS390, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUTLB"][::std::mem::size_of::() - 9376usize]; - ["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]; + ["Size of CpuInfoFast__bindgen_ty_1"] + [::std::mem::size_of::() - 12usize]; + ["Alignment of CpuInfoFast__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: CpuInfoFast__bindgen_ty_1::s390x"] + [::std::mem::offset_of!(CpuInfoFast__bindgen_ty_1, s390x) - 0usize]; }; -impl Default for CPUTLB { +impl Default for CpuInfoFast__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3637,46 +3340,26 @@ impl Default for CPUTLB { } } } -impl ::std::fmt::Debug for CPUTLB { +impl ::std::fmt::Debug for CpuInfoFast__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "CPUTLB {{ c: {:?}, d: {:?}, f: {:?} }}", - self.c, self.d, self.f - ) + write!(f, "CpuInfoFast__bindgen_ty_1 {{ union }}") } } -#[repr(C)] -#[derive(Copy, Clone)] -pub union IcountDecr { - pub u32_: u32, - pub u16_: IcountDecr__bindgen_ty_1, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct IcountDecr__bindgen_ty_1 { - pub low: u16, - pub high: u16, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of IcountDecr__bindgen_ty_1"] - [::std::mem::size_of::() - 4usize]; - ["Alignment of IcountDecr__bindgen_ty_1"] - [::std::mem::align_of::() - 2usize]; - ["Offset of field: IcountDecr__bindgen_ty_1::low"] - [::std::mem::offset_of!(IcountDecr__bindgen_ty_1, low) - 0usize]; - ["Offset of field: IcountDecr__bindgen_ty_1::high"] - [::std::mem::offset_of!(IcountDecr__bindgen_ty_1, high) - 2usize]; -}; #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of IcountDecr"][::std::mem::size_of::() - 4usize]; - ["Alignment of IcountDecr"][::std::mem::align_of::() - 4usize]; - ["Offset of field: IcountDecr::u32_"][::std::mem::offset_of!(IcountDecr, u32_) - 0usize]; - ["Offset of field: IcountDecr::u16_"][::std::mem::offset_of!(IcountDecr, u16_) - 0usize]; + ["Size of CpuInfoFast"][::std::mem::size_of::() - 48usize]; + ["Alignment of CpuInfoFast"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CpuInfoFast::cpu_index"] + [::std::mem::offset_of!(CpuInfoFast, cpu_index) - 0usize]; + ["Offset of field: CpuInfoFast::qom_path"] + [::std::mem::offset_of!(CpuInfoFast, qom_path) - 8usize]; + ["Offset of field: CpuInfoFast::thread_id"] + [::std::mem::offset_of!(CpuInfoFast, thread_id) - 16usize]; + ["Offset of field: CpuInfoFast::props"][::std::mem::offset_of!(CpuInfoFast, props) - 24usize]; + ["Offset of field: CpuInfoFast::target"][::std::mem::offset_of!(CpuInfoFast, target) - 32usize]; + ["Offset of field: CpuInfoFast::u"][::std::mem::offset_of!(CpuInfoFast, u) - 36usize]; }; -impl Default for IcountDecr { +impl Default for CpuInfoFast { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3685,187 +3368,270 @@ impl Default for IcountDecr { } } } -impl ::std::fmt::Debug for IcountDecr { +impl ::std::fmt::Debug for CpuInfoFast { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "IcountDecr {{ union }}") + write!( + f, + "CpuInfoFast {{ qom_path: {:?}, props: {:?}, target: {:?}, u: {:?} }}", + self.qom_path, self.props, self.target, self.u + ) } } -#[doc = " CPUNegativeOffsetState: Elements of CPUState most efficiently accessed\n from CPUArchState, via small negative offsets.\n @can_do_io: True if memory-mapped IO is allowed.\n @plugin_mem_cbs: active plugin memory callbacks\n @plugin_mem_value_low: 64 lower bits of latest accessed mem value.\n @plugin_mem_value_high: 64 higher bits of latest accessed mem value."] #[repr(C)] -#[repr(align(16))] -#[derive(Copy, Clone)] -pub struct CPUNegativeOffsetState { - pub tlb: CPUTLB, - pub plugin_mem_cbs: *mut GArray, - pub plugin_mem_value_low: u64, - pub plugin_mem_value_high: u64, - pub icount_decr: IcountDecr, - pub can_do_io: bool, +#[derive(Debug, Default, Copy, Clone)] +pub struct CpuInstanceProperties { + pub has_node_id: bool, + pub node_id: i64, + pub has_drawer_id: bool, + pub drawer_id: i64, + pub has_book_id: bool, + pub book_id: i64, + pub has_socket_id: bool, + pub socket_id: i64, + pub has_die_id: bool, + pub die_id: i64, + pub has_cluster_id: bool, + pub cluster_id: i64, + pub has_module_id: bool, + pub module_id: i64, + pub has_core_id: bool, + pub core_id: i64, + pub has_thread_id: bool, + pub thread_id: i64, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUNegativeOffsetState"][::std::mem::size_of::() - 9408usize]; - ["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]; - ["Offset of field: CPUNegativeOffsetState::plugin_mem_value_low"] - [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_low) - 9384usize]; - ["Offset of field: CPUNegativeOffsetState::plugin_mem_value_high"] - [::std::mem::offset_of!(CPUNegativeOffsetState, plugin_mem_value_high) - 9392usize]; - ["Offset of field: CPUNegativeOffsetState::icount_decr"] - [::std::mem::offset_of!(CPUNegativeOffsetState, icount_decr) - 9400usize]; - ["Offset of field: CPUNegativeOffsetState::can_do_io"] - [::std::mem::offset_of!(CPUNegativeOffsetState, can_do_io) - 9404usize]; + ["Size of CpuInstanceProperties"][::std::mem::size_of::() - 144usize]; + ["Alignment of CpuInstanceProperties"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CpuInstanceProperties::has_node_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_node_id) - 0usize]; + ["Offset of field: CpuInstanceProperties::node_id"] + [::std::mem::offset_of!(CpuInstanceProperties, node_id) - 8usize]; + ["Offset of field: CpuInstanceProperties::has_drawer_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_drawer_id) - 16usize]; + ["Offset of field: CpuInstanceProperties::drawer_id"] + [::std::mem::offset_of!(CpuInstanceProperties, drawer_id) - 24usize]; + ["Offset of field: CpuInstanceProperties::has_book_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_book_id) - 32usize]; + ["Offset of field: CpuInstanceProperties::book_id"] + [::std::mem::offset_of!(CpuInstanceProperties, book_id) - 40usize]; + ["Offset of field: CpuInstanceProperties::has_socket_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_socket_id) - 48usize]; + ["Offset of field: CpuInstanceProperties::socket_id"] + [::std::mem::offset_of!(CpuInstanceProperties, socket_id) - 56usize]; + ["Offset of field: CpuInstanceProperties::has_die_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_die_id) - 64usize]; + ["Offset of field: CpuInstanceProperties::die_id"] + [::std::mem::offset_of!(CpuInstanceProperties, die_id) - 72usize]; + ["Offset of field: CpuInstanceProperties::has_cluster_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_cluster_id) - 80usize]; + ["Offset of field: CpuInstanceProperties::cluster_id"] + [::std::mem::offset_of!(CpuInstanceProperties, cluster_id) - 88usize]; + ["Offset of field: CpuInstanceProperties::has_module_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_module_id) - 96usize]; + ["Offset of field: CpuInstanceProperties::module_id"] + [::std::mem::offset_of!(CpuInstanceProperties, module_id) - 104usize]; + ["Offset of field: CpuInstanceProperties::has_core_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_core_id) - 112usize]; + ["Offset of field: CpuInstanceProperties::core_id"] + [::std::mem::offset_of!(CpuInstanceProperties, core_id) - 120usize]; + ["Offset of field: CpuInstanceProperties::has_thread_id"] + [::std::mem::offset_of!(CpuInstanceProperties, has_thread_id) - 128usize]; + ["Offset of field: CpuInstanceProperties::thread_id"] + [::std::mem::offset_of!(CpuInstanceProperties, thread_id) - 136usize]; }; -impl Default for CPUNegativeOffsetState { - 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 ShutdownCause_SHUTDOWN_CAUSE_NONE: ShutdownCause = ShutdownCause(0); +pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_ERROR: ShutdownCause = ShutdownCause(1); +pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_QMP_QUIT: ShutdownCause = ShutdownCause(2); +pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_QMP_SYSTEM_RESET: ShutdownCause = ShutdownCause(3); +pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_SIGNAL: ShutdownCause = ShutdownCause(4); +pub const ShutdownCause_SHUTDOWN_CAUSE_HOST_UI: ShutdownCause = ShutdownCause(5); +pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_SHUTDOWN: ShutdownCause = ShutdownCause(6); +pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_RESET: ShutdownCause = ShutdownCause(7); +pub const ShutdownCause_SHUTDOWN_CAUSE_GUEST_PANIC: ShutdownCause = ShutdownCause(8); +pub const ShutdownCause_SHUTDOWN_CAUSE_SUBSYSTEM_RESET: ShutdownCause = ShutdownCause(9); +pub const ShutdownCause_SHUTDOWN_CAUSE_SNAPSHOT_LOAD: ShutdownCause = ShutdownCause(10); +pub const ShutdownCause_SHUTDOWN_CAUSE__MAX: ShutdownCause = ShutdownCause(11); +impl ::std::ops::BitOr for ShutdownCause { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + ShutdownCause(self.0 | other.0) } } -impl ::std::fmt::Debug for CPUNegativeOffsetState { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "CPUNegativeOffsetState {{ tlb: {:?}, plugin_mem_cbs: {:?}, icount_decr: {:?}, can_do_io: {:?} }}", - self.tlb, self.plugin_mem_cbs, self.icount_decr, self.can_do_io - ) +impl ::std::ops::BitOrAssign for ShutdownCause { + #[inline] + fn bitor_assign(&mut self, rhs: ShutdownCause) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for ShutdownCause { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + ShutdownCause(self.0 & other.0) } } +impl ::std::ops::BitAndAssign for ShutdownCause { + #[inline] + fn bitand_assign(&mut self, rhs: ShutdownCause) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct ShutdownCause(pub ::std::os::raw::c_uint); #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct KVMState { - _unused: [u8; 0], +#[derive(Debug, Default, Copy, Clone)] +pub struct QemuLockCnt { + pub count: ::std::os::raw::c_uint, } +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of QemuLockCnt"][::std::mem::size_of::() - 4usize]; + ["Alignment of QemuLockCnt"][::std::mem::align_of::() - 4usize]; + ["Offset of field: QemuLockCnt::count"][::std::mem::offset_of!(QemuLockCnt, count) - 0usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct kvm_run { +pub struct CPUAddressSpace { _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct qemu_work_item { +pub struct CPUJumpCache { _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."] #[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, - pub running: bool, - pub has_waiter: bool, - pub halt_cond: *mut QemuCond, - pub thread_kicked: bool, - pub created: bool, - pub stop: bool, - pub stopped: bool, - pub start_powered_off: bool, - pub unplug: bool, - pub crash_occurred: bool, - pub exit_request: bool, - pub exclusive_context_count: ::std::os::raw::c_int, - pub cflags_next_tb: u32, - pub interrupt_request: u32, - pub singlestep_enabled: ::std::os::raw::c_int, - pub icount_budget: i64, - pub icount_extra: i64, - pub random_seed: u64, - pub jmp_env: sigjmp_buf, - pub work_mutex: QemuMutex, - pub work_list: CPUState__bindgen_ty_1, - pub cpu_ases: *mut CPUAddressSpace, - pub cpu_ases_count: ::std::os::raw::c_int, - pub num_ases: ::std::os::raw::c_int, - pub as_: *mut AddressSpace, - pub memory: *mut MemoryRegion, - pub tb_jmp_cache: *mut CPUJumpCache, - pub gdb_regs: *mut GArray, - pub gdb_num_regs: ::std::os::raw::c_int, - pub gdb_num_g_regs: ::std::os::raw::c_int, - pub node: CPUState__bindgen_ty_2, - pub breakpoints: CPUState__bindgen_ty_3, - pub watchpoints: CPUState__bindgen_ty_4, - pub watchpoint_hit: *mut CPUWatchpoint, - pub opaque: *mut ::std::os::raw::c_void, - pub mem_io_pc: usize, - pub kvm_fd: ::std::os::raw::c_int, - pub kvm_state: *mut KVMState, - pub kvm_run: *mut kvm_run, - pub kvm_dirty_gfns: *mut kvm_dirty_gfn, - pub kvm_fetch_index: u32, - pub dirty_pages: u64, - pub kvm_vcpu_stats_fd: ::std::os::raw::c_int, - pub vcpu_dirty: bool, - pub in_ioctl_lock: QemuLockCnt, - pub plugin_state: *mut CPUPluginState, - pub cpu_index: ::std::os::raw::c_int, - pub cluster_index: ::std::os::raw::c_int, - pub tcg_cflags: u32, - pub halted: u32, - pub exception_index: i32, - pub accel: *mut AccelCPUState, - pub throttle_thread_scheduled: bool, - pub throttle_us_per_full: i64, - 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, +#[derive(Debug, Copy, Clone)] +pub struct AccelCPUClass { + _unused: [u8; 0], } #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct CPUState__bindgen_ty_1 { - pub sqh_first: *mut qemu_work_item, - pub sqh_last: *mut *mut qemu_work_item, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUState__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; - ["Alignment of CPUState__bindgen_ty_1"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUState__bindgen_ty_1::sqh_first"] - [::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_first) - 0usize]; - ["Offset of field: CPUState__bindgen_ty_1::sqh_last"] - [::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_last) - 8usize]; -}; -impl Default for CPUState__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() - } - } +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 @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(Copy, Clone)] -pub union CPUState__bindgen_ty_2 { - pub tqe_next: *mut CPUState, - pub tqe_circ: QTailQLink, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of CPUState__bindgen_ty_2"][::std::mem::size_of::() - 16usize]; - ["Alignment of CPUState__bindgen_ty_2"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUState__bindgen_ty_2::tqe_next"] - [::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_next) - 0usize]; - ["Offset of field: CPUState__bindgen_ty_2::tqe_circ"] - [::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_circ) - 0usize]; +#[derive(Debug, Copy, Clone)] +pub struct CPUClass { + pub parent_class: DeviceClass, + pub class_by_name: ::std::option::Option< + unsafe extern "C" fn(cpu_model: *const ::std::os::raw::c_char) -> *mut ObjectClass, + >, + pub parse_features: ::std::option::Option< + unsafe extern "C" fn( + typename: *const ::std::os::raw::c_char, + str_: *mut ::std::os::raw::c_char, + errp: *mut *mut Error, + ), + >, + pub mmu_index: ::std::option::Option< + unsafe extern "C" fn(cpu: *mut CPUState, ifetch: bool) -> ::std::os::raw::c_int, + >, + pub memory_rw_debug: ::std::option::Option< + unsafe extern "C" fn( + cpu: *mut CPUState, + addr: vaddr, + buf: *mut u8, + len: usize, + is_write: bool, + ) -> ::std::os::raw::c_int, + >, + pub dump_state: ::std::option::Option< + unsafe extern "C" fn(cpu: *mut CPUState, arg1: *mut FILE, flags: ::std::os::raw::c_int), + >, + pub query_cpu_fast: + ::std::option::Option, + pub get_arch_id: ::std::option::Option i64>, + pub set_pc: ::std::option::Option, + pub get_pc: ::std::option::Option vaddr>, + pub gdb_read_register: ::std::option::Option< + unsafe extern "C" fn( + cpu: *mut CPUState, + buf: *mut GByteArray, + reg: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub gdb_write_register: ::std::option::Option< + unsafe extern "C" fn( + cpu: *mut CPUState, + buf: *mut u8, + reg: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int, + >, + pub gdb_adjust_breakpoint: + ::std::option::Option vaddr>, + pub gdb_core_xml_file: *const ::std::os::raw::c_char, + pub gdb_arch_name: + ::std::option::Option *const gchar>, + pub disas_set_info: ::std::option::Option< + unsafe extern "C" fn(cpu: *mut CPUState, info: *mut disassemble_info), + >, + pub deprecation_note: *const ::std::os::raw::c_char, + pub accel_cpu: *mut AccelCPUClass, + pub sysemu_ops: *const SysemuCPUOps, + pub tcg_ops: *const TCGCPUOps, + pub init_accel_cpu: ::std::option::Option< + unsafe extern "C" fn(accel_cpu: *mut AccelCPUClass, cc: *mut CPUClass), + >, + pub reset_dump_flags: ::std::os::raw::c_int, + pub gdb_num_core_regs: ::std::os::raw::c_int, + pub gdb_stop_before_watchpoint: bool, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["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]; + ["Offset of field: CPUClass::class_by_name"] + [::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::mmu_index"] + [::std::mem::offset_of!(CPUClass, mmu_index) - 200usize]; + ["Offset of field: CPUClass::memory_rw_debug"] + [::std::mem::offset_of!(CPUClass, memory_rw_debug) - 208usize]; + ["Offset of field: CPUClass::dump_state"] + [::std::mem::offset_of!(CPUClass, dump_state) - 216usize]; + ["Offset of field: CPUClass::query_cpu_fast"] + [::std::mem::offset_of!(CPUClass, query_cpu_fast) - 224usize]; + ["Offset of field: CPUClass::get_arch_id"] + [::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) - 256usize]; + ["Offset of field: CPUClass::gdb_write_register"] + [::std::mem::offset_of!(CPUClass, gdb_write_register) - 264usize]; + ["Offset of field: CPUClass::gdb_adjust_breakpoint"] + [::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) - 280usize]; + ["Offset of field: CPUClass::gdb_arch_name"] + [::std::mem::offset_of!(CPUClass, gdb_arch_name) - 288usize]; + ["Offset of field: CPUClass::disas_set_info"] + [::std::mem::offset_of!(CPUClass, disas_set_info) - 296usize]; + ["Offset of field: CPUClass::deprecation_note"] + [::std::mem::offset_of!(CPUClass, deprecation_note) - 304usize]; + ["Offset of field: CPUClass::accel_cpu"] + [::std::mem::offset_of!(CPUClass, accel_cpu) - 312usize]; + ["Offset of field: CPUClass::sysemu_ops"] + [::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) - 336usize]; + ["Offset of field: CPUClass::reset_dump_flags"] + [::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) - 348usize]; + ["Offset of field: CPUClass::gdb_stop_before_watchpoint"] + [::std::mem::offset_of!(CPUClass, gdb_stop_before_watchpoint) - 352usize]; }; -impl Default for CPUState__bindgen_ty_2 { +impl Default for CPUClass { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3874,28 +3640,55 @@ impl Default for CPUState__bindgen_ty_2 { } } } -impl ::std::fmt::Debug for CPUState__bindgen_ty_2 { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUState__bindgen_ty_2 {{ union }}") - } +#[repr(C)] +#[derive(Copy, Clone)] +pub struct CPUTLBEntryFull { + pub xlat_section: hwaddr, + pub phys_addr: hwaddr, + pub attrs: MemTxAttrs, + pub prot: u8, + pub lg_page_size: u8, + pub tlb_fill_flags: u8, + pub slow_flags: [u8; 3usize], + pub extra: CPUTLBEntryFull__bindgen_ty_1, } #[repr(C)] #[derive(Copy, Clone)] -pub union CPUState__bindgen_ty_3 { - pub tqh_first: *mut CPUBreakpoint, - pub tqh_circ: QTailQLink, +pub union CPUTLBEntryFull__bindgen_ty_1 { + pub arm: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1 { + pub pte_attrs: u8, + pub shareability: u8, + pub guarded: bool, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState__bindgen_ty_3"][::std::mem::size_of::() - 16usize]; - ["Alignment of CPUState__bindgen_ty_3"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUState__bindgen_ty_3::tqh_first"] - [::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_first) - 0usize]; - ["Offset of field: CPUState__bindgen_ty_3::tqh_circ"] - [::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_circ) - 0usize]; + ["Size of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::size_of::() - 3usize]; + ["Alignment of CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::pte_attrs"] + [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, pte_attrs) - 0usize]; + ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::shareability"][::std::mem::offset_of!( + CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, + shareability + ) - 1usize]; + ["Offset of field: CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1::guarded"] + [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1__bindgen_ty_1, guarded) - 2usize]; }; -impl Default for CPUState__bindgen_ty_3 { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUTLBEntryFull__bindgen_ty_1"] + [::std::mem::size_of::() - 3usize]; + ["Alignment of CPUTLBEntryFull__bindgen_ty_1"] + [::std::mem::align_of::() - 1usize]; + ["Offset of field: CPUTLBEntryFull__bindgen_ty_1::arm"] + [::std::mem::offset_of!(CPUTLBEntryFull__bindgen_ty_1, arm) - 0usize]; +}; +impl Default for CPUTLBEntryFull__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3904,28 +3697,85 @@ impl Default for CPUState__bindgen_ty_3 { } } } -impl ::std::fmt::Debug for CPUState__bindgen_ty_3 { +impl ::std::fmt::Debug for CPUTLBEntryFull__bindgen_ty_1 { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUState__bindgen_ty_3 {{ union }}") + write!(f, "CPUTLBEntryFull__bindgen_ty_1 {{ union }}") + } +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["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]; + ["Offset of field: CPUTLBEntryFull::phys_addr"] + [::std::mem::offset_of!(CPUTLBEntryFull, phys_addr) - 8usize]; + ["Offset of field: CPUTLBEntryFull::attrs"] + [::std::mem::offset_of!(CPUTLBEntryFull, attrs) - 16usize]; + ["Offset of field: CPUTLBEntryFull::prot"] + [::std::mem::offset_of!(CPUTLBEntryFull, prot) - 24usize]; + ["Offset of field: CPUTLBEntryFull::lg_page_size"] + [::std::mem::offset_of!(CPUTLBEntryFull, lg_page_size) - 25usize]; + ["Offset of field: CPUTLBEntryFull::tlb_fill_flags"] + [::std::mem::offset_of!(CPUTLBEntryFull, tlb_fill_flags) - 26usize]; + ["Offset of field: CPUTLBEntryFull::slow_flags"] + [::std::mem::offset_of!(CPUTLBEntryFull, slow_flags) - 27usize]; + ["Offset of field: CPUTLBEntryFull::extra"] + [::std::mem::offset_of!(CPUTLBEntryFull, extra) - 30usize]; +}; +impl Default for CPUTLBEntryFull { + 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 CPUTLBEntryFull { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "CPUTLBEntryFull {{ attrs: {:?}, slow_flags: {:?}, extra: {:?} }}", + self.attrs, self.slow_flags, self.extra + ) } } #[repr(C)] #[derive(Copy, Clone)] -pub union CPUState__bindgen_ty_4 { - pub tqh_first: *mut CPUWatchpoint, - pub tqh_circ: QTailQLink, +pub struct CPUTLBDesc { + pub large_page_addr: vaddr, + pub large_page_mask: vaddr, + pub window_begin_ns: i64, + pub window_max_entries: usize, + pub n_used_entries: usize, + pub vindex: usize, + pub vtable: [CPUTLBEntry; 8usize], + pub vfulltlb: [CPUTLBEntryFull; 8usize], + pub fulltlb: *mut CPUTLBEntryFull, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState__bindgen_ty_4"][::std::mem::size_of::() - 16usize]; - ["Alignment of CPUState__bindgen_ty_4"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: CPUState__bindgen_ty_4::tqh_first"] - [::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_first) - 0usize]; - ["Offset of field: CPUState__bindgen_ty_4::tqh_circ"] - [::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_circ) - 0usize]; + ["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]; + ["Offset of field: CPUTLBDesc::large_page_mask"] + [::std::mem::offset_of!(CPUTLBDesc, large_page_mask) - 8usize]; + ["Offset of field: CPUTLBDesc::window_begin_ns"] + [::std::mem::offset_of!(CPUTLBDesc, window_begin_ns) - 16usize]; + ["Offset of field: CPUTLBDesc::window_max_entries"] + [::std::mem::offset_of!(CPUTLBDesc, window_max_entries) - 24usize]; + ["Offset of field: CPUTLBDesc::n_used_entries"] + [::std::mem::offset_of!(CPUTLBDesc, n_used_entries) - 32usize]; + ["Offset of field: CPUTLBDesc::vindex"][::std::mem::offset_of!(CPUTLBDesc, vindex) - 40usize]; + ["Offset of field: CPUTLBDesc::vtable"][::std::mem::offset_of!(CPUTLBDesc, vtable) - 48usize]; + ["Offset of field: CPUTLBDesc::vfulltlb"] + [::std::mem::offset_of!(CPUTLBDesc, vfulltlb) - 304usize]; + ["Offset of field: CPUTLBDesc::fulltlb"] + [::std::mem::offset_of!(CPUTLBDesc, fulltlb) - 624usize]; }; -impl Default for CPUState__bindgen_ty_4 { +impl Default for CPUTLBDesc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -3934,126 +3784,54 @@ impl Default for CPUState__bindgen_ty_4 { } } } -impl ::std::fmt::Debug for CPUState__bindgen_ty_4 { +impl ::std::fmt::Debug for CPUTLBDesc { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "CPUState__bindgen_ty_4 {{ union }}") + write!( + f, + "CPUTLBDesc {{ vtable: {:?}, vfulltlb: {:?}, fulltlb: {:?} }}", + self.vtable, self.vfulltlb, self.fulltlb + ) } } +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct CPUTLBCommon { + pub lock: QemuSpin, + pub dirty: u16, + pub full_flush_count: usize, + pub part_flush_count: usize, + pub elide_flush_count: usize, +} #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of CPUState"][::std::mem::size_of::() - 10192usize]; - ["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::nr_threads"] - [::std::mem::offset_of!(CPUState, nr_threads) - 172usize]; - ["Offset of field: CPUState::thread"][::std::mem::offset_of!(CPUState, thread) - 176usize]; - ["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]; - ["Offset of field: CPUState::has_waiter"] - [::std::mem::offset_of!(CPUState, has_waiter) - 189usize]; - ["Offset of field: CPUState::halt_cond"] - [::std::mem::offset_of!(CPUState, halt_cond) - 192usize]; - ["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]; - ["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]; - ["Offset of field: CPUState::crash_occurred"] - [::std::mem::offset_of!(CPUState, crash_occurred) - 206usize]; - ["Offset of field: CPUState::exit_request"] - [::std::mem::offset_of!(CPUState, exit_request) - 207usize]; - ["Offset of field: CPUState::exclusive_context_count"] - [::std::mem::offset_of!(CPUState, exclusive_context_count) - 208usize]; - ["Offset of field: CPUState::cflags_next_tb"] - [::std::mem::offset_of!(CPUState, cflags_next_tb) - 212usize]; - ["Offset of field: CPUState::interrupt_request"] - [::std::mem::offset_of!(CPUState, interrupt_request) - 216usize]; - ["Offset of field: CPUState::singlestep_enabled"] - [::std::mem::offset_of!(CPUState, singlestep_enabled) - 220usize]; - ["Offset of field: CPUState::icount_budget"] - [::std::mem::offset_of!(CPUState, icount_budget) - 224usize]; - ["Offset of field: CPUState::icount_extra"] - [::std::mem::offset_of!(CPUState, icount_extra) - 232usize]; - ["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]; - ["Offset of field: CPUState::work_mutex"] - [::std::mem::offset_of!(CPUState, work_mutex) - 448usize]; - ["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]; - ["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]; - ["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]; - ["Offset of field: CPUState::gdb_num_regs"] - [::std::mem::offset_of!(CPUState, gdb_num_regs) - 560usize]; - ["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]; - ["Offset of field: CPUState::breakpoints"] - [::std::mem::offset_of!(CPUState, breakpoints) - 584usize]; - ["Offset of field: CPUState::watchpoints"] - [::std::mem::offset_of!(CPUState, watchpoints) - 600usize]; - ["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]; - ["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]; - ["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]; - ["Offset of field: CPUState::kvm_dirty_gfns"] - [::std::mem::offset_of!(CPUState, kvm_dirty_gfns) - 664usize]; - ["Offset of field: CPUState::kvm_fetch_index"] - [::std::mem::offset_of!(CPUState, kvm_fetch_index) - 672usize]; - ["Offset of field: CPUState::dirty_pages"] - [::std::mem::offset_of!(CPUState, dirty_pages) - 680usize]; - ["Offset of field: CPUState::kvm_vcpu_stats_fd"] - [::std::mem::offset_of!(CPUState, kvm_vcpu_stats_fd) - 688usize]; - ["Offset of field: CPUState::vcpu_dirty"] - [::std::mem::offset_of!(CPUState, vcpu_dirty) - 692usize]; - ["Offset of field: CPUState::in_ioctl_lock"] - [::std::mem::offset_of!(CPUState, in_ioctl_lock) - 696usize]; - ["Offset of field: CPUState::plugin_state"] - [::std::mem::offset_of!(CPUState, plugin_state) - 704usize]; - ["Offset of field: CPUState::cpu_index"] - [::std::mem::offset_of!(CPUState, cpu_index) - 712usize]; - ["Offset of field: CPUState::cluster_index"] - [::std::mem::offset_of!(CPUState, cluster_index) - 716usize]; - ["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]; - ["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]; - ["Offset of field: CPUState::throttle_thread_scheduled"] - [::std::mem::offset_of!(CPUState, throttle_thread_scheduled) - 744usize]; - ["Offset of field: CPUState::throttle_us_per_full"] - [::std::mem::offset_of!(CPUState, throttle_us_per_full) - 752usize]; - ["Offset of field: CPUState::ignore_memory_transaction_failures"] - [::std::mem::offset_of!(CPUState, ignore_memory_transaction_failures) - 760usize]; - ["Offset of field: CPUState::prctl_unalign_sigbus"] - [::std::mem::offset_of!(CPUState, prctl_unalign_sigbus) - 761usize]; - ["Offset of field: CPUState::iommu_notifiers"] - [::std::mem::offset_of!(CPUState, iommu_notifiers) - 768usize]; - ["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]; + ["Size of CPUTLBCommon"][::std::mem::size_of::() - 32usize]; + ["Alignment of CPUTLBCommon"][::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUTLBCommon::lock"][::std::mem::offset_of!(CPUTLBCommon, lock) - 0usize]; + ["Offset of field: CPUTLBCommon::dirty"][::std::mem::offset_of!(CPUTLBCommon, dirty) - 4usize]; + ["Offset of field: CPUTLBCommon::full_flush_count"] + [::std::mem::offset_of!(CPUTLBCommon, full_flush_count) - 8usize]; + ["Offset of field: CPUTLBCommon::part_flush_count"] + [::std::mem::offset_of!(CPUTLBCommon, part_flush_count) - 16usize]; + ["Offset of field: CPUTLBCommon::elide_flush_count"] + [::std::mem::offset_of!(CPUTLBCommon, elide_flush_count) - 24usize]; }; -impl Default for CPUState { +#[repr(C)] +#[repr(align(16))] +#[derive(Copy, Clone)] +pub struct CPUTLB { + pub c: CPUTLBCommon, + pub d: [CPUTLBDesc; 16usize], + pub f: [CPUTLBDescFast; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["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) - 10144usize]; +}; +impl Default for CPUTLB { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -4062,106 +3840,46 @@ impl Default for CPUState { } } } -impl ::std::fmt::Debug for CPUState { +impl ::std::fmt::Debug for CPUTLB { 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: {:?} }}", - self.parent_obj, - self.cc, - self.nr_cores, - self.nr_threads, - self.thread, - self.thread_id, - self.running, - self.has_waiter, - self.halt_cond, - self.thread_kicked, - self.created, - self.stop, - self.stopped, - self.start_powered_off, - self.unplug, - self.crash_occurred, - self.exit_request, - self.exclusive_context_count, - self.singlestep_enabled, - self.jmp_env, - self.work_mutex, - self.work_list, - self.cpu_ases, - self.cpu_ases_count, - self.num_ases, - self.as_, - self.memory, - self.tb_jmp_cache, - self.gdb_regs, - self.gdb_num_regs, - self.gdb_num_g_regs, - self.node, - self.breakpoints, - self.watchpoints, - self.watchpoint_hit, - self.opaque, - self.kvm_fd, - self.kvm_state, - self.kvm_run, - self.kvm_dirty_gfns, - self.kvm_vcpu_stats_fd, - self.vcpu_dirty, - self.in_ioctl_lock, - self.plugin_state, - self.cpu_index, - self.cluster_index, - self.accel, - self.throttle_thread_scheduled, - self.ignore_memory_transaction_failures, - self.prctl_unalign_sigbus, - self.iommu_notifiers, - self.neg_align, - self.neg + "CPUTLB {{ c: {:?}, d: {:?}, f: {:?} }}", + self.c, self.d, self.f ) } } -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, +pub union IcountDecr { + pub u32_: u32, + pub u16_: IcountDecr__bindgen_ty_1, } #[repr(C)] -#[derive(Copy, Clone)] -pub union Property__bindgen_ty_1 { - pub i: i64, - pub u: u64, +#[derive(Debug, Default, Copy, Clone)] +pub struct IcountDecr__bindgen_ty_1 { + pub low: u16, + pub high: u16, } #[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]; + ["Size of IcountDecr__bindgen_ty_1"] + [::std::mem::size_of::() - 4usize]; + ["Alignment of IcountDecr__bindgen_ty_1"] + [::std::mem::align_of::() - 2usize]; + ["Offset of field: IcountDecr__bindgen_ty_1::low"] + [::std::mem::offset_of!(IcountDecr__bindgen_ty_1, low) - 0usize]; + ["Offset of field: IcountDecr__bindgen_ty_1::high"] + [::std::mem::offset_of!(IcountDecr__bindgen_ty_1, high) - 2usize]; }; -impl Default for Property__bindgen_ty_1 { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of IcountDecr"][::std::mem::size_of::() - 4usize]; + ["Alignment of IcountDecr"][::std::mem::align_of::() - 4usize]; + ["Offset of field: IcountDecr::u32_"][::std::mem::offset_of!(IcountDecr, u32_) - 0usize]; + ["Offset of field: IcountDecr::u16_"][::std::mem::offset_of!(IcountDecr, u16_) - 0usize]; +}; +impl Default for IcountDecr { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -4170,31 +3888,43 @@ impl Default for Property__bindgen_ty_1 { } } } -impl ::std::fmt::Debug for Property__bindgen_ty_1 { +impl ::std::fmt::Debug for IcountDecr { fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!(f, "Property__bindgen_ty_1 {{ union }}") + write!(f, "IcountDecr {{ union }}") } } +#[doc = " CPUNegativeOffsetState: Elements of CPUState most efficiently accessed\n from CPUArchState, via small negative offsets.\n @can_do_io: True if memory-mapped IO is allowed.\n @plugin_mem_cbs: active plugin memory callbacks\n @plugin_mem_value_low: 64 lower bits of latest accessed mem value.\n @plugin_mem_value_high: 64 higher bits of latest accessed mem value."] +#[repr(C)] +#[repr(align(16))] +#[derive(Copy, Clone)] +pub struct CPUNegativeOffsetState { + pub tlb: CPUTLB, + pub plugin_mem_cbs: *mut GArray, + pub plugin_mem_value_low: u64, + pub plugin_mem_value_high: u64, + pub icount_decr: IcountDecr, + pub can_do_io: bool, +} #[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]; + ["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) - 10400usize]; + ["Offset of field: CPUNegativeOffsetState::plugin_mem_value_low"] + [::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) - 10416usize]; + ["Offset of field: CPUNegativeOffsetState::icount_decr"] + [::std::mem::offset_of!(CPUNegativeOffsetState, icount_decr) - 10424usize]; + ["Offset of field: CPUNegativeOffsetState::can_do_io"] + [::std::mem::offset_of!(CPUNegativeOffsetState, can_do_io) - 10428usize]; }; -impl Default for Property { +impl Default for CPUNegativeOffsetState { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -4203,72 +3933,116 @@ impl Default for Property { } } } -impl ::std::fmt::Debug for Property { +impl ::std::fmt::Debug for CPUNegativeOffsetState { 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 + "CPUNegativeOffsetState {{ tlb: {:?}, plugin_mem_cbs: {:?}, icount_decr: {:?}, can_do_io: {:?} }}", + self.tlb, self.plugin_mem_cbs, self.icount_decr, self.can_do_io ) } } #[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, +pub struct KVMState { + _unused: [u8; 0], } -#[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]; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct kvm_run { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +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_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_threads: ::std::os::raw::c_int, + pub thread: *mut QemuThread, + pub thread_id: ::std::os::raw::c_int, + pub running: bool, + pub has_waiter: bool, + pub halt_cond: *mut QemuCond, + pub thread_kicked: bool, + pub created: bool, + pub stop: bool, + pub stopped: bool, + pub start_powered_off: bool, + pub unplug: bool, + pub crash_occurred: bool, + pub exit_request: bool, + pub exclusive_context_count: ::std::os::raw::c_int, + pub cflags_next_tb: u32, + pub interrupt_request: u32, + pub singlestep_enabled: ::std::os::raw::c_int, + pub icount_budget: i64, + pub icount_extra: i64, + pub random_seed: u64, + pub jmp_env: sigjmp_buf, + pub work_mutex: QemuMutex, + pub work_list: CPUState__bindgen_ty_1, + pub cpu_ases: *mut CPUAddressSpace, + pub cpu_ases_count: ::std::os::raw::c_int, + pub num_ases: ::std::os::raw::c_int, + pub as_: *mut AddressSpace, + pub memory: *mut MemoryRegion, + pub tb_jmp_cache: *mut CPUJumpCache, + pub gdb_regs: *mut GArray, + pub gdb_num_regs: ::std::os::raw::c_int, + pub gdb_num_g_regs: ::std::os::raw::c_int, + pub node: CPUState__bindgen_ty_2, + pub breakpoints: CPUState__bindgen_ty_3, + pub watchpoints: CPUState__bindgen_ty_4, + pub watchpoint_hit: *mut CPUWatchpoint, + pub opaque: *mut ::std::os::raw::c_void, + pub mem_io_pc: usize, + pub kvm_fd: ::std::os::raw::c_int, + pub kvm_state: *mut KVMState, + pub kvm_run: *mut kvm_run, + pub kvm_dirty_gfns: *mut kvm_dirty_gfn, + pub kvm_fetch_index: u32, + pub dirty_pages: u64, + pub kvm_vcpu_stats_fd: ::std::os::raw::c_int, + pub vcpu_dirty: bool, + pub in_ioctl_lock: QemuLockCnt, + pub plugin_state: *mut CPUPluginState, + pub cpu_index: ::std::os::raw::c_int, + pub cluster_index: ::std::os::raw::c_int, + pub tcg_cflags: u32, + pub halted: u32, + pub exception_index: i32, + pub accel: *mut AccelCPUState, + pub throttle_thread_scheduled: bool, + pub throttle_us_per_full: i64, + pub ignore_memory_transaction_failures: bool, + pub prctl_unalign_sigbus: bool, + pub iommu_notifiers: *mut GArray, + pub neg_align: __IncompleteArrayField<::std::os::raw::c_char>, + pub neg: CPUNegativeOffsetState, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct CPUState__bindgen_ty_1 { + pub sqh_first: *mut qemu_work_item, + pub sqh_last: *mut *mut qemu_work_item, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUState__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Alignment of CPUState__bindgen_ty_1"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUState__bindgen_ty_1::sqh_first"] + [::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_first) - 0usize]; + ["Offset of field: CPUState__bindgen_ty_1::sqh_last"] + [::std::mem::offset_of!(CPUState__bindgen_ty_1, sqh_last) - 8usize]; }; -impl Default for PropertyInfo { +impl Default for CPUState__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -4277,193 +4051,491 @@ impl Default for PropertyInfo { } } } -#[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); -pub const MemOp_MO_16: MemOp = MemOp(1); -pub const MemOp_MO_32: MemOp = MemOp(2); -pub const MemOp_MO_64: MemOp = MemOp(3); -pub const MemOp_MO_128: MemOp = MemOp(4); -pub const MemOp_MO_256: MemOp = MemOp(5); -pub const MemOp_MO_512: MemOp = MemOp(6); -pub const MemOp_MO_1024: MemOp = MemOp(7); -pub const MemOp_MO_SIZE: MemOp = MemOp(7); -pub const MemOp_MO_SIGN: MemOp = MemOp(8); -pub const MemOp_MO_BSWAP: MemOp = MemOp(16); -pub const MemOp_MO_LE: MemOp = MemOp(0); -pub const MemOp_MO_BE: MemOp = MemOp(16); -pub const MemOp_MO_TE: MemOp = MemOp(0); -pub const MemOp_MO_ASHIFT: MemOp = MemOp(5); -pub const MemOp_MO_AMASK: MemOp = MemOp(224); -pub const MemOp_MO_UNALN: MemOp = MemOp(0); -pub const MemOp_MO_ALIGN_2: MemOp = MemOp(32); -pub const MemOp_MO_ALIGN_4: MemOp = MemOp(64); -pub const MemOp_MO_ALIGN_8: MemOp = MemOp(96); -pub const MemOp_MO_ALIGN_16: MemOp = MemOp(128); -pub const MemOp_MO_ALIGN_32: MemOp = MemOp(160); -pub const MemOp_MO_ALIGN_64: MemOp = MemOp(192); -pub const MemOp_MO_ALIGN: MemOp = MemOp(224); -pub const MemOp_MO_ATOM_SHIFT: MemOp = MemOp(8); -pub const MemOp_MO_ATOM_IFALIGN: MemOp = MemOp(0); -pub const MemOp_MO_ATOM_IFALIGN_PAIR: MemOp = MemOp(256); -pub const MemOp_MO_ATOM_WITHIN16: MemOp = MemOp(512); -pub const MemOp_MO_ATOM_WITHIN16_PAIR: MemOp = MemOp(768); -pub const MemOp_MO_ATOM_SUBALIGN: MemOp = MemOp(1024); -pub const MemOp_MO_ATOM_NONE: MemOp = MemOp(1280); -pub const MemOp_MO_ATOM_MASK: MemOp = MemOp(1792); -pub const MemOp_MO_UB: MemOp = MemOp(0); -pub const MemOp_MO_UW: MemOp = MemOp(1); -pub const MemOp_MO_UL: MemOp = MemOp(2); -pub const MemOp_MO_UQ: MemOp = MemOp(3); -pub const MemOp_MO_UO: MemOp = MemOp(4); -pub const MemOp_MO_SB: MemOp = MemOp(8); -pub const MemOp_MO_SW: MemOp = MemOp(9); -pub const MemOp_MO_SL: MemOp = MemOp(10); -pub const MemOp_MO_SQ: MemOp = MemOp(11); -pub const MemOp_MO_SO: MemOp = MemOp(12); -pub const MemOp_MO_LEUW: MemOp = MemOp(1); -pub const MemOp_MO_LEUL: MemOp = MemOp(2); -pub const MemOp_MO_LEUQ: MemOp = MemOp(3); -pub const MemOp_MO_LESW: MemOp = MemOp(9); -pub const MemOp_MO_LESL: MemOp = MemOp(10); -pub const MemOp_MO_LESQ: MemOp = MemOp(11); -pub const MemOp_MO_BEUW: MemOp = MemOp(17); -pub const MemOp_MO_BEUL: MemOp = MemOp(18); -pub const MemOp_MO_BEUQ: MemOp = MemOp(19); -pub const MemOp_MO_BESW: MemOp = MemOp(25); -pub const MemOp_MO_BESL: MemOp = MemOp(26); -pub const MemOp_MO_BESQ: MemOp = MemOp(27); -pub const MemOp_MO_TEUW: MemOp = MemOp(1); -pub const MemOp_MO_TEUL: MemOp = MemOp(2); -pub const MemOp_MO_TEUQ: MemOp = MemOp(3); -pub const MemOp_MO_TEUO: MemOp = MemOp(4); -pub const MemOp_MO_TESW: MemOp = MemOp(9); -pub const MemOp_MO_TESL: MemOp = MemOp(10); -pub const MemOp_MO_TESQ: MemOp = MemOp(11); -pub const MemOp_MO_SSIZE: MemOp = MemOp(15); -impl ::std::ops::BitOr for MemOp { - type Output = Self; - #[inline] - fn bitor(self, other: Self) -> Self { - MemOp(self.0 | other.0) +#[repr(C)] +#[derive(Copy, Clone)] +pub union CPUState__bindgen_ty_2 { + pub tqe_next: *mut CPUState, + pub tqe_circ: QTailQLink, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUState__bindgen_ty_2"][::std::mem::size_of::() - 16usize]; + ["Alignment of CPUState__bindgen_ty_2"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUState__bindgen_ty_2::tqe_next"] + [::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_next) - 0usize]; + ["Offset of field: CPUState__bindgen_ty_2::tqe_circ"] + [::std::mem::offset_of!(CPUState__bindgen_ty_2, tqe_circ) - 0usize]; +}; +impl Default for CPUState__bindgen_ty_2 { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } -impl ::std::ops::BitOrAssign for MemOp { - #[inline] - fn bitor_assign(&mut self, rhs: MemOp) { - self.0 |= rhs.0; +impl ::std::fmt::Debug for CPUState__bindgen_ty_2 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "CPUState__bindgen_ty_2 {{ union }}") } } -impl ::std::ops::BitAnd for MemOp { - type Output = Self; - #[inline] - fn bitand(self, other: Self) -> Self { - MemOp(self.0 & other.0) +#[repr(C)] +#[derive(Copy, Clone)] +pub union CPUState__bindgen_ty_3 { + pub tqh_first: *mut CPUBreakpoint, + pub tqh_circ: QTailQLink, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of CPUState__bindgen_ty_3"][::std::mem::size_of::() - 16usize]; + ["Alignment of CPUState__bindgen_ty_3"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUState__bindgen_ty_3::tqh_first"] + [::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_first) - 0usize]; + ["Offset of field: CPUState__bindgen_ty_3::tqh_circ"] + [::std::mem::offset_of!(CPUState__bindgen_ty_3, tqh_circ) - 0usize]; +}; +impl Default for CPUState__bindgen_ty_3 { + 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::ops::BitAndAssign for MemOp { - #[inline] - fn bitand_assign(&mut self, rhs: MemOp) { - self.0 &= rhs.0; +impl ::std::fmt::Debug for CPUState__bindgen_ty_3 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "CPUState__bindgen_ty_3 {{ union }}") } } -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct MemOp(pub ::std::os::raw::c_uint); -pub type float16 = u16; -pub type float32 = u32; -pub type float64 = u64; #[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct floatx80 { - pub low: u64, - pub high: u16, +#[derive(Copy, Clone)] +pub union CPUState__bindgen_ty_4 { + pub tqh_first: *mut CPUWatchpoint, + pub tqh_circ: QTailQLink, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of floatx80"][::std::mem::size_of::() - 16usize]; - ["Alignment of floatx80"][::std::mem::align_of::() - 8usize]; - ["Offset of field: floatx80::low"][::std::mem::offset_of!(floatx80, low) - 0usize]; - ["Offset of field: floatx80::high"][::std::mem::offset_of!(floatx80, high) - 8usize]; + ["Size of CPUState__bindgen_ty_4"][::std::mem::size_of::() - 16usize]; + ["Alignment of CPUState__bindgen_ty_4"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: CPUState__bindgen_ty_4::tqh_first"] + [::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_first) - 0usize]; + ["Offset of field: CPUState__bindgen_ty_4::tqh_circ"] + [::std::mem::offset_of!(CPUState__bindgen_ty_4, tqh_circ) - 0usize]; }; -pub const FloatRoundMode_float_round_nearest_even: FloatRoundMode = FloatRoundMode(0); -pub const FloatRoundMode_float_round_down: FloatRoundMode = FloatRoundMode(1); -pub const FloatRoundMode_float_round_up: FloatRoundMode = FloatRoundMode(2); -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); -impl ::std::ops::BitOr for FloatRoundMode { - type Output = Self; - #[inline] - fn bitor(self, other: Self) -> Self { - FloatRoundMode(self.0 | other.0) +impl Default for CPUState__bindgen_ty_4 { + 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::ops::BitOrAssign for FloatRoundMode { - #[inline] - fn bitor_assign(&mut self, rhs: FloatRoundMode) { - self.0 |= rhs.0; +impl ::std::fmt::Debug for CPUState__bindgen_ty_4 { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!(f, "CPUState__bindgen_ty_4 {{ union }}") } } -impl ::std::ops::BitAnd for FloatRoundMode { - type Output = Self; - #[inline] - fn bitand(self, other: Self) -> Self { - FloatRoundMode(self.0 & other.0) +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["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) - 152usize]; + ["Offset of field: CPUState::nr_threads"] + [::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) - 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) - 181usize]; + ["Offset of field: CPUState::halt_cond"] + [::std::mem::offset_of!(CPUState, halt_cond) - 184usize]; + ["Offset of field: CPUState::thread_kicked"] + [::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) - 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) - 198usize]; + ["Offset of field: CPUState::exit_request"] + [::std::mem::offset_of!(CPUState, exit_request) - 199usize]; + ["Offset of field: CPUState::exclusive_context_count"] + [::std::mem::offset_of!(CPUState, exclusive_context_count) - 200usize]; + ["Offset of field: CPUState::cflags_next_tb"] + [::std::mem::offset_of!(CPUState, cflags_next_tb) - 204usize]; + ["Offset of field: CPUState::interrupt_request"] + [::std::mem::offset_of!(CPUState, interrupt_request) - 208usize]; + ["Offset of field: CPUState::singlestep_enabled"] + [::std::mem::offset_of!(CPUState, singlestep_enabled) - 212usize]; + ["Offset of field: CPUState::icount_budget"] + [::std::mem::offset_of!(CPUState, icount_budget) - 216usize]; + ["Offset of field: CPUState::icount_extra"] + [::std::mem::offset_of!(CPUState, icount_extra) - 224usize]; + ["Offset of field: CPUState::random_seed"] + [::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) - 440usize]; + ["Offset of field: CPUState::work_list"] + [::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) - 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) - 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) - 552usize]; + ["Offset of field: CPUState::gdb_num_g_regs"] + [::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) - 576usize]; + ["Offset of field: CPUState::watchpoints"] + [::std::mem::offset_of!(CPUState, watchpoints) - 592usize]; + ["Offset of field: CPUState::watchpoint_hit"] + [::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) - 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) - 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) - 656usize]; + ["Offset of field: CPUState::kvm_fetch_index"] + [::std::mem::offset_of!(CPUState, kvm_fetch_index) - 664usize]; + ["Offset of field: CPUState::dirty_pages"] + [::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) - 680usize]; + ["Offset of field: CPUState::vcpu_dirty"] + [::std::mem::offset_of!(CPUState, vcpu_dirty) - 684usize]; + ["Offset of field: CPUState::in_ioctl_lock"] + [::std::mem::offset_of!(CPUState, in_ioctl_lock) - 688usize]; + ["Offset of field: CPUState::plugin_state"] + [::std::mem::offset_of!(CPUState, plugin_state) - 696usize]; + ["Offset of field: CPUState::cpu_index"] + [::std::mem::offset_of!(CPUState, cpu_index) - 704usize]; + ["Offset of field: CPUState::cluster_index"] + [::std::mem::offset_of!(CPUState, cluster_index) - 708usize]; + ["Offset of field: CPUState::tcg_cflags"] + [::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) - 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) - 736usize]; + ["Offset of field: CPUState::throttle_us_per_full"] + [::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) - 752usize]; + ["Offset of field: CPUState::prctl_unalign_sigbus"] + [::std::mem::offset_of!(CPUState, prctl_unalign_sigbus) - 753usize]; + ["Offset of field: CPUState::iommu_notifiers"] + [::std::mem::offset_of!(CPUState, iommu_notifiers) - 760usize]; + ["Offset of field: CPUState::neg_align"] + [::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 { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } } } -impl ::std::ops::BitAndAssign for FloatRoundMode { - #[inline] - fn bitand_assign(&mut self, rhs: FloatRoundMode) { - self.0 &= rhs.0; +impl ::std::fmt::Debug for CPUState { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "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_threads, + self.thread, + self.thread_id, + self.running, + self.has_waiter, + self.halt_cond, + self.thread_kicked, + self.created, + self.stop, + self.stopped, + self.start_powered_off, + self.unplug, + self.crash_occurred, + self.exit_request, + self.exclusive_context_count, + self.singlestep_enabled, + self.jmp_env, + self.work_mutex, + self.work_list, + self.cpu_ases, + self.cpu_ases_count, + self.num_ases, + self.as_, + self.memory, + self.tb_jmp_cache, + self.gdb_regs, + self.gdb_num_regs, + self.gdb_num_g_regs, + self.node, + self.breakpoints, + self.watchpoints, + self.watchpoint_hit, + self.opaque, + self.kvm_fd, + self.kvm_state, + self.kvm_run, + self.kvm_dirty_gfns, + self.kvm_vcpu_stats_fd, + self.vcpu_dirty, + self.in_ioctl_lock, + self.plugin_state, + self.cpu_index, + self.cluster_index, + self.accel, + self.throttle_thread_scheduled, + self.ignore_memory_transaction_failures, + self.prctl_unalign_sigbus, + self.iommu_notifiers, + self.neg_align, + self.neg + ) } } -#[repr(transparent)] -#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct FloatRoundMode(pub ::std::os::raw::c_uchar); -pub const FloatX80RoundPrec_floatx80_precision_x: FloatX80RoundPrec = FloatX80RoundPrec(0); -pub const FloatX80RoundPrec_floatx80_precision_d: FloatX80RoundPrec = FloatX80RoundPrec(1); -pub const FloatX80RoundPrec_floatx80_precision_s: FloatX80RoundPrec = FloatX80RoundPrec(2); -impl ::std::ops::BitOr for FloatX80RoundPrec { +unsafe extern "C" { + #[doc = " cpu_reset:\n @cpu: The CPU whose state is to be reset."] + pub fn cpu_reset(cpu: *mut CPUState); +} +#[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); +pub const MemOp_MO_16: MemOp = MemOp(1); +pub const MemOp_MO_32: MemOp = MemOp(2); +pub const MemOp_MO_64: MemOp = MemOp(3); +pub const MemOp_MO_128: MemOp = MemOp(4); +pub const MemOp_MO_256: MemOp = MemOp(5); +pub const MemOp_MO_512: MemOp = MemOp(6); +pub const MemOp_MO_1024: MemOp = MemOp(7); +pub const MemOp_MO_SIZE: MemOp = MemOp(7); +pub const MemOp_MO_SIGN: MemOp = MemOp(8); +pub const MemOp_MO_BSWAP: MemOp = MemOp(16); +pub const MemOp_MO_LE: MemOp = MemOp(0); +pub const MemOp_MO_BE: MemOp = MemOp(16); +pub const MemOp_MO_TE: MemOp = MemOp(0); +pub const MemOp_MO_ASHIFT: MemOp = MemOp(5); +pub const MemOp_MO_AMASK: MemOp = MemOp(224); +pub const MemOp_MO_UNALN: MemOp = MemOp(0); +pub const MemOp_MO_ALIGN_2: MemOp = MemOp(32); +pub const MemOp_MO_ALIGN_4: MemOp = MemOp(64); +pub const MemOp_MO_ALIGN_8: MemOp = MemOp(96); +pub const MemOp_MO_ALIGN_16: MemOp = MemOp(128); +pub const MemOp_MO_ALIGN_32: MemOp = MemOp(160); +pub const MemOp_MO_ALIGN_64: MemOp = MemOp(192); +pub const MemOp_MO_ALIGN: MemOp = MemOp(224); +pub const MemOp_MO_ATOM_SHIFT: MemOp = MemOp(8); +pub const MemOp_MO_ATOM_IFALIGN: MemOp = MemOp(0); +pub const MemOp_MO_ATOM_IFALIGN_PAIR: MemOp = MemOp(256); +pub const MemOp_MO_ATOM_WITHIN16: MemOp = MemOp(512); +pub const MemOp_MO_ATOM_WITHIN16_PAIR: MemOp = MemOp(768); +pub const MemOp_MO_ATOM_SUBALIGN: MemOp = MemOp(1024); +pub const MemOp_MO_ATOM_NONE: MemOp = MemOp(1280); +pub const MemOp_MO_ATOM_MASK: MemOp = MemOp(1792); +pub const MemOp_MO_UB: MemOp = MemOp(0); +pub const MemOp_MO_UW: MemOp = MemOp(1); +pub const MemOp_MO_UL: MemOp = MemOp(2); +pub const MemOp_MO_UQ: MemOp = MemOp(3); +pub const MemOp_MO_UO: MemOp = MemOp(4); +pub const MemOp_MO_SB: MemOp = MemOp(8); +pub const MemOp_MO_SW: MemOp = MemOp(9); +pub const MemOp_MO_SL: MemOp = MemOp(10); +pub const MemOp_MO_SQ: MemOp = MemOp(11); +pub const MemOp_MO_SO: MemOp = MemOp(12); +pub const MemOp_MO_LEUW: MemOp = MemOp(1); +pub const MemOp_MO_LEUL: MemOp = MemOp(2); +pub const MemOp_MO_LEUQ: MemOp = MemOp(3); +pub const MemOp_MO_LESW: MemOp = MemOp(9); +pub const MemOp_MO_LESL: MemOp = MemOp(10); +pub const MemOp_MO_LESQ: MemOp = MemOp(11); +pub const MemOp_MO_BEUW: MemOp = MemOp(17); +pub const MemOp_MO_BEUL: MemOp = MemOp(18); +pub const MemOp_MO_BEUQ: MemOp = MemOp(19); +pub const MemOp_MO_BESW: MemOp = MemOp(25); +pub const MemOp_MO_BESL: MemOp = MemOp(26); +pub const MemOp_MO_BESQ: MemOp = MemOp(27); +pub const MemOp_MO_TEUW: MemOp = MemOp(1); +pub const MemOp_MO_TEUL: MemOp = MemOp(2); +pub const MemOp_MO_TEUQ: MemOp = MemOp(3); +pub const MemOp_MO_TEUO: MemOp = MemOp(4); +pub const MemOp_MO_TESW: MemOp = MemOp(9); +pub const MemOp_MO_TESL: MemOp = MemOp(10); +pub const MemOp_MO_TESQ: MemOp = MemOp(11); +pub const MemOp_MO_SSIZE: MemOp = MemOp(15); +impl ::std::ops::BitOr for MemOp { type Output = Self; #[inline] fn bitor(self, other: Self) -> Self { - FloatX80RoundPrec(self.0 | other.0) + MemOp(self.0 | other.0) } } -impl ::std::ops::BitOrAssign for FloatX80RoundPrec { +impl ::std::ops::BitOrAssign for MemOp { #[inline] - fn bitor_assign(&mut self, rhs: FloatX80RoundPrec) { + fn bitor_assign(&mut self, rhs: MemOp) { self.0 |= rhs.0; } } -impl ::std::ops::BitAnd for FloatX80RoundPrec { +impl ::std::ops::BitAnd for MemOp { type Output = Self; #[inline] fn bitand(self, other: Self) -> Self { - FloatX80RoundPrec(self.0 & other.0) + MemOp(self.0 & other.0) } } -impl ::std::ops::BitAndAssign for FloatX80RoundPrec { +impl ::std::ops::BitAndAssign for MemOp { #[inline] - fn bitand_assign(&mut self, rhs: FloatX80RoundPrec) { + fn bitand_assign(&mut self, rhs: MemOp) { self.0 &= rhs.0; } } #[repr(transparent)] #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] -pub struct FloatX80RoundPrec(pub ::std::os::raw::c_uchar); -pub const Float2NaNPropRule_float_2nan_prop_none: Float2NaNPropRule = Float2NaNPropRule(0); -pub const Float2NaNPropRule_float_2nan_prop_s_ab: Float2NaNPropRule = Float2NaNPropRule(1); -pub const Float2NaNPropRule_float_2nan_prop_s_ba: Float2NaNPropRule = Float2NaNPropRule(2); -pub const Float2NaNPropRule_float_2nan_prop_ab: Float2NaNPropRule = Float2NaNPropRule(3); -pub const Float2NaNPropRule_float_2nan_prop_ba: Float2NaNPropRule = Float2NaNPropRule(4); -pub const Float2NaNPropRule_float_2nan_prop_x87: Float2NaNPropRule = Float2NaNPropRule(5); -impl ::std::ops::BitOr for Float2NaNPropRule { - type Output = Self; - #[inline] - fn bitor(self, other: Self) -> Self { +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; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone)] +pub struct floatx80 { + pub low: u64, + pub high: u16, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of floatx80"][::std::mem::size_of::() - 16usize]; + ["Alignment of floatx80"][::std::mem::align_of::() - 8usize]; + ["Offset of field: floatx80::low"][::std::mem::offset_of!(floatx80, low) - 0usize]; + ["Offset of field: floatx80::high"][::std::mem::offset_of!(floatx80, high) - 8usize]; +}; +pub const FloatRoundMode_float_round_nearest_even: FloatRoundMode = FloatRoundMode(0); +pub const FloatRoundMode_float_round_down: FloatRoundMode = FloatRoundMode(1); +pub const FloatRoundMode_float_round_up: FloatRoundMode = FloatRoundMode(2); +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] + fn bitor(self, other: Self) -> Self { + FloatRoundMode(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for FloatRoundMode { + #[inline] + fn bitor_assign(&mut self, rhs: FloatRoundMode) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for FloatRoundMode { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + FloatRoundMode(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for FloatRoundMode { + #[inline] + fn bitand_assign(&mut self, rhs: FloatRoundMode) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct FloatRoundMode(pub ::std::os::raw::c_uchar); +pub const FloatX80RoundPrec_floatx80_precision_x: FloatX80RoundPrec = FloatX80RoundPrec(0); +pub const FloatX80RoundPrec_floatx80_precision_d: FloatX80RoundPrec = FloatX80RoundPrec(1); +pub const FloatX80RoundPrec_floatx80_precision_s: FloatX80RoundPrec = FloatX80RoundPrec(2); +impl ::std::ops::BitOr for FloatX80RoundPrec { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { + FloatX80RoundPrec(self.0 | other.0) + } +} +impl ::std::ops::BitOrAssign for FloatX80RoundPrec { + #[inline] + fn bitor_assign(&mut self, rhs: FloatX80RoundPrec) { + self.0 |= rhs.0; + } +} +impl ::std::ops::BitAnd for FloatX80RoundPrec { + type Output = Self; + #[inline] + fn bitand(self, other: Self) -> Self { + FloatX80RoundPrec(self.0 & other.0) + } +} +impl ::std::ops::BitAndAssign for FloatX80RoundPrec { + #[inline] + fn bitand_assign(&mut self, rhs: FloatX80RoundPrec) { + self.0 &= rhs.0; + } +} +#[repr(transparent)] +#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)] +pub struct FloatX80RoundPrec(pub ::std::os::raw::c_uchar); +pub const Float2NaNPropRule_float_2nan_prop_none: Float2NaNPropRule = Float2NaNPropRule(0); +pub const Float2NaNPropRule_float_2nan_prop_s_ab: Float2NaNPropRule = Float2NaNPropRule(1); +pub const Float2NaNPropRule_float_2nan_prop_s_ba: Float2NaNPropRule = Float2NaNPropRule(2); +pub const Float2NaNPropRule_float_2nan_prop_ab: Float2NaNPropRule = Float2NaNPropRule(3); +pub const Float2NaNPropRule_float_2nan_prop_ba: Float2NaNPropRule = Float2NaNPropRule(4); +pub const Float2NaNPropRule_float_2nan_prop_x87: Float2NaNPropRule = Float2NaNPropRule(5); +impl ::std::ops::BitOr for Float2NaNPropRule { + type Output = Self; + #[inline] + fn bitor(self, other: Self) -> Self { Float2NaNPropRule(self.0 | other.0) } } @@ -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, @@ -5656,611 +5884,237 @@ impl ::std::fmt::Debug for CPUArchState { self.mtrr_fixed, self.mtrr_var, self.tsc_valid, - self.mce_banks, - self.tpr_access_type, - self.nr_dies, - self.nr_modules, - self.avail_cpu_topo - ) - } -} -pub type CPUX86State = CPUArchState; -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct kvm_msrs { - _unused: [u8; 0], -} -#[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."] -#[repr(C)] -#[repr(align(16))] -pub struct ArchCPU { - pub parent_obj: CPUState, - pub env: CPUX86State, - pub vmsentry: *mut VMChangeStateEntry, - pub ucode_rev: u64, - pub hyperv_spinlock_attempts: u32, - pub hyperv_vendor: *mut ::std::os::raw::c_char, - pub hyperv_synic_kvm_only: bool, - pub hyperv_features: u64, - pub hyperv_passthrough: bool, - pub hyperv_no_nonarch_cs: OnOffAuto, - pub hyperv_vendor_id: [u32; 3usize], - pub hyperv_interface_id: [u32; 4usize], - pub hyperv_limits: [u32; 3usize], - pub hyperv_enforce_cpuid: bool, - pub hyperv_ver_id_build: u32, - pub hyperv_ver_id_major: u16, - pub hyperv_ver_id_minor: u16, - pub hyperv_ver_id_sp: u32, - pub hyperv_ver_id_sb: u8, - pub hyperv_ver_id_sn: u32, - pub check_cpuid: bool, - pub enforce_cpuid: bool, - pub force_features: bool, - pub expose_kvm: bool, - pub expose_tcg: bool, - pub migratable: bool, - pub migrate_smi_count: bool, - pub max_features: bool, - pub apic_id: u32, - pub vmware_cpuid_freq: bool, - pub cache_info_passthrough: bool, - pub mwait: ArchCPU__bindgen_ty_1, - pub filtered_features: FeatureWordArray, - pub enable_pmu: bool, - pub lbr_fmt: u64, - pub enable_lmce: bool, - pub enable_l3_cache: bool, - pub l1_cache_per_core: bool, - pub legacy_cache: bool, - pub legacy_multi_node: bool, - pub enable_cpuid_0xb: bool, - pub full_cpuid_auto_level: bool, - pub vendor_cpuid_only: bool, - pub amd_topoext_features_only: bool, - pub intel_pt_auto_level: bool, - pub fill_mtrr_mask: bool, - pub host_phys_bits: bool, - pub host_phys_bits_limit: u8, - pub kvm_pv_enforce_cpuid: bool, - pub phys_bits: u32, - pub guest_phys_bits: u32, - pub apic_state: *mut DeviceState, - pub cpu_as_root: *mut MemoryRegion, - pub cpu_as_mem: *mut MemoryRegion, - pub smram: *mut MemoryRegion, - pub machine_done: Notifier, - pub kvm_msr_buf: *mut kvm_msrs, - pub node_id: i32, - pub socket_id: i32, - pub die_id: i32, - pub module_id: i32, - pub core_id: i32, - pub thread_id: i32, - pub hv_max_vps: i32, - pub xen_vapic: bool, -} -#[repr(C)] -#[derive(Debug, Default, Copy, Clone)] -pub struct ArchCPU__bindgen_ty_1 { - pub eax: u32, - pub ebx: u32, - pub ecx: u32, - pub edx: u32, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ArchCPU__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; - ["Alignment of ArchCPU__bindgen_ty_1"] - [::std::mem::align_of::() - 4usize]; - ["Offset of field: ArchCPU__bindgen_ty_1::eax"] - [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, eax) - 0usize]; - ["Offset of field: ArchCPU__bindgen_ty_1::ebx"] - [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, ebx) - 4usize]; - ["Offset of field: ArchCPU__bindgen_ty_1::ecx"] - [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, ecx) - 8usize]; - ["Offset of field: ArchCPU__bindgen_ty_1::edx"] - [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, edx) - 12usize]; -}; -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of ArchCPU"][::std::mem::size_of::() - 25904usize]; - ["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::ucode_rev"] - [::std::mem::offset_of!(ArchCPU, ucode_rev) - 25272usize]; - ["Offset of field: ArchCPU::hyperv_spinlock_attempts"] - [::std::mem::offset_of!(ArchCPU, hyperv_spinlock_attempts) - 25280usize]; - ["Offset of field: ArchCPU::hyperv_vendor"] - [::std::mem::offset_of!(ArchCPU, hyperv_vendor) - 25288usize]; - ["Offset of field: ArchCPU::hyperv_synic_kvm_only"] - [::std::mem::offset_of!(ArchCPU, hyperv_synic_kvm_only) - 25296usize]; - ["Offset of field: ArchCPU::hyperv_features"] - [::std::mem::offset_of!(ArchCPU, hyperv_features) - 25304usize]; - ["Offset of field: ArchCPU::hyperv_passthrough"] - [::std::mem::offset_of!(ArchCPU, hyperv_passthrough) - 25312usize]; - ["Offset of field: ArchCPU::hyperv_no_nonarch_cs"] - [::std::mem::offset_of!(ArchCPU, hyperv_no_nonarch_cs) - 25316usize]; - ["Offset of field: ArchCPU::hyperv_vendor_id"] - [::std::mem::offset_of!(ArchCPU, hyperv_vendor_id) - 25320usize]; - ["Offset of field: ArchCPU::hyperv_interface_id"] - [::std::mem::offset_of!(ArchCPU, hyperv_interface_id) - 25332usize]; - ["Offset of field: ArchCPU::hyperv_limits"] - [::std::mem::offset_of!(ArchCPU, hyperv_limits) - 25348usize]; - ["Offset of field: ArchCPU::hyperv_enforce_cpuid"] - [::std::mem::offset_of!(ArchCPU, hyperv_enforce_cpuid) - 25360usize]; - ["Offset of field: ArchCPU::hyperv_ver_id_build"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_build) - 25364usize]; - ["Offset of field: ArchCPU::hyperv_ver_id_major"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_major) - 25368usize]; - ["Offset of field: ArchCPU::hyperv_ver_id_minor"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_minor) - 25370usize]; - ["Offset of field: ArchCPU::hyperv_ver_id_sp"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sp) - 25372usize]; - ["Offset of field: ArchCPU::hyperv_ver_id_sb"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sb) - 25376usize]; - ["Offset of field: ArchCPU::hyperv_ver_id_sn"] - [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sn) - 25380usize]; - ["Offset of field: ArchCPU::check_cpuid"] - [::std::mem::offset_of!(ArchCPU, check_cpuid) - 25384usize]; - ["Offset of field: ArchCPU::enforce_cpuid"] - [::std::mem::offset_of!(ArchCPU, enforce_cpuid) - 25385usize]; - ["Offset of field: ArchCPU::force_features"] - [::std::mem::offset_of!(ArchCPU, force_features) - 25386usize]; - ["Offset of field: ArchCPU::expose_kvm"] - [::std::mem::offset_of!(ArchCPU, expose_kvm) - 25387usize]; - ["Offset of field: ArchCPU::expose_tcg"] - [::std::mem::offset_of!(ArchCPU, expose_tcg) - 25388usize]; - ["Offset of field: ArchCPU::migratable"] - [::std::mem::offset_of!(ArchCPU, migratable) - 25389usize]; - ["Offset of field: ArchCPU::migrate_smi_count"] - [::std::mem::offset_of!(ArchCPU, migrate_smi_count) - 25390usize]; - ["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]; - ["Offset of field: ArchCPU::vmware_cpuid_freq"] - [::std::mem::offset_of!(ArchCPU, vmware_cpuid_freq) - 25396usize]; - ["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]; - ["Offset of field: ArchCPU::filtered_features"] - [::std::mem::offset_of!(ArchCPU, filtered_features) - 25416usize]; - ["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]; - ["Offset of field: ArchCPU::enable_lmce"] - [::std::mem::offset_of!(ArchCPU, enable_lmce) - 25776usize]; - ["Offset of field: ArchCPU::enable_l3_cache"] - [::std::mem::offset_of!(ArchCPU, enable_l3_cache) - 25777usize]; - ["Offset of field: ArchCPU::l1_cache_per_core"] - [::std::mem::offset_of!(ArchCPU, l1_cache_per_core) - 25778usize]; - ["Offset of field: ArchCPU::legacy_cache"] - [::std::mem::offset_of!(ArchCPU, legacy_cache) - 25779usize]; - ["Offset of field: ArchCPU::legacy_multi_node"] - [::std::mem::offset_of!(ArchCPU, legacy_multi_node) - 25780usize]; - ["Offset of field: ArchCPU::enable_cpuid_0xb"] - [::std::mem::offset_of!(ArchCPU, enable_cpuid_0xb) - 25781usize]; - ["Offset of field: ArchCPU::full_cpuid_auto_level"] - [::std::mem::offset_of!(ArchCPU, full_cpuid_auto_level) - 25782usize]; - ["Offset of field: ArchCPU::vendor_cpuid_only"] - [::std::mem::offset_of!(ArchCPU, vendor_cpuid_only) - 25783usize]; - ["Offset of field: ArchCPU::amd_topoext_features_only"] - [::std::mem::offset_of!(ArchCPU, amd_topoext_features_only) - 25784usize]; - ["Offset of field: ArchCPU::intel_pt_auto_level"] - [::std::mem::offset_of!(ArchCPU, intel_pt_auto_level) - 25785usize]; - ["Offset of field: ArchCPU::fill_mtrr_mask"] - [::std::mem::offset_of!(ArchCPU, fill_mtrr_mask) - 25786usize]; - ["Offset of field: ArchCPU::host_phys_bits"] - [::std::mem::offset_of!(ArchCPU, host_phys_bits) - 25787usize]; - ["Offset of field: ArchCPU::host_phys_bits_limit"] - [::std::mem::offset_of!(ArchCPU, host_phys_bits_limit) - 25788usize]; - ["Offset of field: ArchCPU::kvm_pv_enforce_cpuid"] - [::std::mem::offset_of!(ArchCPU, kvm_pv_enforce_cpuid) - 25789usize]; - ["Offset of field: ArchCPU::phys_bits"] - [::std::mem::offset_of!(ArchCPU, phys_bits) - 25792usize]; - ["Offset of field: ArchCPU::guest_phys_bits"] - [::std::mem::offset_of!(ArchCPU, guest_phys_bits) - 25796usize]; - ["Offset of field: ArchCPU::apic_state"] - [::std::mem::offset_of!(ArchCPU, apic_state) - 25800usize]; - ["Offset of field: ArchCPU::cpu_as_root"] - [::std::mem::offset_of!(ArchCPU, cpu_as_root) - 25808usize]; - ["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]; - ["Offset of field: ArchCPU::machine_done"] - [::std::mem::offset_of!(ArchCPU, machine_done) - 25832usize]; - ["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]; - ["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]; - ["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]; - ["Offset of field: ArchCPU::thread_id"] - [::std::mem::offset_of!(ArchCPU, thread_id) - 25884usize]; - ["Offset of field: ArchCPU::hv_max_vps"] - [::std::mem::offset_of!(ArchCPU, hv_max_vps) - 25888usize]; - ["Offset of field: ArchCPU::xen_vapic"] - [::std::mem::offset_of!(ArchCPU, xen_vapic) - 25892usize]; -}; -impl Default for ArchCPU { - 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 ArchCPU { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - write!( - f, - "ArchCPU {{ parent_obj: {:?}, env: {:?}, vmsentry: {:?}, hyperv_vendor: {:?}, hyperv_synic_kvm_only: {:?}, hyperv_passthrough: {:?}, hyperv_no_nonarch_cs: {:?}, hyperv_vendor_id: {:?}, hyperv_interface_id: {:?}, hyperv_limits: {:?}, hyperv_enforce_cpuid: {:?}, check_cpuid: {:?}, enforce_cpuid: {:?}, force_features: {:?}, expose_kvm: {:?}, expose_tcg: {:?}, migratable: {:?}, migrate_smi_count: {:?}, max_features: {:?}, vmware_cpuid_freq: {:?}, cache_info_passthrough: {:?}, mwait: {:?}, filtered_features: {:?}, enable_pmu: {:?}, enable_lmce: {:?}, enable_l3_cache: {:?}, l1_cache_per_core: {:?}, legacy_cache: {:?}, legacy_multi_node: {:?}, enable_cpuid_0xb: {:?}, full_cpuid_auto_level: {:?}, vendor_cpuid_only: {:?}, amd_topoext_features_only: {:?}, intel_pt_auto_level: {:?}, fill_mtrr_mask: {:?}, host_phys_bits: {:?}, kvm_pv_enforce_cpuid: {:?}, apic_state: {:?}, cpu_as_root: {:?}, cpu_as_mem: {:?}, smram: {:?}, machine_done: {:?}, kvm_msr_buf: {:?}, xen_vapic: {:?} }}", - self.parent_obj, - self.env, - self.vmsentry, - self.hyperv_vendor, - self.hyperv_synic_kvm_only, - self.hyperv_passthrough, - self.hyperv_no_nonarch_cs, - self.hyperv_vendor_id, - self.hyperv_interface_id, - self.hyperv_limits, - self.hyperv_enforce_cpuid, - self.check_cpuid, - self.enforce_cpuid, - self.force_features, - self.expose_kvm, - self.expose_tcg, - self.migratable, - self.migrate_smi_count, - self.max_features, - self.vmware_cpuid_freq, - self.cache_info_passthrough, - self.mwait, - self.filtered_features, - self.enable_pmu, - self.enable_lmce, - self.enable_l3_cache, - self.l1_cache_per_core, - self.legacy_cache, - self.legacy_multi_node, - self.enable_cpuid_0xb, - self.full_cpuid_auto_level, - self.vendor_cpuid_only, - self.amd_topoext_features_only, - self.intel_pt_auto_level, - self.fill_mtrr_mask, - self.host_phys_bits, - self.kvm_pv_enforce_cpuid, - self.apic_state, - self.cpu_as_root, - self.cpu_as_mem, - self.smram, - self.machine_done, - self.kvm_msr_buf, - self.xen_vapic - ) - } -} -unsafe extern "C" { - pub fn cpu_memory_rw_debug( - cpu: *mut CPUState, - addr: vaddr, - ptr: *mut ::std::os::raw::c_void, - len: usize, - is_write: bool, - ) -> ::std::os::raw::c_int; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct RBNode { - pub rb_parent_color: usize, - pub rb_right: *mut RBNode, - pub rb_left: *mut RBNode, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of RBNode"][::std::mem::size_of::() - 24usize]; - ["Alignment of RBNode"][::std::mem::align_of::() - 8usize]; - ["Offset of field: RBNode::rb_parent_color"] - [::std::mem::offset_of!(RBNode, rb_parent_color) - 0usize]; - ["Offset of field: RBNode::rb_right"][::std::mem::offset_of!(RBNode, rb_right) - 8usize]; - ["Offset of field: RBNode::rb_left"][::std::mem::offset_of!(RBNode, rb_left) - 16usize]; -}; -impl Default for RBNode { - 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 RBRoot { - pub rb_node: *mut RBNode, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of RBRoot"][::std::mem::size_of::() - 8usize]; - ["Alignment of RBRoot"][::std::mem::align_of::() - 8usize]; - ["Offset of field: RBRoot::rb_node"][::std::mem::offset_of!(RBRoot, rb_node) - 0usize]; -}; -impl Default for RBRoot { - 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 RBRootLeftCached { - pub rb_root: RBRoot, - pub rb_leftmost: *mut RBNode, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of RBRootLeftCached"][::std::mem::size_of::() - 16usize]; - ["Alignment of RBRootLeftCached"][::std::mem::align_of::() - 8usize]; - ["Offset of field: RBRootLeftCached::rb_root"] - [::std::mem::offset_of!(RBRootLeftCached, rb_root) - 0usize]; - ["Offset of field: RBRootLeftCached::rb_leftmost"] - [::std::mem::offset_of!(RBRootLeftCached, rb_leftmost) - 8usize]; -}; -impl Default for RBRootLeftCached { - 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 IntervalTreeNode { - pub rb: RBNode, - pub start: u64, - pub last: u64, - pub subtree_last: u64, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of IntervalTreeNode"][::std::mem::size_of::() - 48usize]; - ["Alignment of IntervalTreeNode"][::std::mem::align_of::() - 8usize]; - ["Offset of field: IntervalTreeNode::rb"] - [::std::mem::offset_of!(IntervalTreeNode, rb) - 0usize]; - ["Offset of field: IntervalTreeNode::start"] - [::std::mem::offset_of!(IntervalTreeNode, start) - 24usize]; - ["Offset of field: IntervalTreeNode::last"] - [::std::mem::offset_of!(IntervalTreeNode, last) - 32usize]; - ["Offset of field: IntervalTreeNode::subtree_last"] - [::std::mem::offset_of!(IntervalTreeNode, subtree_last) - 40usize]; -}; -impl Default for IntervalTreeNode { - 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 IntervalTreeRoot = RBRootLeftCached; -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; -} -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."] - pub fn page_check_range( - start: target_ulong, - last: target_ulong, - flags: ::std::os::raw::c_int, - ) -> bool; -} -pub type MemOpIdx = u32; -unsafe extern "C" { - pub static mut guest_base: usize; -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct image_info { - pub load_bias: abi_ulong, - pub load_addr: abi_ulong, - pub start_code: abi_ulong, - pub end_code: abi_ulong, - pub start_data: abi_ulong, - pub end_data: abi_ulong, - pub brk: abi_ulong, - pub start_stack: abi_ulong, - pub stack_limit: abi_ulong, - pub vdso: abi_ulong, - pub entry: abi_ulong, - pub code_offset: abi_ulong, - pub data_offset: abi_ulong, - pub saved_auxv: abi_ulong, - pub auxv_len: abi_ulong, - pub argc: abi_ulong, - pub argv: abi_ulong, - pub envc: abi_ulong, - pub envp: abi_ulong, - pub file_string: abi_ulong, - pub elf_flags: u32, - pub personality: ::std::os::raw::c_int, - pub exec_stack: bool, - pub arg_strings: abi_ulong, - pub env_strings: abi_ulong, - pub loadmap_addr: abi_ulong, - pub nsegs: u16, - pub loadsegs: *mut ::std::os::raw::c_void, - pub pt_dynamic_addr: abi_ulong, - pub interpreter_loadmap_addr: abi_ulong, - pub interpreter_pt_dynamic_addr: abi_ulong, - pub other_info: *mut image_info, - pub note_flags: u32, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of image_info"][::std::mem::size_of::() - 256usize]; - ["Alignment of image_info"][::std::mem::align_of::() - 8usize]; - ["Offset of field: image_info::load_bias"] - [::std::mem::offset_of!(image_info, load_bias) - 0usize]; - ["Offset of field: image_info::load_addr"] - [::std::mem::offset_of!(image_info, load_addr) - 8usize]; - ["Offset of field: image_info::start_code"] - [::std::mem::offset_of!(image_info, start_code) - 16usize]; - ["Offset of field: image_info::end_code"] - [::std::mem::offset_of!(image_info, end_code) - 24usize]; - ["Offset of field: image_info::start_data"] - [::std::mem::offset_of!(image_info, start_data) - 32usize]; - ["Offset of field: image_info::end_data"] - [::std::mem::offset_of!(image_info, end_data) - 40usize]; - ["Offset of field: image_info::brk"][::std::mem::offset_of!(image_info, brk) - 48usize]; - ["Offset of field: image_info::start_stack"] - [::std::mem::offset_of!(image_info, start_stack) - 56usize]; - ["Offset of field: image_info::stack_limit"] - [::std::mem::offset_of!(image_info, stack_limit) - 64usize]; - ["Offset of field: image_info::vdso"][::std::mem::offset_of!(image_info, vdso) - 72usize]; - ["Offset of field: image_info::entry"][::std::mem::offset_of!(image_info, entry) - 80usize]; - ["Offset of field: image_info::code_offset"] - [::std::mem::offset_of!(image_info, code_offset) - 88usize]; - ["Offset of field: image_info::data_offset"] - [::std::mem::offset_of!(image_info, data_offset) - 96usize]; - ["Offset of field: image_info::saved_auxv"] - [::std::mem::offset_of!(image_info, saved_auxv) - 104usize]; - ["Offset of field: image_info::auxv_len"] - [::std::mem::offset_of!(image_info, auxv_len) - 112usize]; - ["Offset of field: image_info::argc"][::std::mem::offset_of!(image_info, argc) - 120usize]; - ["Offset of field: image_info::argv"][::std::mem::offset_of!(image_info, argv) - 128usize]; - ["Offset of field: image_info::envc"][::std::mem::offset_of!(image_info, envc) - 136usize]; - ["Offset of field: image_info::envp"][::std::mem::offset_of!(image_info, envp) - 144usize]; - ["Offset of field: image_info::file_string"] - [::std::mem::offset_of!(image_info, file_string) - 152usize]; - ["Offset of field: image_info::elf_flags"] - [::std::mem::offset_of!(image_info, elf_flags) - 160usize]; - ["Offset of field: image_info::personality"] - [::std::mem::offset_of!(image_info, personality) - 164usize]; - ["Offset of field: image_info::exec_stack"] - [::std::mem::offset_of!(image_info, exec_stack) - 168usize]; - ["Offset of field: image_info::arg_strings"] - [::std::mem::offset_of!(image_info, arg_strings) - 176usize]; - ["Offset of field: image_info::env_strings"] - [::std::mem::offset_of!(image_info, env_strings) - 184usize]; - ["Offset of field: image_info::loadmap_addr"] - [::std::mem::offset_of!(image_info, loadmap_addr) - 192usize]; - ["Offset of field: image_info::nsegs"][::std::mem::offset_of!(image_info, nsegs) - 200usize]; - ["Offset of field: image_info::loadsegs"] - [::std::mem::offset_of!(image_info, loadsegs) - 208usize]; - ["Offset of field: image_info::pt_dynamic_addr"] - [::std::mem::offset_of!(image_info, pt_dynamic_addr) - 216usize]; - ["Offset of field: image_info::interpreter_loadmap_addr"] - [::std::mem::offset_of!(image_info, interpreter_loadmap_addr) - 224usize]; - ["Offset of field: image_info::interpreter_pt_dynamic_addr"] - [::std::mem::offset_of!(image_info, interpreter_pt_dynamic_addr) - 232usize]; - ["Offset of field: image_info::other_info"] - [::std::mem::offset_of!(image_info, other_info) - 240usize]; - ["Offset of field: image_info::note_flags"] - [::std::mem::offset_of!(image_info, note_flags) - 248usize]; -}; -impl Default for image_info { - fn default() -> Self { - let mut s = ::std::mem::MaybeUninit::::uninit(); - unsafe { - ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); - s.assume_init() - } + self.mce_banks, + self.tpr_access_type, + self.topo_info, + self.avail_cpu_topo + ) } } +pub type CPUX86State = CPUArchState; #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct tb_tc { - pub ptr: *const ::std::os::raw::c_void, - pub size: usize, +pub struct kvm_msrs { + _unused: [u8; 0], } -#[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() - } - } +#[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."] +#[repr(C)] +#[repr(align(16))] +pub struct ArchCPU { + pub parent_obj: CPUState, + pub env: CPUX86State, + pub vmsentry: *mut VMChangeStateEntry, + pub ucode_rev: u64, + pub hyperv_spinlock_attempts: u32, + pub hyperv_vendor: *mut ::std::os::raw::c_char, + pub hyperv_synic_kvm_only: bool, + pub hyperv_features: u64, + pub hyperv_passthrough: bool, + pub hyperv_no_nonarch_cs: OnOffAuto, + pub hyperv_vendor_id: [u32; 3usize], + pub hyperv_interface_id: [u32; 4usize], + pub hyperv_limits: [u32; 3usize], + pub hyperv_enforce_cpuid: bool, + pub hyperv_ver_id_build: u32, + pub hyperv_ver_id_major: u16, + pub hyperv_ver_id_minor: u16, + pub hyperv_ver_id_sp: u32, + pub hyperv_ver_id_sb: u8, + pub hyperv_ver_id_sn: u32, + pub check_cpuid: bool, + pub enforce_cpuid: bool, + pub force_features: bool, + pub expose_kvm: bool, + pub expose_tcg: bool, + pub migratable: bool, + pub migrate_smi_count: bool, + pub max_features: bool, + pub apic_id: u32, + pub vmware_cpuid_freq: bool, + pub cache_info_passthrough: bool, + pub mwait: ArchCPU__bindgen_ty_1, + pub filtered_features: FeatureWordArray, + pub enable_pmu: bool, + pub lbr_fmt: u64, + pub enable_lmce: bool, + pub enable_l3_cache: bool, + pub l1_cache_per_core: bool, + pub legacy_cache: bool, + pub legacy_multi_node: bool, + pub enable_cpuid_0xb: bool, + pub full_cpuid_auto_level: bool, + pub vendor_cpuid_only: bool, + pub amd_topoext_features_only: bool, + pub intel_pt_auto_level: bool, + pub fill_mtrr_mask: bool, + pub host_phys_bits: bool, + pub host_phys_bits_limit: u8, + pub kvm_pv_enforce_cpuid: bool, + pub phys_bits: u32, + pub guest_phys_bits: u32, + pub apic_state: *mut DeviceState, + pub cpu_as_root: *mut MemoryRegion, + pub cpu_as_mem: *mut MemoryRegion, + pub smram: *mut MemoryRegion, + pub machine_done: Notifier, + pub kvm_msr_buf: *mut kvm_msrs, + pub node_id: i32, + pub socket_id: i32, + pub die_id: i32, + pub module_id: i32, + pub core_id: i32, + pub thread_id: i32, + pub hv_max_vps: i32, + pub xen_vapic: bool, } #[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], +#[derive(Debug, Default, Copy, Clone)] +pub struct ArchCPU__bindgen_ty_1 { + pub eax: u32, + pub ebx: u32, + pub ecx: u32, + pub edx: u32, } #[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]; + ["Size of ArchCPU__bindgen_ty_1"][::std::mem::size_of::() - 16usize]; + ["Alignment of ArchCPU__bindgen_ty_1"] + [::std::mem::align_of::() - 4usize]; + ["Offset of field: ArchCPU__bindgen_ty_1::eax"] + [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, eax) - 0usize]; + ["Offset of field: ArchCPU__bindgen_ty_1::ebx"] + [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, ebx) - 4usize]; + ["Offset of field: ArchCPU__bindgen_ty_1::ecx"] + [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, ecx) - 8usize]; + ["Offset of field: ArchCPU__bindgen_ty_1::edx"] + [::std::mem::offset_of!(ArchCPU__bindgen_ty_1, edx) - 12usize]; }; -impl Default for TranslationBlock { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["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) - 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) - 26312usize]; + ["Offset of field: ArchCPU::hyperv_spinlock_attempts"] + [::std::mem::offset_of!(ArchCPU, hyperv_spinlock_attempts) - 26320usize]; + ["Offset of field: ArchCPU::hyperv_vendor"] + [::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) - 26336usize]; + ["Offset of field: ArchCPU::hyperv_features"] + [::std::mem::offset_of!(ArchCPU, hyperv_features) - 26344usize]; + ["Offset of field: ArchCPU::hyperv_passthrough"] + [::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) - 26356usize]; + ["Offset of field: ArchCPU::hyperv_vendor_id"] + [::std::mem::offset_of!(ArchCPU, hyperv_vendor_id) - 26360usize]; + ["Offset of field: ArchCPU::hyperv_interface_id"] + [::std::mem::offset_of!(ArchCPU, hyperv_interface_id) - 26372usize]; + ["Offset of field: ArchCPU::hyperv_limits"] + [::std::mem::offset_of!(ArchCPU, hyperv_limits) - 26388usize]; + ["Offset of field: ArchCPU::hyperv_enforce_cpuid"] + [::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) - 26404usize]; + ["Offset of field: ArchCPU::hyperv_ver_id_major"] + [::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) - 26410usize]; + ["Offset of field: ArchCPU::hyperv_ver_id_sp"] + [::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) - 26416usize]; + ["Offset of field: ArchCPU::hyperv_ver_id_sn"] + [::std::mem::offset_of!(ArchCPU, hyperv_ver_id_sn) - 26420usize]; + ["Offset of field: ArchCPU::check_cpuid"] + [::std::mem::offset_of!(ArchCPU, check_cpuid) - 26424usize]; + ["Offset of field: ArchCPU::enforce_cpuid"] + [::std::mem::offset_of!(ArchCPU, enforce_cpuid) - 26425usize]; + ["Offset of field: ArchCPU::force_features"] + [::std::mem::offset_of!(ArchCPU, force_features) - 26426usize]; + ["Offset of field: ArchCPU::expose_kvm"] + [::std::mem::offset_of!(ArchCPU, expose_kvm) - 26427usize]; + ["Offset of field: ArchCPU::expose_tcg"] + [::std::mem::offset_of!(ArchCPU, expose_tcg) - 26428usize]; + ["Offset of field: ArchCPU::migratable"] + [::std::mem::offset_of!(ArchCPU, migratable) - 26429usize]; + ["Offset of field: ArchCPU::migrate_smi_count"] + [::std::mem::offset_of!(ArchCPU, migrate_smi_count) - 26430usize]; + ["Offset of field: ArchCPU::max_features"] + [::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) - 26436usize]; + ["Offset of field: ArchCPU::cache_info_passthrough"] + [::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) - 26456usize]; + ["Offset of field: ArchCPU::enable_pmu"] + [::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) - 26816usize]; + ["Offset of field: ArchCPU::enable_l3_cache"] + [::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) - 26818usize]; + ["Offset of field: ArchCPU::legacy_cache"] + [::std::mem::offset_of!(ArchCPU, legacy_cache) - 26819usize]; + ["Offset of field: ArchCPU::legacy_multi_node"] + [::std::mem::offset_of!(ArchCPU, legacy_multi_node) - 26820usize]; + ["Offset of field: ArchCPU::enable_cpuid_0xb"] + [::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) - 26822usize]; + ["Offset of field: ArchCPU::vendor_cpuid_only"] + [::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) - 26824usize]; + ["Offset of field: ArchCPU::intel_pt_auto_level"] + [::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) - 26826usize]; + ["Offset of field: ArchCPU::host_phys_bits"] + [::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) - 26828usize]; + ["Offset of field: ArchCPU::kvm_pv_enforce_cpuid"] + [::std::mem::offset_of!(ArchCPU, kvm_pv_enforce_cpuid) - 26829usize]; + ["Offset of field: ArchCPU::phys_bits"] + [::std::mem::offset_of!(ArchCPU, phys_bits) - 26832usize]; + ["Offset of field: ArchCPU::guest_phys_bits"] + [::std::mem::offset_of!(ArchCPU, guest_phys_bits) - 26836usize]; + ["Offset of field: ArchCPU::apic_state"] + [::std::mem::offset_of!(ArchCPU, apic_state) - 26840usize]; + ["Offset of field: ArchCPU::cpu_as_root"] + [::std::mem::offset_of!(ArchCPU, cpu_as_root) - 26848usize]; + ["Offset of field: ArchCPU::cpu_as_mem"] + [::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) - 26872usize]; + ["Offset of field: ArchCPU::kvm_msr_buf"] + [::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) - 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) - 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) - 26924usize]; + ["Offset of field: ArchCPU::hv_max_vps"] + [::std::mem::offset_of!(ArchCPU, hv_max_vps) - 26928usize]; + ["Offset of field: ArchCPU::xen_vapic"] + [::std::mem::offset_of!(ArchCPU, xen_vapic) - 26932usize]; +}; +impl Default for ArchCPU { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -6269,56 +6123,84 @@ impl Default for TranslationBlock { } } } +impl ::std::fmt::Debug for ArchCPU { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { + write!( + f, + "ArchCPU {{ parent_obj: {:?}, env: {:?}, vmsentry: {:?}, hyperv_vendor: {:?}, hyperv_synic_kvm_only: {:?}, hyperv_passthrough: {:?}, hyperv_no_nonarch_cs: {:?}, hyperv_vendor_id: {:?}, hyperv_interface_id: {:?}, hyperv_limits: {:?}, hyperv_enforce_cpuid: {:?}, check_cpuid: {:?}, enforce_cpuid: {:?}, force_features: {:?}, expose_kvm: {:?}, expose_tcg: {:?}, migratable: {:?}, migrate_smi_count: {:?}, max_features: {:?}, vmware_cpuid_freq: {:?}, cache_info_passthrough: {:?}, mwait: {:?}, filtered_features: {:?}, enable_pmu: {:?}, enable_lmce: {:?}, enable_l3_cache: {:?}, l1_cache_per_core: {:?}, legacy_cache: {:?}, legacy_multi_node: {:?}, enable_cpuid_0xb: {:?}, full_cpuid_auto_level: {:?}, vendor_cpuid_only: {:?}, amd_topoext_features_only: {:?}, intel_pt_auto_level: {:?}, fill_mtrr_mask: {:?}, host_phys_bits: {:?}, kvm_pv_enforce_cpuid: {:?}, apic_state: {:?}, cpu_as_root: {:?}, cpu_as_mem: {:?}, smram: {:?}, machine_done: {:?}, kvm_msr_buf: {:?}, xen_vapic: {:?} }}", + self.parent_obj, + self.env, + self.vmsentry, + self.hyperv_vendor, + self.hyperv_synic_kvm_only, + self.hyperv_passthrough, + self.hyperv_no_nonarch_cs, + self.hyperv_vendor_id, + self.hyperv_interface_id, + self.hyperv_limits, + self.hyperv_enforce_cpuid, + self.check_cpuid, + self.enforce_cpuid, + self.force_features, + self.expose_kvm, + self.expose_tcg, + self.migratable, + self.migrate_smi_count, + self.max_features, + self.vmware_cpuid_freq, + self.cache_info_passthrough, + self.mwait, + self.filtered_features, + self.enable_pmu, + self.enable_lmce, + self.enable_l3_cache, + self.l1_cache_per_core, + self.legacy_cache, + self.legacy_multi_node, + self.enable_cpuid_0xb, + self.full_cpuid_auto_level, + self.vendor_cpuid_only, + self.amd_topoext_features_only, + self.intel_pt_auto_level, + self.fill_mtrr_mask, + self.host_phys_bits, + self.kvm_pv_enforce_cpuid, + self.apic_state, + self.cpu_as_root, + self.cpu_as_mem, + self.smram, + self.machine_done, + self.kvm_msr_buf, + self.xen_vapic + ) + } +} unsafe extern "C" { - pub static mut exec_path: *mut ::std::os::raw::c_char; -} -unsafe extern "C" { - pub static mut mmap_next_start: abi_ulong; -} -unsafe extern "C" { - pub fn target_mprotect( - start: abi_ulong, - len: abi_ulong, - prot: ::std::os::raw::c_int, + pub fn cpu_memory_rw_debug( + cpu: *mut CPUState, + addr: vaddr, + ptr: *mut ::std::os::raw::c_void, + len: usize, + is_write: bool, ) -> ::std::os::raw::c_int; } -unsafe extern "C" { - pub fn target_mmap( - start: abi_ulong, - len: abi_ulong, - prot: ::std::os::raw::c_int, - flags: ::std::os::raw::c_int, - fd: ::std::os::raw::c_int, - offset: off_t, - ) -> abi_long; -} -unsafe extern "C" { - pub fn target_munmap(start: abi_ulong, len: abi_ulong) -> ::std::os::raw::c_int; -} -unsafe extern "C" { - #[doc = " read_self_maps:\n\n Read /proc/self/maps and return a tree of MapInfo structures."] - pub fn read_self_maps() -> *mut IntervalTreeRoot; -} -unsafe extern "C" { - #[doc = " free_self_maps:\n @info: an interval tree\n\n Free a tree of MapInfo structures."] - pub fn free_self_maps(root: *mut IntervalTreeRoot); -} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct libafl_breakpoint { - pub addr: target_ulong, - pub next: *mut libafl_breakpoint, +pub struct RBNode { + pub rb_parent_color: usize, + pub rb_right: *mut RBNode, + pub rb_left: *mut RBNode, } #[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]; + ["Size of RBNode"][::std::mem::size_of::() - 24usize]; + ["Alignment of RBNode"][::std::mem::align_of::() - 8usize]; + ["Offset of field: RBNode::rb_parent_color"] + [::std::mem::offset_of!(RBNode, rb_parent_color) - 0usize]; + ["Offset of field: RBNode::rb_right"][::std::mem::offset_of!(RBNode, rb_right) - 8usize]; + ["Offset of field: RBNode::rb_left"][::std::mem::offset_of!(RBNode, rb_left) - 16usize]; }; -impl Default for libafl_breakpoint { +impl Default for RBNode { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -6327,93 +6209,18 @@ impl Default for libafl_breakpoint { } } } -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, +pub struct RBRoot { + pub rb_node: *mut RBNode, } #[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]; + ["Size of RBRoot"][::std::mem::size_of::() - 8usize]; + ["Alignment of RBRoot"][::std::mem::align_of::() - 8usize]; + ["Offset of field: RBRoot::rb_node"][::std::mem::offset_of!(RBRoot, rb_node) - 0usize]; }; -impl Default for libafl_exit_reason_internal { +impl Default for RBRoot { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -6423,34 +6230,21 @@ impl Default for libafl_exit_reason_internal { } } #[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, +pub struct RBRootLeftCached { + pub rb_root: RBRoot, + pub rb_leftmost: *mut RBNode, } #[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]; + ["Size of RBRootLeftCached"][::std::mem::size_of::() - 16usize]; + ["Alignment of RBRootLeftCached"][::std::mem::align_of::() - 8usize]; + ["Offset of field: RBRootLeftCached::rb_root"] + [::std::mem::offset_of!(RBRootLeftCached, rb_root) - 0usize]; + ["Offset of field: RBRootLeftCached::rb_leftmost"] + [::std::mem::offset_of!(RBRootLeftCached, rb_leftmost) - 8usize]; }; -impl Default for libafl_exit_reason_custom_insn { +impl Default for RBRootLeftCached { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -6460,60 +6254,56 @@ impl Default for libafl_exit_reason_custom_insn { } } #[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 {} +#[derive(Debug, Copy, Clone)] +pub struct IntervalTreeNode { + pub rb: RBNode, + pub start: u64, + pub last: u64, + pub subtree_last: u64, +} #[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]; + ["Size of IntervalTreeNode"][::std::mem::size_of::() - 48usize]; + ["Alignment of IntervalTreeNode"][::std::mem::align_of::() - 8usize]; + ["Offset of field: IntervalTreeNode::rb"] + [::std::mem::offset_of!(IntervalTreeNode, rb) - 0usize]; + ["Offset of field: IntervalTreeNode::start"] + [::std::mem::offset_of!(IntervalTreeNode, start) - 24usize]; + ["Offset of field: IntervalTreeNode::last"] + [::std::mem::offset_of!(IntervalTreeNode, last) - 32usize]; + ["Offset of field: IntervalTreeNode::subtree_last"] + [::std::mem::offset_of!(IntervalTreeNode, subtree_last) - 40usize]; }; -#[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, +impl Default for IntervalTreeNode { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } } -#[repr(C)] -#[derive(Copy, Clone)] -pub union 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, +pub type IntervalTreeRoot = RBRootLeftCached; +pub type MemOpIdx = u32; +pub type abi_ulong = target_ulong; +pub type abi_long = target_long; +unsafe extern "C" { + 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 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]; + ["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 libafl_exit_reason__bindgen_ty_1 { +impl Default for tb_tc { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -6522,25 +6312,61 @@ impl Default for libafl_exit_reason__bindgen_ty_1 { } } } -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 }}") - } +#[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 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]; + ["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 libafl_exit_reason { +impl Default for TranslationBlock { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -6549,65 +6375,160 @@ impl Default for libafl_exit_reason { } } } -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); + #[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."] + pub fn page_check_range( + start: target_ulong, + last: target_ulong, + flags: ::std::os::raw::c_int, + ) -> bool; } unsafe extern "C" { - pub fn libafl_last_exit_cpu() -> *mut CPUState; + #[doc = " --- Begin LibAFL code ---"] + pub fn pageflags_get_root() -> *mut IntervalTreeRoot; } -unsafe extern "C" { - pub fn libafl_exit_signal_vm_start(); +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct image_info { + pub load_bias: abi_ulong, + pub load_addr: abi_ulong, + pub start_code: abi_ulong, + pub end_code: abi_ulong, + pub start_data: abi_ulong, + pub end_data: abi_ulong, + pub brk: abi_ulong, + pub start_stack: abi_ulong, + pub stack_limit: abi_ulong, + pub vdso: abi_ulong, + pub entry: abi_ulong, + pub code_offset: abi_ulong, + pub data_offset: abi_ulong, + pub saved_auxv: abi_ulong, + pub auxv_len: abi_ulong, + pub argc: abi_ulong, + pub argv: abi_ulong, + pub envc: abi_ulong, + pub envp: abi_ulong, + pub file_string: abi_ulong, + pub elf_flags: u32, + pub personality: ::std::os::raw::c_int, + pub exec_stack: bool, + pub arg_strings: abi_ulong, + pub env_strings: abi_ulong, + pub loadmap_addr: abi_ulong, + pub nsegs: u16, + pub loadsegs: *mut ::std::os::raw::c_void, + pub pt_dynamic_addr: abi_ulong, + pub interpreter_loadmap_addr: abi_ulong, + pub interpreter_pt_dynamic_addr: abi_ulong, + pub other_info: *mut image_info, + pub note_flags: u32, } -unsafe extern "C" { - pub fn libafl_exit_asap() -> bool; +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of image_info"][::std::mem::size_of::() - 256usize]; + ["Alignment of image_info"][::std::mem::align_of::() - 8usize]; + ["Offset of field: image_info::load_bias"] + [::std::mem::offset_of!(image_info, load_bias) - 0usize]; + ["Offset of field: image_info::load_addr"] + [::std::mem::offset_of!(image_info, load_addr) - 8usize]; + ["Offset of field: image_info::start_code"] + [::std::mem::offset_of!(image_info, start_code) - 16usize]; + ["Offset of field: image_info::end_code"] + [::std::mem::offset_of!(image_info, end_code) - 24usize]; + ["Offset of field: image_info::start_data"] + [::std::mem::offset_of!(image_info, start_data) - 32usize]; + ["Offset of field: image_info::end_data"] + [::std::mem::offset_of!(image_info, end_data) - 40usize]; + ["Offset of field: image_info::brk"][::std::mem::offset_of!(image_info, brk) - 48usize]; + ["Offset of field: image_info::start_stack"] + [::std::mem::offset_of!(image_info, start_stack) - 56usize]; + ["Offset of field: image_info::stack_limit"] + [::std::mem::offset_of!(image_info, stack_limit) - 64usize]; + ["Offset of field: image_info::vdso"][::std::mem::offset_of!(image_info, vdso) - 72usize]; + ["Offset of field: image_info::entry"][::std::mem::offset_of!(image_info, entry) - 80usize]; + ["Offset of field: image_info::code_offset"] + [::std::mem::offset_of!(image_info, code_offset) - 88usize]; + ["Offset of field: image_info::data_offset"] + [::std::mem::offset_of!(image_info, data_offset) - 96usize]; + ["Offset of field: image_info::saved_auxv"] + [::std::mem::offset_of!(image_info, saved_auxv) - 104usize]; + ["Offset of field: image_info::auxv_len"] + [::std::mem::offset_of!(image_info, auxv_len) - 112usize]; + ["Offset of field: image_info::argc"][::std::mem::offset_of!(image_info, argc) - 120usize]; + ["Offset of field: image_info::argv"][::std::mem::offset_of!(image_info, argv) - 128usize]; + ["Offset of field: image_info::envc"][::std::mem::offset_of!(image_info, envc) - 136usize]; + ["Offset of field: image_info::envp"][::std::mem::offset_of!(image_info, envp) - 144usize]; + ["Offset of field: image_info::file_string"] + [::std::mem::offset_of!(image_info, file_string) - 152usize]; + ["Offset of field: image_info::elf_flags"] + [::std::mem::offset_of!(image_info, elf_flags) - 160usize]; + ["Offset of field: image_info::personality"] + [::std::mem::offset_of!(image_info, personality) - 164usize]; + ["Offset of field: image_info::exec_stack"] + [::std::mem::offset_of!(image_info, exec_stack) - 168usize]; + ["Offset of field: image_info::arg_strings"] + [::std::mem::offset_of!(image_info, arg_strings) - 176usize]; + ["Offset of field: image_info::env_strings"] + [::std::mem::offset_of!(image_info, env_strings) - 184usize]; + ["Offset of field: image_info::loadmap_addr"] + [::std::mem::offset_of!(image_info, loadmap_addr) - 192usize]; + ["Offset of field: image_info::nsegs"][::std::mem::offset_of!(image_info, nsegs) - 200usize]; + ["Offset of field: image_info::loadsegs"] + [::std::mem::offset_of!(image_info, loadsegs) - 208usize]; + ["Offset of field: image_info::pt_dynamic_addr"] + [::std::mem::offset_of!(image_info, pt_dynamic_addr) - 216usize]; + ["Offset of field: image_info::interpreter_loadmap_addr"] + [::std::mem::offset_of!(image_info, interpreter_loadmap_addr) - 224usize]; + ["Offset of field: image_info::interpreter_pt_dynamic_addr"] + [::std::mem::offset_of!(image_info, interpreter_pt_dynamic_addr) - 232usize]; + ["Offset of field: image_info::other_info"] + [::std::mem::offset_of!(image_info, other_info) - 240usize]; + ["Offset of field: image_info::note_flags"] + [::std::mem::offset_of!(image_info, note_flags) - 248usize]; +}; +impl Default for image_info { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } } unsafe extern "C" { - pub fn libafl_sync_exit_cpu(); + pub static mut exec_path: *mut ::std::os::raw::c_char; } unsafe extern "C" { - pub fn libafl_exit_request_internal( - cpu: *mut CPUState, - pc: u64, - cause: ShutdownCause, - signal: ::std::os::raw::c_int, - ); + pub static mut mmap_next_start: abi_ulong; } unsafe extern "C" { - pub fn libafl_exit_request_breakpoint(cpu: *mut CPUState, pc: target_ulong); + pub fn target_mprotect( + start: abi_ulong, + len: abi_ulong, + prot: ::std::os::raw::c_int, + ) -> ::std::os::raw::c_int; } unsafe extern "C" { - pub fn libafl_exit_request_custom_insn( - cpu: *mut CPUState, - pc: target_ulong, - kind: libafl_custom_insn_kind, - ); + pub fn target_mmap( + start: abi_ulong, + len: abi_ulong, + prot: ::std::os::raw::c_int, + flags: ::std::os::raw::c_int, + fd: ::std::os::raw::c_int, + offset: off_t, + ) -> abi_long; } unsafe extern "C" { - pub fn libafl_exit_request_crash(cpu: *mut CPUState); + pub fn target_munmap(start: abi_ulong, len: abi_ulong) -> ::std::os::raw::c_int; } unsafe extern "C" { - pub fn libafl_exit_request_timeout(); + #[doc = " read_self_maps:\n\n Read /proc/self/maps and return a tree of MapInfo structures."] + pub fn read_self_maps() -> *mut IntervalTreeRoot; } unsafe extern "C" { - pub fn libafl_get_exit_reason() -> *mut libafl_exit_reason; + #[doc = " free_self_maps:\n @info: an interval tree\n\n Free a tree of MapInfo structures."] + pub fn free_self_maps(root: *mut IntervalTreeRoot); } #[repr(C)] #[derive(Debug, Copy, Clone)] @@ -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); @@ -7589,178 +7478,537 @@ impl TCGCallArgumentLoc { } } #[inline] - pub unsafe fn arg_slot_raw(this: *const Self) -> ::std::os::raw::c_uint { + pub unsafe fn arg_slot_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), + 8usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_arg_slot_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), + 8usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn ref_slot(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } + } + #[inline] + pub fn set_ref_slot(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(16usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn ref_slot_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), + 16usize, + 8u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_ref_slot_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), + 16usize, + 8u8, + val as u64, + ) + } + } + #[inline] + pub fn arg_idx(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 4u8) as u32) } + } + #[inline] + pub fn set_arg_idx(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(24usize, 4u8, val as u64) + } + } + #[inline] + pub unsafe fn arg_idx_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), + 24usize, + 4u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_arg_idx_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), + 24usize, + 4u8, + val as u64, + ) + } + } + #[inline] + pub fn tmp_subindex(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) } + } + #[inline] + pub fn set_tmp_subindex(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(28usize, 2u8, val as u64) + } + } + #[inline] + pub unsafe fn tmp_subindex_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), + 28usize, + 2u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_tmp_subindex_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), + 28usize, + 2u8, + val as u64, + ) + } + } + #[inline] + pub fn new_bitfield_1( + kind: TCGCallArgumentKind, + arg_slot: ::std::os::raw::c_uint, + ref_slot: ::std::os::raw::c_uint, + arg_idx: ::std::os::raw::c_uint, + tmp_subindex: ::std::os::raw::c_uint, + ) -> __BindgenBitfieldUnit<[u8; 4usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 8u8, { + let kind: u32 = unsafe { ::std::mem::transmute(kind) }; + kind as u64 + }); + __bindgen_bitfield_unit.set(8usize, 8u8, { + let arg_slot: u32 = unsafe { ::std::mem::transmute(arg_slot) }; + arg_slot as u64 + }); + __bindgen_bitfield_unit.set(16usize, 8u8, { + let ref_slot: u32 = unsafe { ::std::mem::transmute(ref_slot) }; + ref_slot as u64 + }); + __bindgen_bitfield_unit.set(24usize, 4u8, { + let arg_idx: u32 = unsafe { ::std::mem::transmute(arg_idx) }; + arg_idx as u64 + }); + __bindgen_bitfield_unit.set(28usize, 2u8, { + let tmp_subindex: u32 = unsafe { ::std::mem::transmute(tmp_subindex) }; + tmp_subindex as u64 + }); + __bindgen_bitfield_unit + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct TCGHelperInfo { + pub func: *mut ::std::os::raw::c_void, + pub name: *const ::std::os::raw::c_char, + pub init: usize, + pub _bitfield_align_1: [u32; 0], + pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, + pub in_: [TCGCallArgumentLoc; 14usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of TCGHelperInfo"][::std::mem::size_of::() - 88usize]; + ["Alignment of TCGHelperInfo"][::std::mem::align_of::() - 8usize]; + ["Offset of field: TCGHelperInfo::func"][::std::mem::offset_of!(TCGHelperInfo, func) - 0usize]; + ["Offset of field: TCGHelperInfo::name"][::std::mem::offset_of!(TCGHelperInfo, name) - 8usize]; + ["Offset of field: TCGHelperInfo::init"][::std::mem::offset_of!(TCGHelperInfo, init) - 16usize]; + ["Offset of field: TCGHelperInfo::in_"][::std::mem::offset_of!(TCGHelperInfo, in_) - 32usize]; +}; +impl Default for TCGHelperInfo { + 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 TCGHelperInfo { + #[inline] + pub fn typemask(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 32u8) as u32) } + } + #[inline] + pub fn set_typemask(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(0usize, 32u8, val as u64) + } + } + #[inline] + pub unsafe fn typemask_raw(this: *const Self) -> ::std::os::raw::c_uint { + unsafe { + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( + ::std::ptr::addr_of!((*this)._bitfield_1), + 0usize, + 32u8, + ) as u32) + } + } + #[inline] + pub unsafe fn set_typemask_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( + ::std::ptr::addr_of_mut!((*this)._bitfield_1), + 0usize, + 32u8, + val as u64, + ) + } + } + #[inline] + pub fn flags(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } + } + #[inline] + pub fn set_flags(&mut self, val: ::std::os::raw::c_uint) { + unsafe { + let val: u32 = ::std::mem::transmute(val); + self._bitfield_1.set(32usize, 8u8, val as u64) + } + } + #[inline] + pub unsafe fn flags_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), - 8usize, + 32usize, 8u8, ) as u32) } } #[inline] - pub unsafe fn set_arg_slot_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + pub unsafe fn set_flags_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 8usize, + 32usize, 8u8, val as u64, ) } } #[inline] - pub fn ref_slot(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) } + pub fn nr_in(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } } #[inline] - pub fn set_ref_slot(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_nr_in(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(16usize, 8u8, val as u64) + self._bitfield_1.set(40usize, 8u8, val as u64) } } #[inline] - pub unsafe fn ref_slot_raw(this: *const Self) -> ::std::os::raw::c_uint { + pub unsafe fn nr_in_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), - 16usize, + 40usize, 8u8, ) as u32) } } #[inline] - pub unsafe fn set_ref_slot_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + pub unsafe fn set_nr_in_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 16usize, + 40usize, 8u8, val as u64, ) } } #[inline] - pub fn arg_idx(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(24usize, 4u8) as u32) } + pub fn nr_out(&self) -> ::std::os::raw::c_uint { + unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) } } #[inline] - pub fn set_arg_idx(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_nr_out(&mut self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(24usize, 4u8, val as u64) + self._bitfield_1.set(48usize, 8u8, val as u64) } } #[inline] - pub unsafe fn arg_idx_raw(this: *const Self) -> ::std::os::raw::c_uint { + pub unsafe fn nr_out_raw(this: *const Self) -> ::std::os::raw::c_uint { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), - 24usize, - 4u8, + 48usize, + 8u8, ) as u32) } } #[inline] - pub unsafe fn set_arg_idx_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + pub unsafe fn set_nr_out_raw(this: *mut Self, val: ::std::os::raw::c_uint) { unsafe { let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 24usize, - 4u8, + 48usize, + 8u8, val as u64, ) } } #[inline] - pub fn tmp_subindex(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(28usize, 2u8) as u32) } + pub fn out_kind(&self) -> TCGCallReturnKind { + unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } } #[inline] - pub fn set_tmp_subindex(&mut self, val: ::std::os::raw::c_uint) { + pub fn set_out_kind(&mut self, val: TCGCallReturnKind) { unsafe { let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(28usize, 2u8, val as u64) + self._bitfield_1.set(56usize, 8u8, val as u64) } } #[inline] - pub unsafe fn tmp_subindex_raw(this: *const Self) -> ::std::os::raw::c_uint { + pub unsafe fn out_kind_raw(this: *const Self) -> TCGCallReturnKind { unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 4usize]>>::raw_get( + ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( ::std::ptr::addr_of!((*this)._bitfield_1), - 28usize, - 2u8, + 56usize, + 8u8, ) as u32) } } #[inline] - pub unsafe fn set_tmp_subindex_raw(this: *mut Self, val: ::std::os::raw::c_uint) { + pub unsafe fn set_out_kind_raw(this: *mut Self, val: TCGCallReturnKind) { unsafe { let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 4usize]>>::raw_set( + <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 28usize, - 2u8, + 56usize, + 8u8, val as u64, ) } } #[inline] pub fn new_bitfield_1( - kind: TCGCallArgumentKind, - arg_slot: ::std::os::raw::c_uint, - ref_slot: ::std::os::raw::c_uint, - arg_idx: ::std::os::raw::c_uint, - tmp_subindex: ::std::os::raw::c_uint, - ) -> __BindgenBitfieldUnit<[u8; 4usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 8u8, { - let kind: u32 = unsafe { ::std::mem::transmute(kind) }; - kind as u64 + typemask: ::std::os::raw::c_uint, + flags: ::std::os::raw::c_uint, + nr_in: ::std::os::raw::c_uint, + nr_out: ::std::os::raw::c_uint, + out_kind: TCGCallReturnKind, + ) -> __BindgenBitfieldUnit<[u8; 8usize]> { + let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); + __bindgen_bitfield_unit.set(0usize, 32u8, { + let typemask: u32 = unsafe { ::std::mem::transmute(typemask) }; + typemask as u64 }); - __bindgen_bitfield_unit.set(8usize, 8u8, { - let arg_slot: u32 = unsafe { ::std::mem::transmute(arg_slot) }; - arg_slot as u64 + __bindgen_bitfield_unit.set(32usize, 8u8, { + let flags: u32 = unsafe { ::std::mem::transmute(flags) }; + flags as u64 }); - __bindgen_bitfield_unit.set(16usize, 8u8, { - let ref_slot: u32 = unsafe { ::std::mem::transmute(ref_slot) }; - ref_slot as u64 + __bindgen_bitfield_unit.set(40usize, 8u8, { + let nr_in: u32 = unsafe { ::std::mem::transmute(nr_in) }; + nr_in as u64 }); - __bindgen_bitfield_unit.set(24usize, 4u8, { - let arg_idx: u32 = unsafe { ::std::mem::transmute(arg_idx) }; - arg_idx as u64 + __bindgen_bitfield_unit.set(48usize, 8u8, { + let nr_out: u32 = unsafe { ::std::mem::transmute(nr_out) }; + nr_out as u64 }); - __bindgen_bitfield_unit.set(28usize, 2u8, { - let tmp_subindex: u32 = unsafe { ::std::mem::transmute(tmp_subindex) }; - tmp_subindex as u64 + __bindgen_bitfield_unit.set(56usize, 8u8, { + let out_kind: u32 = unsafe { ::std::mem::transmute(out_kind) }; + out_kind as u64 }); __bindgen_bitfield_unit } } +pub type TCGv = TCGv_i64; +#[doc = " struct qemu_plugin_hwaddr - opaque hw address handle"] +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct qemu_plugin_hwaddr { + pub is_io: bool, + pub is_store: bool, + pub phys_addr: hwaddr, + pub mr: *mut MemoryRegion, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of qemu_plugin_hwaddr"][::std::mem::size_of::() - 24usize]; + ["Alignment of qemu_plugin_hwaddr"][::std::mem::align_of::() - 8usize]; + ["Offset of field: qemu_plugin_hwaddr::is_io"] + [::std::mem::offset_of!(qemu_plugin_hwaddr, is_io) - 0usize]; + ["Offset of field: qemu_plugin_hwaddr::is_store"] + [::std::mem::offset_of!(qemu_plugin_hwaddr, is_store) - 1usize]; + ["Offset of field: qemu_plugin_hwaddr::phys_addr"] + [::std::mem::offset_of!(qemu_plugin_hwaddr, phys_addr) - 8usize]; + ["Offset of field: qemu_plugin_hwaddr::mr"] + [::std::mem::offset_of!(qemu_plugin_hwaddr, mr) - 16usize]; +}; +impl Default for qemu_plugin_hwaddr { + 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 = " tlb_plugin_lookup: query last TLB lookup\n @cpu: cpu environment\n\n This function can be used directly after a memory operation to\n query information about the access. It is used by the plugin\n infrastructure to expose more information about the address.\n\n It would only fail if not called from an instrumented memory access\n which would be an abuse of the API."] + pub fn tlb_plugin_lookup( + cpu: *mut CPUState, + addr: vaddr, + mmu_idx: ::std::os::raw::c_int, + is_store: bool, + data: *mut qemu_plugin_hwaddr, + ) -> bool; +} +unsafe extern "C" { + pub fn libafl_page_from_addr(addr: target_ulong) -> target_ulong; +} +unsafe extern "C" { + pub fn libafl_qemu_get_cpu(cpu_index: ::std::os::raw::c_int) -> *mut CPUState; +} +unsafe extern "C" { + pub fn libafl_qemu_num_cpus() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_current_cpu() -> *mut CPUState; +} +unsafe extern "C" { + pub fn libafl_qemu_cpu_index(arg1: *mut CPUState) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_write_reg( + cpu: *mut CPUState, + reg: ::std::os::raw::c_int, + val: *mut u8, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_read_reg( + cpu: *mut CPUState, + reg: ::std::os::raw::c_int, + val: *mut u8, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_num_regs(cpu: *mut CPUState) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_flush_jit(); +} +unsafe extern "C" { + pub fn libafl_breakpoint_invalidate(cpu: *mut CPUState, pc: target_ulong); +} +unsafe extern "C" { + pub fn libafl_qemu_main() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_qemu_run() -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn libafl_set_qemu_env(env: *mut CPUArchState); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct libafl_custom_gdb_cmd { + pub callback: ::std::option::Option< + unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut u8, arg3: usize) -> bool, + >, + pub data: *mut ::std::os::raw::c_void, + pub next: *mut libafl_custom_gdb_cmd, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of libafl_custom_gdb_cmd"][::std::mem::size_of::() - 24usize]; + ["Alignment of libafl_custom_gdb_cmd"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: libafl_custom_gdb_cmd::callback"] + [::std::mem::offset_of!(libafl_custom_gdb_cmd, callback) - 0usize]; + ["Offset of field: libafl_custom_gdb_cmd::data"] + [::std::mem::offset_of!(libafl_custom_gdb_cmd, data) - 8usize]; + ["Offset of field: libafl_custom_gdb_cmd::next"] + [::std::mem::offset_of!(libafl_custom_gdb_cmd, next) - 16usize]; +}; +impl Default for libafl_custom_gdb_cmd { + 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 fn libafl_qemu_add_gdb_cmd( + callback: ::std::option::Option< + unsafe extern "C" fn( + arg1: *mut ::std::os::raw::c_void, + arg2: *mut u8, + arg3: usize, + ) -> bool, + >, + data: *mut ::std::os::raw::c_void, + ); +} +unsafe extern "C" { + pub fn libafl_qemu_gdb_reply(buf: *const u8, len: usize); +} +unsafe extern "C" { + pub fn libafl_qemu_gdb_exec() -> bool; +} #[repr(C)] #[derive(Debug, Copy, Clone)] -pub struct TCGHelperInfo { - pub func: *mut ::std::os::raw::c_void, - pub name: *const ::std::os::raw::c_char, - pub init: usize, - pub _bitfield_align_1: [u32; 0], - pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>, - pub in_: [TCGCallArgumentLoc; 14usize], +pub struct libafl_breakpoint { + pub addr: target_ulong, + pub next: *mut libafl_breakpoint, } #[allow(clippy::unnecessary_operation, clippy::identity_op)] const _: () = { - ["Size of TCGHelperInfo"][::std::mem::size_of::() - 88usize]; - ["Alignment of TCGHelperInfo"][::std::mem::align_of::() - 8usize]; - ["Offset of field: TCGHelperInfo::func"][::std::mem::offset_of!(TCGHelperInfo, func) - 0usize]; - ["Offset of field: TCGHelperInfo::name"][::std::mem::offset_of!(TCGHelperInfo, name) - 8usize]; - ["Offset of field: TCGHelperInfo::init"][::std::mem::offset_of!(TCGHelperInfo, init) - 16usize]; - ["Offset of field: TCGHelperInfo::in_"][::std::mem::offset_of!(TCGHelperInfo, in_) - 32usize]; + ["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 TCGHelperInfo { +impl Default for libafl_breakpoint { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -7769,228 +8017,193 @@ impl Default for TCGHelperInfo { } } } -impl TCGHelperInfo { - #[inline] - pub fn typemask(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 32u8) as u32) } - } - #[inline] - pub fn set_typemask(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(0usize, 32u8, val as u64) - } - } - #[inline] - pub unsafe fn typemask_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 0usize, - 32u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_typemask_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 0usize, - 32u8, - val as u64, - ) - } - } - #[inline] - pub fn flags(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(32usize, 8u8) as u32) } - } - #[inline] - pub fn set_flags(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(32usize, 8u8, val as u64) - } - } - #[inline] - pub unsafe fn flags_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 32usize, - 8u8, - ) as u32) - } - } - #[inline] - pub unsafe fn set_flags_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 32usize, - 8u8, - val as u64, - ) - } - } - #[inline] - pub fn nr_in(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(40usize, 8u8) as u32) } - } - #[inline] - pub fn set_nr_in(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(40usize, 8u8, val as u64) - } - } +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] - pub unsafe fn nr_in_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 40usize, - 8u8, - ) as u32) - } + fn bitor(self, other: Self) -> Self { + libafl_exit_reason_kind(self.0 | other.0) } +} +impl ::std::ops::BitOrAssign for libafl_exit_reason_kind { #[inline] - pub unsafe fn set_nr_in_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 40usize, - 8u8, - val as u64, - ) - } + 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] - pub fn nr_out(&self) -> ::std::os::raw::c_uint { - unsafe { ::std::mem::transmute(self._bitfield_1.get(48usize, 8u8) as u32) } + fn bitand(self, other: Self) -> Self { + libafl_exit_reason_kind(self.0 & other.0) } +} +impl ::std::ops::BitAndAssign for libafl_exit_reason_kind { #[inline] - pub fn set_nr_out(&mut self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(48usize, 8u8, val as u64) - } + 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] - pub unsafe fn nr_out_raw(this: *const Self) -> ::std::os::raw::c_uint { - unsafe { - ::std::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 48usize, - 8u8, - ) as u32) - } + fn bitor(self, other: Self) -> Self { + libafl_custom_insn_kind(self.0 | other.0) } +} +impl ::std::ops::BitOrAssign for libafl_custom_insn_kind { #[inline] - pub unsafe fn set_nr_out_raw(this: *mut Self, val: ::std::os::raw::c_uint) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 48usize, - 8u8, - val as u64, - ) - } + 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] - pub fn out_kind(&self) -> TCGCallReturnKind { - unsafe { ::std::mem::transmute(self._bitfield_1.get(56usize, 8u8) as u32) } + fn bitand(self, other: Self) -> Self { + libafl_custom_insn_kind(self.0 & other.0) } +} +impl ::std::ops::BitAndAssign for libafl_custom_insn_kind { #[inline] - pub fn set_out_kind(&mut self, val: TCGCallReturnKind) { - unsafe { - let val: u32 = ::std::mem::transmute(val); - self._bitfield_1.set(56usize, 8u8, val as u64) - } + fn bitand_assign(&mut self, rhs: libafl_custom_insn_kind) { + self.0 &= rhs.0; } - #[inline] - pub unsafe fn out_kind_raw(this: *const Self) -> TCGCallReturnKind { +} +#[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::mem::transmute(<__BindgenBitfieldUnit<[u8; 8usize]>>::raw_get( - ::std::ptr::addr_of!((*this)._bitfield_1), - 56usize, - 8u8, - ) as u32) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[inline] - pub unsafe fn set_out_kind_raw(this: *mut Self, val: TCGCallReturnKind) { +} +#[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 { - let val: u32 = ::std::mem::transmute(val); - <__BindgenBitfieldUnit<[u8; 8usize]>>::raw_set( - ::std::ptr::addr_of_mut!((*this)._bitfield_1), - 56usize, - 8u8, - val as u64, - ) + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() } } - #[inline] - pub fn new_bitfield_1( - typemask: ::std::os::raw::c_uint, - flags: ::std::os::raw::c_uint, - nr_in: ::std::os::raw::c_uint, - nr_out: ::std::os::raw::c_uint, - out_kind: TCGCallReturnKind, - ) -> __BindgenBitfieldUnit<[u8; 8usize]> { - let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default(); - __bindgen_bitfield_unit.set(0usize, 32u8, { - let typemask: u32 = unsafe { ::std::mem::transmute(typemask) }; - typemask as u64 - }); - __bindgen_bitfield_unit.set(32usize, 8u8, { - let flags: u32 = unsafe { ::std::mem::transmute(flags) }; - flags as u64 - }); - __bindgen_bitfield_unit.set(40usize, 8u8, { - let nr_in: u32 = unsafe { ::std::mem::transmute(nr_in) }; - nr_in as u64 - }); - __bindgen_bitfield_unit.set(48usize, 8u8, { - let nr_out: u32 = unsafe { ::std::mem::transmute(nr_out) }; - nr_out as u64 - }); - __bindgen_bitfield_unit.set(56usize, 8u8, { - let out_kind: u32 = unsafe { ::std::mem::transmute(out_kind) }; - out_kind as u64 - }); - __bindgen_bitfield_unit - } } -pub type TCGv = TCGv_i64; -#[doc = " struct qemu_plugin_hwaddr - opaque hw address handle"] #[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct qemu_plugin_hwaddr { - pub is_io: bool, - pub is_store: bool, - pub phys_addr: hwaddr, - pub mr: *mut MemoryRegion, +#[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 qemu_plugin_hwaddr"][::std::mem::size_of::() - 24usize]; - ["Alignment of qemu_plugin_hwaddr"][::std::mem::align_of::() - 8usize]; - ["Offset of field: qemu_plugin_hwaddr::is_io"] - [::std::mem::offset_of!(qemu_plugin_hwaddr, is_io) - 0usize]; - ["Offset of field: qemu_plugin_hwaddr::is_store"] - [::std::mem::offset_of!(qemu_plugin_hwaddr, is_store) - 1usize]; - ["Offset of field: qemu_plugin_hwaddr::phys_addr"] - [::std::mem::offset_of!(qemu_plugin_hwaddr, phys_addr) - 8usize]; - ["Offset of field: qemu_plugin_hwaddr::mr"] - [::std::mem::offset_of!(qemu_plugin_hwaddr, mr) - 16usize]; + ["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 qemu_plugin_hwaddr { +impl Default for libafl_exit_reason__bindgen_ty_1 { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); unsafe { @@ -7999,110 +8212,92 @@ impl Default for qemu_plugin_hwaddr { } } } -unsafe extern "C" { - #[doc = " tlb_plugin_lookup: query last TLB lookup\n @cpu: cpu environment\n\n This function can be used directly after a memory operation to\n query information about the access. It is used by the plugin\n infrastructure to expose more information about the address.\n\n It would only fail if not called from an instrumented memory access\n which would be an abuse of the API."] - pub fn tlb_plugin_lookup( - cpu: *mut CPUState, - addr: vaddr, - mmu_idx: ::std::os::raw::c_int, - is_store: bool, - data: *mut qemu_plugin_hwaddr, - ) -> bool; +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 }}") + } } -unsafe extern "C" { - pub fn libafl_page_from_addr(addr: target_ulong) -> target_ulong; +#[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() + } + } } -unsafe extern "C" { - pub fn libafl_qemu_get_cpu(cpu_index: ::std::os::raw::c_int) -> *mut CPUState; +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_num_cpus() -> ::std::os::raw::c_int; + pub fn libafl_qemu_set_breakpoint(pc: target_ulong) -> ::std::os::raw::c_int; } unsafe extern "C" { - pub fn libafl_qemu_current_cpu() -> *mut CPUState; + pub fn libafl_qemu_remove_breakpoint(pc: target_ulong) -> ::std::os::raw::c_int; } unsafe extern "C" { - pub fn libafl_qemu_cpu_index(arg1: *mut CPUState) -> ::std::os::raw::c_int; + pub fn libafl_qemu_trigger_breakpoint(cpu: *mut CPUState); } unsafe extern "C" { - pub fn libafl_qemu_write_reg( - cpu: *mut CPUState, - reg: ::std::os::raw::c_int, - val: *mut u8, - ) -> ::std::os::raw::c_int; + pub fn libafl_qemu_breakpoint_run(pc_next: vaddr); } unsafe extern "C" { - pub fn libafl_qemu_read_reg( - cpu: *mut CPUState, - reg: ::std::os::raw::c_int, - val: *mut u8, - ) -> ::std::os::raw::c_int; + pub fn libafl_last_exit_cpu() -> *mut CPUState; } unsafe extern "C" { - pub fn libafl_qemu_num_regs(cpu: *mut CPUState) -> ::std::os::raw::c_int; + pub fn libafl_exit_signal_vm_start(); } unsafe extern "C" { - pub fn libafl_flush_jit(); + pub fn libafl_exit_asap() -> bool; } unsafe extern "C" { - pub fn libafl_breakpoint_invalidate(cpu: *mut CPUState, pc: target_ulong); + pub fn libafl_sync_exit_cpu(); } unsafe extern "C" { - pub fn libafl_qemu_main() -> ::std::os::raw::c_int; + 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_qemu_run() -> ::std::os::raw::c_int; + pub fn libafl_exit_request_breakpoint(cpu: *mut CPUState, pc: target_ulong); } unsafe extern "C" { - pub fn libafl_set_qemu_env(env: *mut CPUArchState); -} -#[repr(C)] -#[derive(Debug, Copy, Clone)] -pub struct libafl_custom_gdb_cmd { - pub callback: ::std::option::Option< - unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void, arg2: *mut u8, arg3: usize) -> bool, - >, - pub data: *mut ::std::os::raw::c_void, - pub next: *mut libafl_custom_gdb_cmd, -} -#[allow(clippy::unnecessary_operation, clippy::identity_op)] -const _: () = { - ["Size of libafl_custom_gdb_cmd"][::std::mem::size_of::() - 24usize]; - ["Alignment of libafl_custom_gdb_cmd"] - [::std::mem::align_of::() - 8usize]; - ["Offset of field: libafl_custom_gdb_cmd::callback"] - [::std::mem::offset_of!(libafl_custom_gdb_cmd, callback) - 0usize]; - ["Offset of field: libafl_custom_gdb_cmd::data"] - [::std::mem::offset_of!(libafl_custom_gdb_cmd, data) - 8usize]; - ["Offset of field: libafl_custom_gdb_cmd::next"] - [::std::mem::offset_of!(libafl_custom_gdb_cmd, next) - 16usize]; -}; -impl Default for libafl_custom_gdb_cmd { - 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 fn libafl_exit_request_custom_insn( + cpu: *mut CPUState, + pc: target_ulong, + kind: libafl_custom_insn_kind, + ); } unsafe extern "C" { - pub fn libafl_qemu_add_gdb_cmd( - callback: ::std::option::Option< - unsafe extern "C" fn( - arg1: *mut ::std::os::raw::c_void, - arg2: *mut u8, - arg3: usize, - ) -> bool, - >, - data: *mut ::std::os::raw::c_void, - ); + pub fn libafl_exit_request_crash(cpu: *mut CPUState); } unsafe extern "C" { - pub fn libafl_qemu_gdb_reply(buf: *const u8, len: usize); + pub fn libafl_exit_request_timeout(); } unsafe extern "C" { - pub fn libafl_qemu_gdb_exec() -> bool; + 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/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( From d89ba21df07ee9912a7f3a6ae3e68a6fc6238c76 Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 2 May 2025 11:20:12 +0200 Subject: [PATCH 3/8] update --- libafl_qemu/libafl_qemu_build/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index 066047d091..3145c72367 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 = "93663809156a33475ade972cdd5b1301b9310687"; +pub const QEMU_REVISION: &str = "d744fc4f425fbf8f14fa80afdbdc9fec705588ec"; pub struct BuildResult { pub qemu_path: PathBuf, From 8ab0f0c0283048a62ddd665e0f565ab8d09d3cfd Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 2 May 2025 11:36:36 +0200 Subject: [PATCH 4/8] Revert "Update hashbrown requirement from 0.14.5 to 0.15.3 (#3184)" (#3186) This reverts commit 4448799dc2205e4cb1753b8b8d91b4f6d299365d. --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index ef01e224f9..f395d33f6e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -95,7 +95,7 @@ cc = "1.1.21" cmake = "0.1.51" document-features = "0.2.10" fastbloom = { version = "0.9.0", default-features = false } -hashbrown = { version = "0.15.3", default-features = false } # A faster hashmap, nostd compatible +hashbrown = { version = "0.14.5", default-features = false } # A faster hashmap, nostd compatible just = "1.40.0" libc = "0.2.159" # For (*nix) libc libipt = "0.3.0" From b61f6d9f6bb0639eff3ad557f3be7cbf4ffc2b8d Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 2 May 2025 15:31:35 +0200 Subject: [PATCH 5/8] update qemu --- libafl_qemu/libafl_qemu_build/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index 3145c72367..ff624f8148 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 = "d744fc4f425fbf8f14fa80afdbdc9fec705588ec"; +pub const QEMU_REVISION: &str = "5feca574fc1beee0a9bf0768e7b63c1c8f39930b"; pub struct BuildResult { pub qemu_path: PathBuf, From a7bd8feeee02ddae992409f6efa3ef257864613b Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 2 May 2025 18:54:38 +0200 Subject: [PATCH 6/8] fix systemmode --- libafl_qemu/libafl_qemu_build/src/bindings.rs | 6 +++--- libafl_qemu/src/command/nyx.rs | 1 + libafl_qemu/src/command/parser/nyx.rs | 10 +++++----- libafl_qemu/src/qemu/mod.rs | 4 ++-- libafl_qemu/src/qemu/systemmode.rs | 8 ++++---- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/libafl_qemu/libafl_qemu_build/src/bindings.rs b/libafl_qemu/libafl_qemu_build/src/bindings.rs index aa6e83dbf3..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" @@ -120,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/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/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. From 33b9d48b5812aa23a851fa2c2e53ccf7be261bf4 Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 2 May 2025 19:44:07 +0200 Subject: [PATCH 7/8] update qemu --- libafl_qemu/libafl_qemu_build/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index ff624f8148..c761aeed9a 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 = "5feca574fc1beee0a9bf0768e7b63c1c8f39930b"; +pub const QEMU_REVISION: &str = "13757ee0e957747b3d891e961e754d2885ee6432"; pub struct BuildResult { pub qemu_path: PathBuf, From 806a42d7d054f977cb2c0da0a82c68188c43ba3d Mon Sep 17 00:00:00 2001 From: Romain Malmain Date: Fri, 2 May 2025 22:21:52 +0200 Subject: [PATCH 8/8] update qemu --- libafl_qemu/libafl_qemu_build/src/build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_qemu/libafl_qemu_build/src/build.rs b/libafl_qemu/libafl_qemu_build/src/build.rs index c761aeed9a..1c756ee2b4 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 = "13757ee0e957747b3d891e961e754d2885ee6432"; +pub const QEMU_REVISION: &str = "d20fb07d99ffccd481b439e104ae3624ef5c75da"; pub struct BuildResult { pub qemu_path: PathBuf,