Struct Processor

Source
pub struct Processor<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Processor<'a>

Source

pub fn partition(&self) -> &'a Partition

Source

pub fn index(&self) -> u32

Source

pub fn cancel_run(&self) -> Result<(), WHvError>

Source

pub fn set_registers( &self, names: &[WHV_REGISTER_NAME], values: &[WHV_REGISTER_VALUE], ) -> Result<(), WHvError>

Source

pub fn get_registers( &self, names: &[WHV_REGISTER_NAME], values: &mut [WHV_REGISTER_VALUE], ) -> Result<(), WHvError>

Source

pub fn get_register<T: RegisterName>(&self, v: T) -> Result<T::Value, WHvError>

Source

pub fn set_register<T: RegisterName>( &self, n: T, v: T::Value, ) -> Result<(), WHvError>

Source

pub fn get_xsave(&self) -> Result<Vec<u8>, WHvError>

Source

pub fn set_xsave(&self, data: &[u8]) -> Result<(), WHvError>

Source

pub fn get_apic(&self) -> Result<Vec<u8>, WHvError>

Source

pub fn set_apic(&self, data: &[u8]) -> Result<(), WHvError>

Source

pub fn get_state( &self, state_type: WHV_VIRTUAL_PROCESSOR_STATE_TYPE, data: &mut [u8], ) -> Result<usize, WHvError>

Source

pub fn set_state( &self, state_type: WHV_VIRTUAL_PROCESSOR_STATE_TYPE, data: &[u8], ) -> Result<(), WHvError>

Source

pub fn runner(&self) -> ProcessorRunner<'a>

Source

pub fn translate_gva( &self, gva: u64, access_flags: WHV_TRANSLATE_GVA_FLAGS, ) -> Result<Result<u64, WHV_TRANSLATE_GVA_RESULT_CODE>, WHvError>

Source

pub fn signal_synic_event(&self, sint: u8, flag: u16) -> Result<bool, WHvError>

Source

pub fn post_synic_message( &self, sint: u8, message: &[u8], ) -> Result<(), WHvError>

Source

pub fn get_cpuid_output( &self, eax: u32, ecx: u32, ) -> Result<WHV_CPUID_OUTPUT, WHvError>

Trait Implementations§

Source§

impl<'a> Clone for Processor<'a>

Source§

fn clone(&self) -> Processor<'a>

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<'a> Debug for Processor<'a>

Source§

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

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

impl<'a> Copy for Processor<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for Processor<'a>

§

impl<'a> RefUnwindSafe for Processor<'a>

§

impl<'a> Send for Processor<'a>

§

impl<'a> Sync for Processor<'a>

§

impl<'a> Unpin for Processor<'a>

§

impl<'a> UnwindSafe for Processor<'a>

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, dest: *mut u8)

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