fn create_vcpu(
        &self,
        id: u8,
        vmmops: Option<Arc<Box<dyn VmmOps>>>,
    ) -> vm::Result<Arc<dyn cpu::Vcpu>> {
        let vc = self
            .fd
            .create_vcpu(id)
            .map_err(|e| vm::HypervisorVmError::CreateVcpu(e.into()))?;
        let vcpu = KvmVcpu {
            fd: vc,
            #[cfg(target_arch = "x86_64")]
            msrs: self.msrs.clone(),
            vmmops,
            #[cfg(target_arch = "x86_64")]
            hyperv_synic: AtomicBool::new(false),
        };
        Ok(Arc::new(vcpu))
    }
///
/// Creates a VcpuFd object from a vcpu RawFd.
///
Creates a VcpuFd object from a vcpu RawFd.
Creates a VcpuFd object from a vcpu RawFd .
fn create_vcpu(
        &self,
        id: u8,
        vmmops: Option<Arc<Box<dyn VmmOps>>>,
    ) -> vm::Result<Arc<dyn cpu::Vcpu>> {
        let vc = self
            .fd
            .create_vcpu(id)
            .map_err(|e| vm::HypervisorVmError::CreateVcpu(e.into()))?;
        let vcpu = KvmVcpu {
            fd: vc,
            #[cfg(target_arch = "x86_64")]
            msrs: self.msrs.clone(),
            vmmops,
            #[cfg(target_arch = "x86_64")]
            hyperv_synic: AtomicBool::new(false),
        };
        Ok(Arc::new(vcpu))
    }
fn create_vcpu ( & self , id : u8 , vmmops : Option < Arc < Box < dyn VmmOps > > > , ) -> vm :: Result < Arc < dyn cpu :: Vcpu > > { let vc = self . fd . create_vcpu ( id ) . map_err ( | e | vm :: HypervisorVmError :: CreateVcpu ( e . into ( ) ) ) ? ; let vcpu = KvmVcpu { fd : vc , # [ cfg ( target_arch " " ) ] msrs : self . msrs . clone ( ) , vmmops , # [ cfg ( target_arch " " ) ] hyperv_synic : AtomicBool :: new ( false ) , } ; Ok ( Arc :: new ( vcpu ) ) }
Creates a VcpuFd object from a vcpu RawFd.
Creates a VcpuFd object from a vcpu RawFd .
&self
id
u8
vmmops
Option<Arc<Box<dyn VmmOps>>>
&self
id
u8
vmmops
Option<Arc<Box<dyn VmmOps>>>