pub fn new(index: u8, vm: &Vm) -> Result<Self> {
        let kvm_vcpu = vm.fd().create_vcpu(index.into()).map_err(Error::VcpuFd)?;

        Ok(KvmVcpu {
            index,
            fd: kvm_vcpu,
            pio_bus: None,
            mmio_bus: None,
            msr_list: vm.supported_msrs().clone(),
        })
    }
/// Constructs a new kvm vcpu with arch specific functionality.
///
/// # Arguments
///
/// * `index` - Represents the 0-based CPU index between [0, max vcpus).
/// * `vm` - The vm to which this vcpu will get attached.
Constructs a new kvm vcpu with arch specific functionality.
Constructs a new kvm vcpu with arch specific functionality .
pub fn new(index: u8, vm: &Vm) -> Result<Self> {
        let kvm_vcpu = vm.fd().create_vcpu(index.into()).map_err(Error::VcpuFd)?;
        Ok(KvmVcpu {
            index,
            fd: kvm_vcpu,
            pio_bus: None,
            mmio_bus: None,
            msr_list: vm.supported_msrs().clone(),
        })
    }
pub fn new ( index : u8 , vm : & Vm ) -> Result < Self > { let kvm_vcpu = vm . fd ( ) . create_vcpu ( index . into ( ) ) . map_err ( Error :: VcpuFd ) ? ; Ok ( KvmVcpu { index , fd : kvm_vcpu , pio_bus : None , mmio_bus : None , msr_list : vm . supported_msrs ( ) . clone ( ) , } ) }
Constructs a new kvm vcpu with arch specific functionality.
Constructs a new kvm vcpu with arch specific functionality .
index
u8
vm
&Vm
index
u8
vm
&Vm