pub struct NestedVirtController { /* private fields */ }Expand description
Nested virtualization controller
Implementations§
Source§impl NestedVirtController
impl NestedVirtController
pub fn new() -> Self
Sourcepub fn enable_nested_vmx(&mut self)
pub fn enable_nested_vmx(&mut self)
Enable nested VMX for the guest
Sourcepub fn handle_l1_vmwrite(
&mut self,
field: u32,
value: u64,
) -> Result<(), VmError>
pub fn handle_l1_vmwrite( &mut self, field: u32, value: u64, ) -> Result<(), VmError>
Handle L1 VMWRITE to shadow VMCS
Sourcepub fn handle_l1_vmread(&self, field: u32) -> Result<u64, VmError>
pub fn handle_l1_vmread(&self, field: u32) -> Result<u64, VmError>
Handle L1 VMREAD from shadow VMCS
Sourcepub fn enter_l2(&mut self, l1_state: &GuestRegisters) -> Result<(), VmError>
pub fn enter_l2(&mut self, l1_state: &GuestRegisters) -> Result<(), VmError>
Enter L2 from L1 (nested VM entry)
Sourcepub fn exit_l2(
&mut self,
exit_reason: NestedExitReason,
) -> Result<GuestRegisters, VmError>
pub fn exit_l2( &mut self, exit_reason: NestedExitReason, ) -> Result<GuestRegisters, VmError>
Exit from L2 back to L1 (nested VM exit)
pub fn nesting_level(&self) -> NestingLevel
pub fn is_nested_vmx_enabled(&self) -> bool
Sourcepub fn should_forward_to_l1(&self, exit_reason: NestedExitReason) -> bool
pub fn should_forward_to_l1(&self, exit_reason: NestedExitReason) -> bool
Check if a VM exit from L2 should be forwarded to L1