Enum hypervisor::ProtectionType
source · pub enum ProtectionType {
Unprotected,
Protected,
ProtectedWithCustomFirmware,
ProtectedWithoutFirmware,
UnprotectedWithFirmware,
}
Expand description
Whether the VM should be run in protected mode or not.
Variants§
Unprotected
The VM should be run in the unprotected mode, where the host has access to its memory.
Protected
The VM should be run in protected mode, so the host cannot access its memory directly. It should be booted via the protected VM firmware, so that it can access its secrets.
ProtectedWithCustomFirmware
The VM should be run in protected mode, so the host cannot access its memory directly. It should be booted via a custom VM firmware, useful for debugging and testing.
ProtectedWithoutFirmware
The VM should be run in protected mode, but booted directly without pVM firmware. The host will still be unable to access the VM memory, but it won’t be given any secrets.
UnprotectedWithFirmware
The VM should be run in unprotected mode, but with the same memory layout as protected mode, protected VM firmware loaded, and simulating protected mode as much as possible. This is useful for debugging the protected VM firmware and other protected mode issues.
Implementations§
source§impl ProtectionType
impl ProtectionType
sourcepub fn isolates_memory(&self) -> bool
pub fn isolates_memory(&self) -> bool
Returns whether the hypervisor will prevent us from accessing the VM’s memory.
sourcepub fn needs_firmware_loaded(&self) -> bool
pub fn needs_firmware_loaded(&self) -> bool
Returns whether the VMM needs to load the pVM firmware.
sourcepub fn runs_firmware(&self) -> bool
pub fn runs_firmware(&self) -> bool
Returns whether the VM runs a pVM firmware.
Trait Implementations§
source§impl Clone for ProtectionType
impl Clone for ProtectionType
source§fn clone(&self) -> ProtectionType
fn clone(&self) -> ProtectionType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ProtectionType
impl Debug for ProtectionType
source§impl<'de> Deserialize<'de> for ProtectionType
impl<'de> Deserialize<'de> for ProtectionType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl PartialEq for ProtectionType
impl PartialEq for ProtectionType
source§fn eq(&self, other: &ProtectionType) -> bool
fn eq(&self, other: &ProtectionType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ProtectionType
impl Serialize for ProtectionType
impl Copy for ProtectionType
impl Eq for ProtectionType
impl StructuralPartialEq for ProtectionType
Auto Trait Implementations§
impl RefUnwindSafe for ProtectionType
impl Send for ProtectionType
impl Sync for ProtectionType
impl Unpin for ProtectionType
impl UnwindSafe for ProtectionType
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.