pub fn register_mmio_serial(
        &mut self,
        vm: &VmFd,
        serial: Arc<Mutex<devices::legacy::Serial>>,
    ) -> Result<()> {
        let slot = self.allocate_new_slot(1)?;
        vm.register_irqfd(
            &serial.lock().expect("Poisoned lock").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 some MMIO address.
Register an early console at some MMIO address.
Register an early console at some MMIO address .
pub fn register_mmio_serial(
        &mut self,
        vm: &VmFd,
        serial: Arc<Mutex<devices::legacy::Serial>>,
    ) -> Result<()> {
        let slot = self.allocate_new_slot(1)?;
        vm.register_irqfd(
            &serial.lock().expect("Poisoned lock").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 < devices :: legacy :: Serial > > , ) -> Result < ( ) > { let slot = self . allocate_new_slot ( 1 ) ? ; vm . register_irqfd ( & serial . lock ( ) . expect ( " " ) . 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 some MMIO address.
Register an early console at some MMIO address .
&mut self
vm
&VmFd
serial
Arc<Mutex<devices::legacy::Serial>>
&mut self
vm
&VmFd
serial
Arc<Mutex<devices::legacy::Serial>>