Enum Firmware

Source
pub enum Firmware {
    LinuxDirect {
        kernel: ResolvedArtifact,
        initrd: ResolvedArtifact,
    },
    OpenhclLinuxDirect {
        igvm_path: ResolvedArtifact,
        openhcl_config: OpenHclConfig,
    },
    Pcat {
        guest: PcatGuest,
        bios_firmware: ResolvedOptionalArtifact,
        svga_firmware: ResolvedOptionalArtifact,
    },
    OpenhclPcat {
        guest: PcatGuest,
        igvm_path: ResolvedArtifact,
        bios_firmware: ResolvedOptionalArtifact,
        svga_firmware: ResolvedOptionalArtifact,
        openhcl_config: OpenHclConfig,
    },
    Uefi {
        guest: UefiGuest,
        uefi_firmware: ResolvedArtifact,
        uefi_config: UefiConfig,
    },
    OpenhclUefi {
        guest: UefiGuest,
        isolation: Option<IsolationType>,
        igvm_path: ResolvedArtifact,
        uefi_config: UefiConfig,
        openhcl_config: OpenHclConfig,
    },
}
Expand description

Firmware to load into the test VM.

Variants§

§

LinuxDirect

Boot Linux directly, without any firmware.

Fields

§kernel: ResolvedArtifact

The kernel to boot.

§initrd: ResolvedArtifact

The initrd to use.

§

OpenhclLinuxDirect

Boot Linux directly, without any firmware, with OpenHCL in VTL2.

Fields

§igvm_path: ResolvedArtifact

The path to the IGVM file to use.

§openhcl_config: OpenHclConfig

OpenHCL configuration

§

Pcat

Boot a PCAT-based VM.

Fields

§guest: PcatGuest

The guest OS the VM will boot into.

§bios_firmware: ResolvedOptionalArtifact

The firmware to use.

§svga_firmware: ResolvedOptionalArtifact

The SVGA firmware to use.

§

OpenhclPcat

Boot a PCAT-based VM with OpenHCL in VTL2.

Fields

§guest: PcatGuest

The guest OS the VM will boot into.

§igvm_path: ResolvedArtifact

The path to the IGVM file to use.

§bios_firmware: ResolvedOptionalArtifact

The firmware to use.

§svga_firmware: ResolvedOptionalArtifact

The SVGA firmware to use.

§openhcl_config: OpenHclConfig

OpenHCL configuration

§

Uefi

Boot a UEFI-based VM.

Fields

§guest: UefiGuest

The guest OS the VM will boot into.

§uefi_firmware: ResolvedArtifact

The firmware to use.

§uefi_config: UefiConfig

UEFI configuration

§

OpenhclUefi

Boot a UEFI-based VM with OpenHCL in VTL2.

Fields

§guest: UefiGuest

The guest OS the VM will boot into.

§isolation: Option<IsolationType>

The isolation type of the VM.

§igvm_path: ResolvedArtifact

The path to the IGVM file to use.

§uefi_config: UefiConfig

UEFI configuration

§openhcl_config: OpenHclConfig

OpenHCL configuration

Implementations§

Source§

impl Firmware

Source

pub fn linux_direct(resolver: &ArtifactResolver<'_>, arch: MachineArch) -> Self

Constructs a standard Firmware::LinuxDirect configuration.

Source

pub fn openhcl_linux_direct( resolver: &ArtifactResolver<'_>, arch: MachineArch, ) -> Self

Constructs a standard Firmware::OpenhclLinuxDirect configuration.

Source

pub fn pcat(resolver: &ArtifactResolver<'_>, guest: PcatGuest) -> Self

Constructs a standard Firmware::Pcat configuration.

Source

pub fn uefi( resolver: &ArtifactResolver<'_>, arch: MachineArch, guest: UefiGuest, ) -> Self

Constructs a standard Firmware::Uefi configuration.

Source

pub fn openhcl_uefi( resolver: &ArtifactResolver<'_>, arch: MachineArch, guest: UefiGuest, isolation: Option<IsolationType>, vtl2_nvme_boot: bool, ) -> Self

Constructs a standard Firmware::OpenhclUefi configuration.

Trait Implementations§

Source§

impl Debug for Firmware

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more