Enum simics_api_sys::osa_read_len_t

source ·
#[repr(u32)]
pub enum osa_read_len_t { OSA_Read_One_Byte = 1, OSA_Read_Two_Byte = 2, OSA_Read_Four_Byte = 4, OSA_Read_Eight_Byte = 8, }
Expand description
osa_machine_notification_interface_t osa_machine_notification_interface_t

notify_mode_change!osa_machine_notification interface method notify_mode_change registers a callback function that will be called when processor cpu changes processor mode. The callback function will be called with the processor that changed mode cpu, the mode previous to the change old_mode and the mode after the change new_mode.

notify_exception!osa_machine_notification interface method notify_exception registers a callback function that will be called when processor cpu takes an exception with exception number exc_num. The callback function cb will be called with the processor cpu causing the exception and exception number exc_num of that exception.

notify_control_reg!osa_machine_notification interface method notify_control_reg registers a callback function that will be called when a control register, with register number reg_num, in processor cpu is updated. The callback function cb will be called with the processor cpu, register number reg_num and the written register value (see Core_Control_Register_Write documentation for more details) as arguments. The register number for a certain register can be retrieved with the get_register_number function.

notify_control_reg_read!osa_machine_notification interface method notify_control_reg_read registers a callback function that will be called when a control register, with register number reg_num, in processor cpu is read. The callback function cb will be called with the processor cpu and register number reg_num as arguments. The register number for a certain register can be retrieved with the get_register_number function.

notify_exec_breakpoint!osa_machine_notification interface method notify_exec_breakpoint, notify_read_breakpoint!osa_machine_notification interface method notify_read_breakpoint and notify_write_breakpoint!osa_machine_notification interface method notify_write_breakpoint plant breakpoints of length len for processor cpu on address. The breakpoint is of type execution, read, write respectively. The virt argument specifies if address is a virtual or physical address. The callback function cb is called when the breakpoint is hit. The arguments of the callback functions are the processor that the breakpoint hit on cpu and the address (virtual or physical depending on what the breakpoint was registered as) that was hit. Callbacks functions for notify_read_breakpoint and notify_write_breakpoint also gets the access size len of the read or write. The callback function for notify_write_breakpoint additionally has the previous value old_val at the address written and the new value new_val that is being written passed as arguments. Reading the actual memory from the callback will result in reading the new value that has been written as the callback is called after the write is done. On x86 virtual breakpoints use linear addresses (as opposed to logical addresses).

For all functions, the tracker argument should be the tracker calling this interface. This makes it possible for a hypervisor tracker to handle guests differently.

All methods that register a notification callback take data as an argument which will be passed on to callback function. These methods return a cancel ID to be used with the cancel method to cancel the callback. A returned value of 0 means that an error occurred and no callback was registered, in which case the caller is responsible for freeing the callback data.

cancel!osa_machine_notification interface method cancel cancels the callback function with ID cancel_id and will free the callback data associated with the notification. This ID will have been returned from the function that registered the callback.

Cell Context for all methods.

Variants§

§

OSA_Read_One_Byte = 1

§

OSA_Read_Two_Byte = 2

§

OSA_Read_Four_Byte = 4

§

OSA_Read_Eight_Byte = 8

Trait Implementations§

source§

impl Clone for osa_read_len_t

source§

fn clone(&self) -> osa_read_len_t

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 osa_read_len_t

source§

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

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

impl Hash for osa_read_len_t

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for osa_read_len_t

source§

fn cmp(&self, other: &osa_read_len_t) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for osa_read_len_t

source§

fn eq(&self, other: &osa_read_len_t) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for osa_read_len_t

source§

fn partial_cmp(&self, other: &osa_read_len_t) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for osa_read_len_t

source§

impl Eq for osa_read_len_t

source§

impl StructuralPartialEq for osa_read_len_t

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> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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,

source§

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>,

source§

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>,

source§

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.