Struct panda_sys::CPUClass

source ·
#[repr(C)]
pub struct CPUClass {
Show 41 fields pub parent_class: DeviceClass, pub class_by_name: Option<unsafe extern "C" fn(cpu_model: *const c_char) -> *mut ObjectClass>, pub parse_features: Option<unsafe extern "C" fn(typename: *const c_char, str_: *mut c_char, errp: *mut *mut Error)>, pub reset: Option<unsafe extern "C" fn(cpu: *mut CPUState)>, pub reset_dump_flags: c_int, pub has_work: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> bool>, pub do_interrupt: Option<unsafe extern "C" fn(cpu: *mut CPUState)>, pub do_unassigned_access: CPUUnassignedAccess, pub do_unaligned_access: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, access_type: MMUAccessType, mmu_idx: c_int, retaddr: usize)>, pub virtio_is_big_endian: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> bool>, pub memory_rw_debug: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, buf: *mut u8, len: c_int, is_write: bool) -> c_int>, pub dump_state: Option<unsafe extern "C" fn(cpu: *mut CPUState, f: *mut FILE, cpu_fprintf: fprintf_function, flags: c_int)>, pub get_crash_info: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> *mut GuestPanicInformation>, pub dump_statistics: Option<unsafe extern "C" fn(cpu: *mut CPUState, f: *mut FILE, cpu_fprintf: fprintf_function, flags: c_int)>, pub get_arch_id: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> i64>, pub get_paging_enabled: Option<unsafe extern "C" fn(cpu: *const CPUState) -> bool>, pub get_memory_mapping: Option<unsafe extern "C" fn(cpu: *mut CPUState, list: *mut MemoryMappingList, errp: *mut *mut Error)>, pub set_pc: Option<unsafe extern "C" fn(cpu: *mut CPUState, value: vaddr)>, pub synchronize_from_tb: Option<unsafe extern "C" fn(cpu: *mut CPUState, tb: *mut TranslationBlock)>, pub handle_mmu_fault: Option<unsafe extern "C" fn(cpu: *mut CPUState, address: vaddr, rw: c_int, mmu_index: c_int) -> c_int>, pub get_phys_page_debug: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr) -> hwaddr>, pub get_phys_page_attrs_debug: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, attrs: *mut MemTxAttrs) -> hwaddr>, pub asidx_from_attrs: Option<unsafe extern "C" fn(cpu: *mut CPUState, attrs: MemTxAttrs) -> c_int>, pub gdb_read_register: Option<unsafe extern "C" fn(cpu: *mut CPUState, buf: *mut u8, reg: c_int) -> c_int>, pub gdb_write_register: Option<unsafe extern "C" fn(cpu: *mut CPUState, buf: *mut u8, reg: c_int) -> c_int>, pub debug_check_watchpoint: Option<unsafe extern "C" fn(cpu: *mut CPUState, wp: *mut CPUWatchpoint) -> bool>, pub debug_excp_handler: Option<unsafe extern "C" fn(cpu: *mut CPUState)>, pub write_elf64_note: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, cpuid: c_int, opaque: *mut c_void) -> c_int>, pub write_elf64_qemunote: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, opaque: *mut c_void) -> c_int>, pub write_elf32_note: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, cpuid: c_int, opaque: *mut c_void) -> c_int>, pub write_elf32_qemunote: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, opaque: *mut c_void) -> c_int>, pub vmsd: *const VMStateDescription, pub gdb_num_core_regs: c_int, pub gdb_core_xml_file: *const c_char, pub gdb_arch_name: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> *mut gchar>, pub gdb_stop_before_watchpoint: bool, pub cpu_exec_enter: Option<unsafe extern "C" fn(cpu: *mut CPUState)>, pub cpu_exec_exit: Option<unsafe extern "C" fn(cpu: *mut CPUState)>, pub cpu_exec_interrupt: Option<unsafe extern "C" fn(cpu: *mut CPUState, interrupt_request: c_int) -> bool>, pub disas_set_info: Option<unsafe extern "C" fn(cpu: *mut CPUState, info: *mut disassemble_info)>, pub adjust_watchpoint_address: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, len: c_int) -> vaddr>,
}
Expand description

CPUClass: @class_by_name: Callback to map -cpu command line model name to an instantiatable CPU type. @parse_features: Callback to parse command line arguments. @reset: Callback to reset the #CPUState to its initial state. @reset_dump_flags: #CPUDumpFlags to use for reset logging. @has_work: Callback for checking if there is work to do. @do_interrupt: Callback for interrupt handling. @do_unassigned_access: Callback for unassigned access handling. @do_unaligned_access: Callback for unaligned access handling, if the target defines #ALIGNED_ONLY. @virtio_is_big_endian: Callback to return %true if a CPU which supports runtime configurable endianness is currently big-endian. Non-configurable CPUs can use the default implementation of this method. This method should not be used by any callers other than the pre-1.0 virtio devices. @memory_rw_debug: Callback for GDB memory access. @dump_state: Callback for dumping state. @dump_statistics: Callback for dumping statistics. @get_arch_id: Callback for getting architecture-dependent CPU ID. @get_paging_enabled: Callback for inquiring whether paging is enabled. @get_memory_mapping: Callback for obtaining the memory mappings. @set_pc: Callback for setting the Program Counter register. @synchronize_from_tb: Callback for synchronizing state from a TCG #TranslationBlock. @handle_mmu_fault: Callback for handling an MMU fault. @get_phys_page_debug: Callback for obtaining a physical address. @get_phys_page_attrs_debug: Callback for obtaining a physical address and the associated memory transaction attributes to use for the access. CPUs which use memory transaction attributes should implement this instead of get_phys_page_debug. @asidx_from_attrs: Callback to return the CPU AddressSpace to use for a memory access with the specified memory transaction attributes. @gdb_read_register: Callback for letting GDB read a register. @gdb_write_register: Callback for letting GDB write a register. @debug_check_watchpoint: Callback: return true if the architectural watchpoint whose address has matched should really fire. @debug_excp_handler: Callback for handling debug exceptions. @write_elf64_note: Callback for writing a CPU-specific ELF note to a 64-bit VM coredump. @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF note to a 32-bit VM coredump. @write_elf32_note: Callback for writing a CPU-specific ELF note to a 32-bit VM coredump. @write_elf32_qemunote: Callback for writing a CPU- and QEMU-specific ELF note to a 32-bit VM coredump. @vmsd: State description for migration. @gdb_num_core_regs: Number of core registers accessible to GDB. @gdb_core_xml_file: File name for core registers GDB XML description. @gdb_stop_before_watchpoint: Indicates whether GDB expects the CPU to stop before the insn which triggers a watchpoint rather than after it. @gdb_arch_name: Optional callback that returns the architecture name known to GDB. The caller must free the returned string with g_free. @cpu_exec_enter: Callback for cpu_exec preparation. @cpu_exec_exit: Callback for cpu_exec cleanup. @cpu_exec_interrupt: Callback for processing interrupts in cpu_exec. @disas_set_info: Setup architecture specific components of disassembly info @adjust_watchpoint_address: Perform a target-specific adjustment to an address before attempting to match it against watchpoints.

