#[repr(C)]pub struct CPUClass {Show 41 fields
pub parent_class: DeviceClass,
pub class_by_name: Option<unsafe extern "C" fn(*const i8) -> *mut ObjectClass>,
pub parse_features: Option<unsafe extern "C" fn(*const i8, *mut i8, *mut *mut Error)>,
pub reset: Option<unsafe extern "C" fn(*mut CPUState)>,
pub reset_dump_flags: i32,
pub has_work: Option<unsafe extern "C" fn(*mut CPUState) -> bool>,
pub do_interrupt: Option<unsafe extern "C" fn(*mut CPUState)>,
pub do_unassigned_access: Option<unsafe extern "C" fn(*mut CPUState, u64, bool, bool, i32, u32)>,
pub do_unaligned_access: Option<unsafe extern "C" fn(*mut CPUState, u64, u32, i32, usize)>,
pub virtio_is_big_endian: Option<unsafe extern "C" fn(*mut CPUState) -> bool>,
pub memory_rw_debug: Option<unsafe extern "C" fn(*mut CPUState, u64, *mut u8, i32, bool) -> i32>,
pub dump_state: Option<unsafe extern "C" fn(*mut CPUState, *mut _IO_FILE, Option<unsafe extern "C" fn(*mut _IO_FILE, *const i8, ...) -> i32>, i32)>,
pub get_crash_info: Option<unsafe extern "C" fn(*mut CPUState) -> *mut GuestPanicInformation>,
pub dump_statistics: Option<unsafe extern "C" fn(*mut CPUState, *mut _IO_FILE, Option<unsafe extern "C" fn(*mut _IO_FILE, *const i8, ...) -> i32>, i32)>,
pub get_arch_id: Option<unsafe extern "C" fn(*mut CPUState) -> i64>,
pub get_paging_enabled: Option<unsafe extern "C" fn(*const CPUState) -> bool>,
pub get_memory_mapping: Option<unsafe extern "C" fn(*mut CPUState, *mut MemoryMappingList, *mut *mut Error)>,
pub set_pc: Option<unsafe extern "C" fn(*mut CPUState, u64)>,
pub synchronize_from_tb: Option<unsafe extern "C" fn(*mut CPUState, *mut TranslationBlock)>,
pub handle_mmu_fault: Option<unsafe extern "C" fn(*mut CPUState, u64, i32, i32) -> i32>,
pub get_phys_page_debug: Option<unsafe extern "C" fn(*mut CPUState, u64) -> u64>,
pub get_phys_page_attrs_debug: Option<unsafe extern "C" fn(*mut CPUState, u64, *mut MemTxAttrs) -> u64>,
pub asidx_from_attrs: Option<unsafe extern "C" fn(*mut CPUState, MemTxAttrs) -> i32>,
pub gdb_read_register: Option<unsafe extern "C" fn(*mut CPUState, *mut u8, i32) -> i32>,
pub gdb_write_register: Option<unsafe extern "C" fn(*mut CPUState, *mut u8, i32) -> i32>,
pub debug_check_watchpoint: Option<unsafe extern "C" fn(*mut CPUState, *mut CPUWatchpoint) -> bool>,
pub debug_excp_handler: Option<unsafe extern "C" fn(*mut CPUState)>,
pub write_elf64_note: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, i32, *mut c_void) -> i32>,
pub write_elf64_qemunote: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, *mut c_void) -> i32>,
pub write_elf32_note: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, i32, *mut c_void) -> i32>,
pub write_elf32_qemunote: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, *mut c_void) -> i32>,
pub vmsd: *const VMStateDescription,
pub gdb_num_core_regs: i32,
pub gdb_core_xml_file: *const i8,
pub gdb_arch_name: Option<unsafe extern "C" fn(*mut CPUState) -> *mut i8>,
pub gdb_stop_before_watchpoint: bool,
pub cpu_exec_enter: Option<unsafe extern "C" fn(*mut CPUState)>,
pub cpu_exec_exit: Option<unsafe extern "C" fn(*mut CPUState)>,
pub cpu_exec_interrupt: Option<unsafe extern "C" fn(*mut CPUState, i32) -> bool>,
pub disas_set_info: Option<unsafe extern "C" fn(*mut CPUState, *mut disassemble_info)>,
pub adjust_watchpoint_address: Option<unsafe extern "C" fn(*mut CPUState, u64, i32) -> u64>,
}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(*const i8) -> *mut ObjectClass>§parse_features: Option<unsafe extern "C" fn(*const i8, *mut i8, *mut *mut Error)>§reset: Option<unsafe extern "C" fn(*mut CPUState)>§reset_dump_flags: i32§has_work: Option<unsafe extern "C" fn(*mut CPUState) -> bool>§do_interrupt: Option<unsafe extern "C" fn(*mut CPUState)>§do_unassigned_access: Option<unsafe extern "C" fn(*mut CPUState, u64, bool, bool, i32, u32)>§do_unaligned_access: Option<unsafe extern "C" fn(*mut CPUState, u64, u32, i32, usize)>§virtio_is_big_endian: Option<unsafe extern "C" fn(*mut CPUState) -> bool>§memory_rw_debug: Option<unsafe extern "C" fn(*mut CPUState, u64, *mut u8, i32, bool) -> i32>§dump_state: Option<unsafe extern "C" fn(*mut CPUState, *mut _IO_FILE, Option<unsafe extern "C" fn(*mut _IO_FILE, *const i8, ...) -> i32>, i32)>§get_crash_info: Option<unsafe extern "C" fn(*mut CPUState) -> *mut GuestPanicInformation>§dump_statistics: Option<unsafe extern "C" fn(*mut CPUState, *mut _IO_FILE, Option<unsafe extern "C" fn(*mut _IO_FILE, *const i8, ...) -> i32>, i32)>§get_arch_id: Option<unsafe extern "C" fn(*mut CPUState) -> i64>§get_paging_enabled: Option<unsafe extern "C" fn(*const CPUState) -> bool>§get_memory_mapping: Option<unsafe extern "C" fn(*mut CPUState, *mut MemoryMappingList, *mut *mut Error)>§set_pc: Option<unsafe extern "C" fn(*mut CPUState, u64)>§synchronize_from_tb: Option<unsafe extern "C" fn(*mut CPUState, *mut TranslationBlock)>§handle_mmu_fault: Option<unsafe extern "C" fn(*mut CPUState, u64, i32, i32) -> i32>§get_phys_page_debug: Option<unsafe extern "C" fn(*mut CPUState, u64) -> u64>§get_phys_page_attrs_debug: Option<unsafe extern "C" fn(*mut CPUState, u64, *mut MemTxAttrs) -> u64>§asidx_from_attrs: Option<unsafe extern "C" fn(*mut CPUState, MemTxAttrs) -> i32>§gdb_read_register: Option<unsafe extern "C" fn(*mut CPUState, *mut u8, i32) -> i32>§gdb_write_register: Option<unsafe extern "C" fn(*mut CPUState, *mut u8, i32) -> i32>§debug_check_watchpoint: Option<unsafe extern "C" fn(*mut CPUState, *mut CPUWatchpoint) -> bool>§debug_excp_handler: Option<unsafe extern "C" fn(*mut CPUState)>§write_elf64_note: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, i32, *mut c_void) -> i32>§write_elf64_qemunote: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, *mut c_void) -> i32>§write_elf32_note: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, i32, *mut c_void) -> i32>§write_elf32_qemunote: Option<unsafe extern "C" fn(Option<unsafe extern "C" fn(*const c_void, u64, *mut c_void) -> i32>, *mut CPUState, *mut c_void) -> i32>§vmsd: *const VMStateDescription§gdb_num_core_regs: i32§gdb_core_xml_file: *const i8§gdb_arch_name: Option<unsafe extern "C" fn(*mut CPUState) -> *mut i8>§gdb_stop_before_watchpoint: bool§cpu_exec_enter: Option<unsafe extern "C" fn(*mut CPUState)>§cpu_exec_exit: Option<unsafe extern "C" fn(*mut CPUState)>§cpu_exec_interrupt: Option<unsafe extern "C" fn(*mut CPUState, i32) -> bool>§disas_set_info: Option<unsafe extern "C" fn(*mut CPUState, *mut disassemble_info)>§adjust_watchpoint_address: Option<unsafe extern "C" fn(*mut CPUState, u64, i32) -> u64>