#[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.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Compares and returns the maximum of two values.
Read more
Compares and returns the minimum of two values.
Read more
Restrict a value to a certain interval.
Read more
Tests for self
and other
values to be equal, and is used by ==
.
Tests for !=
. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
This method returns an ordering between
self
and
other
values if one exists.
Read more
Tests less than (for
self
and
other
) and is used by the
<
operator.
Read more
Tests less than or equal to (for
self
and
other
) and is used by the
<=
operator.
Read more
Tests greater than (for
self
and
other
) and is used by the
>
operator.
Read more
Tests greater than or equal to (for
self
and
other
) and is used by
the
>=
operator.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit
)
Performs copy-assignment from
self
to
dst
.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.