Represents a CPU family or model.

Fields§

§parent_class: DeviceClass§class_by_name: Option<unsafe extern "C" fn(cpu_model: *const c_char) -> *mut ObjectClass>§parse_features: Option<unsafe extern "C" fn(typename: *const c_char, str_: *mut c_char, errp: *mut *mut Error)>§reset: Option<unsafe extern "C" fn(cpu: *mut CPUState)>§reset_dump_flags: c_int§has_work: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> bool>§do_interrupt: Option<unsafe extern "C" fn(cpu: *mut CPUState)>§do_unassigned_access: CPUUnassignedAccess§do_unaligned_access: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, access_type: MMUAccessType, mmu_idx: c_int, retaddr: usize)>§virtio_is_big_endian: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> bool>§memory_rw_debug: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, buf: *mut u8, len: c_int, is_write: bool) -> c_int>§dump_state: Option<unsafe extern "C" fn(cpu: *mut CPUState, f: *mut FILE, cpu_fprintf: fprintf_function, flags: c_int)>§get_crash_info: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> *mut GuestPanicInformation>§dump_statistics: Option<unsafe extern "C" fn(cpu: *mut CPUState, f: *mut FILE, cpu_fprintf: fprintf_function, flags: c_int)>§get_arch_id: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> i64>§get_paging_enabled: Option<unsafe extern "C" fn(cpu: *const CPUState) -> bool>§get_memory_mapping: Option<unsafe extern "C" fn(cpu: *mut CPUState, list: *mut MemoryMappingList, errp: *mut *mut Error)>§set_pc: Option<unsafe extern "C" fn(cpu: *mut CPUState, value: vaddr)>§synchronize_from_tb: Option<unsafe extern "C" fn(cpu: *mut CPUState, tb: *mut TranslationBlock)>§handle_mmu_fault: Option<unsafe extern "C" fn(cpu: *mut CPUState, address: vaddr, rw: c_int, mmu_index: c_int) -> c_int>§get_phys_page_debug: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr) -> hwaddr>§get_phys_page_attrs_debug: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, attrs: *mut MemTxAttrs) -> hwaddr>§asidx_from_attrs: Option<unsafe extern "C" fn(cpu: *mut CPUState, attrs: MemTxAttrs) -> c_int>§gdb_read_register: Option<unsafe extern "C" fn(cpu: *mut CPUState, buf: *mut u8, reg: c_int) -> c_int>§gdb_write_register: Option<unsafe extern "C" fn(cpu: *mut CPUState, buf: *mut u8, reg: c_int) -> c_int>§debug_check_watchpoint: Option<unsafe extern "C" fn(cpu: *mut CPUState, wp: *mut CPUWatchpoint) -> bool>§debug_excp_handler: Option<unsafe extern "C" fn(cpu: *mut CPUState)>§write_elf64_note: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, cpuid: c_int, opaque: *mut c_void) -> c_int>§write_elf64_qemunote: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, opaque: *mut c_void) -> c_int>§write_elf32_note: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, cpuid: c_int, opaque: *mut c_void) -> c_int>§write_elf32_qemunote: Option<unsafe extern "C" fn(f: WriteCoreDumpFunction, cpu: *mut CPUState, opaque: *mut c_void) -> c_int>§vmsd: *const VMStateDescription§gdb_num_core_regs: c_int§gdb_core_xml_file: *const c_char§gdb_arch_name: Option<unsafe extern "C" fn(cpu: *mut CPUState) -> *mut gchar>§gdb_stop_before_watchpoint: bool§cpu_exec_enter: Option<unsafe extern "C" fn(cpu: *mut CPUState)>§cpu_exec_exit: Option<unsafe extern "C" fn(cpu: *mut CPUState)>§cpu_exec_interrupt: Option<unsafe extern "C" fn(cpu: *mut CPUState, interrupt_request: c_int) -> bool>§disas_set_info: Option<unsafe extern "C" fn(cpu: *mut CPUState, info: *mut disassemble_info)>§adjust_watchpoint_address: Option<unsafe extern "C" fn(cpu: *mut CPUState, addr: vaddr, len: c_int) -> vaddr>

Trait Implementations§

source§

impl Clone for CPUClass

source§

fn clone(&self) -> CPUClass

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for CPUClass

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Copy for CPUClass

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.