⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

NestedVirtController

Struct NestedVirtController 

Source
pub struct NestedVirtController { /* private fields */ }
Expand description

Nested virtualization controller

Implementations§

Source§

impl NestedVirtController

Source

pub fn new() -> Self

Source

pub fn enable_nested_vmx(&mut self)

Enable nested VMX for the guest

Source

pub fn handle_l1_vmwrite( &mut self, field: u32, value: u64, ) -> Result<(), VmError>

Handle L1 VMWRITE to shadow VMCS

Source

pub fn handle_l1_vmread(&self, field: u32) -> Result<u64, VmError>

Handle L1 VMREAD from shadow VMCS

Source

pub fn enter_l2(&mut self, l1_state: &GuestRegisters) -> Result<(), VmError>

Enter L2 from L1 (nested VM entry)

Source

pub fn exit_l2( &mut self, exit_reason: NestedExitReason, ) -> Result<GuestRegisters, VmError>

Exit from L2 back to L1 (nested VM exit)

Source

pub fn nesting_level(&self) -> NestingLevel

Source

pub fn is_nested_vmx_enabled(&self) -> bool

Source

pub fn should_forward_to_l1(&self, exit_reason: NestedExitReason) -> bool

Check if a VM exit from L2 should be forwarded to L1

Trait Implementations§

Source§

impl Default for NestedVirtController

Available on crate feature alloc only.
Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl Freeze for NestedVirtController

§

impl RefUnwindSafe for NestedVirtController

§

impl Send for NestedVirtController

§

impl Sync for NestedVirtController

§

impl Unpin for NestedVirtController

§

impl UnwindSafe for NestedVirtController

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.