pub trait VmX86_64: Vm {
    // Required methods
    fn get_hypervisor(&self) -> &dyn HypervisorX86_64;
    fn create_vcpu(&self, id: usize) -> Result<Box<dyn VcpuX86_64>>;
    fn set_tss_addr(&self, addr: GuestAddress) -> Result<()>;
    fn set_identity_map_addr(&self, addr: GuestAddress) -> Result<()>;
    fn load_protected_vm_firmware(
        &mut self,
        fw_addr: GuestAddress,
        fw_max_size: u64
    ) -> Result<()>;
}
Expand description

A wrapper for using a VM on x86_64 and getting/setting its state.

Required Methods§

source

fn get_hypervisor(&self) -> &dyn HypervisorX86_64

Gets the HypervisorX86_64 that created this VM.

source

fn create_vcpu(&self, id: usize) -> Result<Box<dyn VcpuX86_64>>

Create a Vcpu with the specified Vcpu ID.

source

fn set_tss_addr(&self, addr: GuestAddress) -> Result<()>

Sets the address of the three-page region in the VM’s address space.

source

fn set_identity_map_addr(&self, addr: GuestAddress) -> Result<()>

Sets the address of a one-page region in the VM’s address space.

source

fn load_protected_vm_firmware( &mut self, fw_addr: GuestAddress, fw_max_size: u64 ) -> Result<()>

Load pVM firmware for the VM, creating a memslot for it as needed.

Only works on protected VMs (i.e. those with vm_type == KVM_X86_PKVM_PROTECTED_VM).

Implementors§