pub fn register_new_virtio_mmio_device(
        &mut self,
        vm: &VmFd,
        device_id: String,
        mmio_device: MmioTransport,
        _cmdline: &mut kernel_cmdline::Cmdline,
    ) -> Result<MMIODeviceInfo> {
        let mmio_slot = self.allocate_new_slot(1)?;
        self.register_virtio_mmio_device(vm, device_id, mmio_device, &mmio_slot)?;
        #[cfg(target_arch = "x86_64")]
        Self::add_virtio_device_to_cmdline(_cmdline, &mmio_slot)?;
        Ok(mmio_slot)
    }
/// Allocate slot and register an already created virtio-over-MMIO device. Also Adds the device
/// to the boot cmdline.
Allocate slot and register an already created virtio-over-MMIO device. Also Adds the device
to the boot cmdline.
Allocate slot and register an already created virtio - over - MMIO device . Also Adds the device to the boot cmdline .
pub fn register_new_virtio_mmio_device(
        &mut self,
        vm: &VmFd,
        device_id: String,
        mmio_device: MmioTransport,
        _cmdline: &mut kernel_cmdline::Cmdline,
    ) -> Result<MMIODeviceInfo> {
        let mmio_slot = self.allocate_new_slot(1)?;
        self.register_virtio_mmio_device(vm, device_id, mmio_device, &mmio_slot)?;
        #[cfg(target_arch = "x86_64")]
        Self::add_virtio_device_to_cmdline(_cmdline, &mmio_slot)?;
        Ok(mmio_slot)
    }
pub fn register_new_virtio_mmio_device ( & mut self , vm : & VmFd , device_id : String , mmio_device : MmioTransport , _cmdline : & mut kernel_cmdline :: Cmdline , ) -> Result < MMIODeviceInfo > { let mmio_slot = self . allocate_new_slot ( 1 ) ? ; self . register_virtio_mmio_device ( vm , device_id , mmio_device , & mmio_slot ) ? ; # [ cfg ( target_arch " " ) ] Self :: add_virtio_device_to_cmdline ( _cmdline , & mmio_slot ) ? ; Ok ( mmio_slot ) }
Allocate slot and register an already created virtio-over-MMIO device.
Allocate slot and register an already created virtio - over - MMIO device .
&mut self
vm
&VmFd
device_id
String
mmio_device
MmioTransport
_cmdline
&mut kernel_cmdline::Cmdline
&mut self
vm
&VmFd
device_id
String
mmio_device
MmioTransport
_cmdline
&mut kernel_cmdline::Cmdline