pub struct Kvm(/* private fields */);Expand description
An open file to /dev/kvm.
Implementations§
Source§impl Kvm
impl Kvm
Sourcepub fn supported_cpuid(&self) -> Result<Vec<kvm_cpuid_entry2>, Error>
pub fn supported_cpuid(&self) -> Result<Vec<kvm_cpuid_entry2>, Error>
Returns the CPUID values that are supported by the hypervisor.
Sourcepub fn supported_mce_cap(&self) -> Result<u64, Error>
pub fn supported_mce_cap(&self) -> Result<u64, Error>
Returns the set of IA32_MCG_CAP capability bits that KVM supports
setting via Processor::setup_mce on this host (e.g. MCG_CMCI_P,
MCG_LMCE_P on Intel).
Sourcepub fn supported_hv_cpuid(&self) -> Result<Vec<kvm_cpuid_entry2>, Error>
pub fn supported_hv_cpuid(&self) -> Result<Vec<kvm_cpuid_entry2>, Error>
Returns the Hyper-V CPUID values that KVM supports for guest enlightenments, including nested virtualization features.
pub fn check_extension(&self, extension: u32) -> Result<c_int>
pub fn new_vm(&self, vm_type: VmType) -> Result<Partition, Error>
Trait Implementations§
Source§impl AsFd for Kvm
impl AsFd for Kvm
Source§fn as_fd(&self) -> BorrowedFd<'_>
fn as_fd(&self) -> BorrowedFd<'_>
Borrows the file descriptor. Read more
Auto Trait Implementations§
impl Freeze for Kvm
impl RefUnwindSafe for Kvm
impl Send for Kvm
impl Sync for Kvm
impl Unpin for Kvm
impl UnsafeUnpin for Kvm
impl UnwindSafe for Kvm
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
Mutably borrows from an owned value. Read more