pub fn register_new_mmio_rtc(&mut self, vm: &VmFd) -> Result<()> {
        // Create and attach a new RTC device.
        let slot = self.allocate_new_slot(1)?;
        let rtc_evt = EventFd::new(libc::EFD_NONBLOCK).map_err(Error::EventFd)?;
        let device = devices::legacy::RTC::new(rtc_evt.try_clone().map_err(Error::EventFd)?);
        vm.register_irqfd(&rtc_evt, slot.irqs[0])
            .map_err(Error::RegisterIrqFd)?;

        let identifier = (DeviceType::RTC, DeviceType::RTC.to_string());
        self.register_mmio_device(identifier, slot, Arc::new(Mutex::new(device)))
    }
/// Create and register a new MMIO RTC device.
Create and register a new MMIO RTC device.
Create and register a new MMIO RTC device .
pub fn register_new_mmio_rtc(&mut self, vm: &VmFd) -> Result<()> {
        // Create and attach a new RTC device.
        let slot = self.allocate_new_slot(1)?;
        let rtc_evt = EventFd::new(libc::EFD_NONBLOCK).map_err(Error::EventFd)?;
        let device = devices::legacy::RTC::new(rtc_evt.try_clone().map_err(Error::EventFd)?);
        vm.register_irqfd(&rtc_evt, slot.irqs[0])
            .map_err(Error::RegisterIrqFd)?;
        let identifier = (DeviceType::RTC, DeviceType::RTC.to_string());
        self.register_mmio_device(identifier, slot, Arc::new(Mutex::new(device)))
    }
pub fn register_new_mmio_rtc ( & mut self , vm : & VmFd ) -> Result < ( ) > { // Create and attach a new RTC device. let slot = self . allocate_new_slot ( 1 ) ? ; let rtc_evt = EventFd :: new ( libc :: EFD_NONBLOCK ) . map_err ( Error :: EventFd ) ? ; let device = devices :: legacy :: RTC :: new ( rtc_evt . try_clone ( ) . map_err ( Error :: EventFd ) ? ) ; vm . register_irqfd ( & rtc_evt , slot . irqs [ 0 ] ) . map_err ( Error :: RegisterIrqFd ) ? ; let identifier = ( DeviceType :: RTC , DeviceType :: RTC . to_string ( ) ) ; self . register_mmio_device ( identifier , slot , Arc :: new ( Mutex :: new ( device ) ) ) }
Create and register a new MMIO RTC device.
Create and register a new MMIO RTC device .
&mut self
vm
&VmFd
&mut self
vm
&VmFd