aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/check_caps.rs
blob: e4baf8338aff158dcf6917f205657a89d0568836 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
use kvm_rs::cap::CapBool::*;
use kvm_rs::cap::CapInt::*;
use kvm_rs::kvm::Kvm;

fn main() -> std::io::Result<()> {
    let kvm = Kvm::new()?;

    println!("KVM_CAP_CHECK_EXTENSION_VM    = {}", kvm.check_extenstion(CheckExtensionVm));
    println!("KVM_CAP_NR_VCPUS              = {}", kvm.check_extenstion_int(NrVcpus));
    println!("KVM_CAP_MAX_VCPUS             = {}", kvm.check_extenstion_int(MaxVcpus));

    Ok(())
}