Struct panda_sys::CPUState

source ·
#[repr(C)]
pub struct CPUState {
Show 63 fields pub parent_obj: DeviceState, pub nr_cores: c_int, pub nr_threads: c_int, pub numa_node: c_int, pub thread: *mut QemuThread, pub thread_id: c_int, pub host_tid: u32, 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 unplug: bool, pub crash_occurred: bool, pub exit_request: bool, pub interrupt_request: u32, pub singlestep_enabled: c_int, pub icount_budget: i64, pub icount_extra: i64, pub jmp_env: sigjmp_buf, pub work_mutex: QemuMutex, pub queued_work_first: *mut qemu_work_item, pub queued_work_last: *mut qemu_work_item, pub cpu_ases: *mut CPUAddressSpace, pub num_ases: c_int, pub as_: *mut AddressSpace, pub memory: *mut MemoryRegion, pub env_ptr: *mut c_void, pub tb_jmp_cache: [*mut TranslationBlock; 4096], pub gdb_regs: *mut GDBRegisterState, pub gdb_num_regs: c_int, pub gdb_num_g_regs: c_int, pub node: CPUState__bindgen_ty_1, pub breakpoints: CPUState_breakpoints_head, pub watchpoints: CPUState_watchpoints_head, pub watchpoint_hit: *mut CPUWatchpoint, pub watchpoints_disabled: bool, pub opaque: *mut c_void, pub mem_io_pc: usize, pub mem_io_vaddr: vaddr, pub kvm_fd: c_int, pub kvm_vcpu_dirty: bool, pub kvm_state: *mut KVMState, pub kvm_run: *mut kvm_run, pub trace_dstate: *mut c_ulong, pub cpu_index: c_int, pub halted: u32, pub icount_decr: CPUState__bindgen_ty_2, pub can_do_io: u32, pub exception_index: i32, pub rr_guest_instr_count: u64, pub panda_guest_pc: vaddr, pub reverse_flags: u8, pub last_gdb_instr: u64, pub last_bp_hit_instr: u64, pub temp_rr_bp_instr: u64, pub throttle_thread_scheduled: bool, pub tcg_exit_req: u32, pub hax_vcpu_dirty: bool, pub hax_vcpu: *mut hax_vcpu_state, pub pending_tlb_flush: u16,
}
Expand description

CPUState: @cpu_index: CPU index (informative). @nr_cores: Number of cores within this CPU package. @nr_threads: Number of threads within this CPU. @numa_node: NUMA node this CPU is belonging to. @host_tid: Host thread ID. @running: #true if CPU is currently running (lockless). @has_waiter: #true if a CPU is currently waiting for the cpu_exec_end; valid under cpu_list_lock. @created: Indicates whether the CPU thread has been successfully created. @interrupt_request: Indicates a pending interrupt request. @halted: Nonzero if the CPU is in suspended state. @stop: Indicates a pending stop request. @stopped: Indicates the CPU has been artificially stopped. @unplug: Indicates a pending CPU unplug request. @crash_occurred: Indicates the OS reported a crash (panic) for this CPU @tcg_exit_req: Set to force TCG to stop executing linked TBs for this CPU and return to its top level loop. @singlestep_enabled: Flags for single-stepping. @icount_extra: Instructions until next timer event. @icount_decr: Number of cycles left, with interrupt flag in high bit. This allows a single read-compare-cbranch-write sequence to test for both decrementer underflow and exceptions. @can_do_io: Nonzero if memory-mapped IO is safe. Deterministic execution requires that IO only be performed on the last instruction of a TB so that interrupts take effect immediately. @cpu_ases: Pointer to array of CPUAddressSpaces (which define the AddressSpaces this CPU has) @num_ases: number of CPUAddressSpaces in @cpu_ases @as: Pointer to the first AddressSpace, for the convenience of targets which only have a single AddressSpace @env_ptr: Pointer to subclass-specific CPUArchState field. @gdb_regs: Additional GDB registers. @gdb_num_regs: Number of total registers accessible to GDB. @gdb_num_g_regs: Number of registers in GDB ‘g’ packets. @next_cpu: Next CPU sharing TB cache. @opaque: User data. @mem_io_pc: Host Program Counter at which the memory was accessed. @mem_io_vaddr: Target virtual address at which the memory was accessed. @kvm_fd: vCPU file descriptor for KVM. @work_mutex: Lock to prevent multiple access to queued_work_*. @queued_work_first: First asynchronous work pending. @trace_dstate: Dynamic tracing state of events for this vCPU (bitmask).

State of one CPU core or thread.

Fields§

§parent_obj: DeviceState§nr_cores: c_int§nr_threads: c_int§numa_node: c_int§thread: *mut QemuThread§thread_id: c_int§host_tid: u32§running: bool§has_waiter: bool§halt_cond: *mut QemuCond§thread_kicked: bool§created: bool§stop: bool§stopped: bool§unplug: bool§crash_occurred: bool§exit_request: bool§interrupt_request: u32§singlestep_enabled: c_int§icount_budget: i64§icount_extra: i64§jmp_env: sigjmp_buf§work_mutex: QemuMutex§queued_work_first: *mut qemu_work_item§queued_work_last: *mut qemu_work_item§cpu_ases: *mut CPUAddressSpace§num_ases: c_int§as_: *mut AddressSpace§memory: *mut MemoryRegion§env_ptr: *mut c_void§tb_jmp_cache: [*mut TranslationBlock; 4096]§gdb_regs: *mut GDBRegisterState§gdb_num_regs: c_int§gdb_num_g_regs: c_int§node: CPUState__bindgen_ty_1§breakpoints: CPUState_breakpoints_head§watchpoints: CPUState_watchpoints_head§watchpoint_hit: *mut CPUWatchpoint§watchpoints_disabled: bool§opaque: *mut c_void§mem_io_pc: usize§mem_io_vaddr: vaddr§kvm_fd: c_int§kvm_vcpu_dirty: bool§kvm_state: *mut KVMState§kvm_run: *mut kvm_run§trace_dstate: *mut c_ulong§cpu_index: c_int§halted: u32§icount_decr: CPUState__bindgen_ty_2§can_do_io: u32§exception_index: i32§rr_guest_instr_count: u64§panda_guest_pc: vaddr§reverse_flags: u8§last_gdb_instr: u64§last_bp_hit_instr: u64§temp_rr_bp_instr: u64§throttle_thread_scheduled: bool§tcg_exit_req: u32§hax_vcpu_dirty: bool§hax_vcpu: *mut hax_vcpu_state§pending_tlb_flush: u16

Implementations§

source§

impl CPUState

source

pub fn mem_read(&mut self, addr: target_ulong, len: usize) -> Vec<u8>

source

pub fn mem_write(&mut self, addr: target_ulong, data: &[u8])

source

pub fn try_mem_read( &mut self, addr: target_ulong, len: usize ) -> Option<Vec<u8>>

source

pub fn try_mem_read_phys( &mut self, addr: target_ptr_t, len: usize ) -> Option<Vec<u8>>

source

pub fn mem_read_val<T: Sized>(&mut self, addr: target_ulong) -> T

source

pub fn mem_read_string(&mut self, addr: target_ptr_t) -> String

Trait Implementations§

source§

impl Clone for CPUState

source§

fn clone(&self) -> CPUState

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 Copy for CPUState

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.