[][src]Struct panda::prelude::CPUState

#[repr(C)]pub struct CPUState {
    pub parent_obj: DeviceState,
    pub nr_cores: i32,
    pub nr_threads: i32,
    pub numa_node: i32,
    pub thread: *mut QemuThread,
    pub thread_id: i32,
    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: i32,
    pub icount_budget: i64,
    pub icount_extra: i64,
    pub jmp_env: [__jmp_buf_tag; 1],
    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: i32,
    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: i32,
    pub gdb_num_g_regs: i32,
    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: u64,
    pub kvm_fd: i32,
    pub kvm_vcpu_dirty: bool,
    pub kvm_state: *mut KVMState,
    pub kvm_run: *mut kvm_run,
    pub trace_dstate: *mut u64,
    pub cpu_index: i32,
    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: u64,
    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,
}

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: DeviceStatenr_cores: i32nr_threads: i32numa_node: i32thread: *mut QemuThreadthread_id: i32host_tid: u32running: boolhas_waiter: boolhalt_cond: *mut QemuCondthread_kicked: boolcreated: boolstop: boolstopped: boolunplug: boolcrash_occurred: boolexit_request: boolinterrupt_request: u32singlestep_enabled: i32icount_budget: i64icount_extra: i64jmp_env: [__jmp_buf_tag; 1]work_mutex: QemuMutexqueued_work_first: *mut qemu_work_itemqueued_work_last: *mut qemu_work_itemcpu_ases: *mut CPUAddressSpacenum_ases: i32as_: *mut AddressSpacememory: *mut MemoryRegionenv_ptr: *mut c_voidtb_jmp_cache: [*mut TranslationBlock; 4096]gdb_regs: *mut GDBRegisterStategdb_num_regs: i32gdb_num_g_regs: i32node: CPUState__bindgen_ty_1breakpoints: CPUState_breakpoints_headwatchpoints: CPUState_watchpoints_headwatchpoint_hit: *mut CPUWatchpointwatchpoints_disabled: boolopaque: *mut c_voidmem_io_pc: usizemem_io_vaddr: u64kvm_fd: i32kvm_vcpu_dirty: boolkvm_state: *mut KVMStatekvm_run: *mut kvm_runtrace_dstate: *mut u64cpu_index: i32halted: u32icount_decr: CPUState__bindgen_ty_2can_do_io: u32exception_index: i32rr_guest_instr_count: u64panda_guest_pc: u64reverse_flags: u8last_gdb_instr: u64last_bp_hit_instr: u64temp_rr_bp_instr: u64throttle_thread_scheduled: booltcg_exit_req: u32hax_vcpu_dirty: boolhax_vcpu: *mut hax_vcpu_statepending_tlb_flush: u16

Implementations

impl CPUState[src]

pub fn mem_read(&mut self, addr: u64, len: usize) -> Vec<u8, Global>[src]

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

pub fn try_mem_read(&mut self, addr: u64, len: usize) -> Option<Vec<u8, Global>>[src]

pub fn try_mem_read_phys(
    &mut self,
    addr: u64,
    len: usize
) -> Option<Vec<u8, Global>>
[src]

pub fn mem_read_val<T>(&mut self, addr: u64) -> T[src]

pub fn mem_read_string(&mut self, addr: u64) -> String[src]

Trait Implementations

impl Clone for CPUState[src]

impl Copy for CPUState[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.