pub struct SidecarVp<'a> { /* private fields */ }
Expand description
An accessor for a sidecar VP.
Implementations§
Source§impl<'a> SidecarVp<'a>
impl<'a> SidecarVp<'a>
Sourcepub fn run(&mut self) -> Result<SidecarRun<'_, 'a>, SidecarError>
pub fn run(&mut self) -> Result<SidecarRun<'_, 'a>, SidecarError>
Runs the VP.
Sourcepub fn cpu_context(&self) -> *mut CpuContextX64
pub fn cpu_context(&self) -> *mut CpuContextX64
Returns a pointer to the CPU context.
This pointer is only valid for access while the VP is stopped.
Sourcepub fn intercept_message(&self) -> *const HvMessage
pub fn intercept_message(&self) -> *const HvMessage
Returns a pointer to the intercept message from the hypervisor.
This pointer is only valid for access while the VP is stopped.
Sourcepub fn register_page(&self) -> *mut HvX64RegisterPage
pub fn register_page(&self) -> *mut HvX64RegisterPage
Returns a pointer to the register page, mapped with the hypervisor.
If the hypervisor does not support register pages, then the is_valid
field will be 0.
This pointer is only valid for access while the VP is stopped.
Sourcepub fn test(&mut self) -> Result<(), SidecarError>
pub fn test(&mut self) -> Result<(), SidecarError>
Tests that the VP is running in the sidecar kernel.
Sourcepub fn get_vp_registers(
&mut self,
target_vtl: HvInputVtl,
regs: &mut [HvRegisterAssoc],
) -> Result<(), SidecarError>
pub fn get_vp_registers( &mut self, target_vtl: HvInputVtl, regs: &mut [HvRegisterAssoc], ) -> Result<(), SidecarError>
Gets a VP register by name.
Sourcepub fn set_vp_registers(
&mut self,
target_vtl: HvInputVtl,
regs: &[HvRegisterAssoc],
) -> Result<(), SidecarError>
pub fn set_vp_registers( &mut self, target_vtl: HvInputVtl, regs: &[HvRegisterAssoc], ) -> Result<(), SidecarError>
Sets a VP register by name.
Sourcepub fn translate_gva(
&mut self,
gvn: u64,
control_flags: TranslateGvaControlFlagsX64,
) -> Result<TranslateVirtualAddressExOutputX64, SidecarError>
pub fn translate_gva( &mut self, gvn: u64, control_flags: TranslateGvaControlFlagsX64, ) -> Result<TranslateVirtualAddressExOutputX64, SidecarError>
Issues a hypercall to translate a guest virtual address to a guest physical address.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for SidecarVp<'a>
impl<'a> !RefUnwindSafe for SidecarVp<'a>
impl<'a> !Send for SidecarVp<'a>
impl<'a> !Sync for SidecarVp<'a>
impl<'a> Unpin for SidecarVp<'a>
impl<'a> !UnwindSafe for SidecarVp<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more