pub fn register_mmio_serial(
        &mut self,
        vm: &VmFd,
        serial: Arc<Mutex<SerialDevice>>,
        dev_info_opt: Option<MMIODeviceInfo>,
    ) -> Result<()> {
        let slot = dev_info_opt.unwrap_or(self.allocate_new_slot(1)?);

        vm.register_irqfd(
            &serial.lock().expect("Poisoned lock").serial.interrupt_evt(),
            slot.irqs[0],
        )
        .map_err(Error::RegisterIrqFd)?;

        let identifier = (DeviceType::Serial, DeviceType::Serial.to_string());
        self.register_mmio_device(identifier, slot, serial)
    }
/// Register an early console at the specified MMIO address if given as parameter,
/// otherwise allocate a new MMIO slot for it.
Register an early console at the specified MMIO address if given as parameter,
otherwise allocate a new MMIO slot for it.
Register an early console at the specified MMIO address if given as parameter otherwise allocate a new MMIO slot for it .
pub fn register_mmio_serial(
        &mut self,
        vm: &VmFd,
        serial: Arc<Mutex<SerialDevice>>,
        dev_info_opt: Option<MMIODeviceInfo>,
    ) -> Result<()> {
        let slot = dev_info_opt.unwrap_or(self.allocate_new_slot(1)?);
        vm.register_irqfd(
            &serial.lock().expect("Poisoned lock").serial.interrupt_evt(),
            slot.irqs[0],
        )
        .map_err(Error::RegisterIrqFd)?;
        let identifier = (DeviceType::Serial, DeviceType::Serial.to_string());
        self.register_mmio_device(identifier, slot, serial)
    }
pub fn register_mmio_serial ( & mut self , vm : & VmFd , serial : Arc < Mutex < SerialDevice > > , dev_info_opt : Option < MMIODeviceInfo > , ) -> Result < ( ) > { let slot = dev_info_opt . unwrap_or ( self . allocate_new_slot ( 1 ) ? ) ; vm . register_irqfd ( & serial . lock ( ) . expect ( " " ) . serial . interrupt_evt ( ) , slot . irqs [ 0 ] , ) . map_err ( Error :: RegisterIrqFd ) ? ; let identifier = ( DeviceType :: Serial , DeviceType :: Serial . to_string ( ) ) ; self . register_mmio_device ( identifier , slot , serial ) }
Register an early console at the specified MMIO address if given as parameter,
otherwise allocate a new MMIO slot for it.
Register an early console at the specified MMIO address if given as parameter otherwise allocate a new MMIO slot for it .
&mut self
vm
&VmFd
serial
Arc<Mutex<SerialDevice>>
dev_info_opt
Option<MMIODeviceInfo>
&mut self
vm
&VmFd
serial
Arc<Mutex<SerialDevice>>
dev_info_opt
Option<MMIODeviceInfo>