From a894f53439f5096b8f6022e3d8deffdb245d35a0 Mon Sep 17 00:00:00 2001 From: Philipp Kern Date: Mon, 23 Apr 2018 09:31:53 +0200 Subject: [PATCH] Fix a typo: virtio::NOITFY_REG_OFFSET -> virtio::NOTIFY_REG_OFFSET TEST=compiled crosvm successfully Change-Id: Idabf81b8600fa2772e6e315d08d3c853e511a8cd Reviewed-on: https://chromium-review.googlesource.com/1023415 Commit-Ready: Philipp Kern Tested-by: Philipp Kern Reviewed-by: Dylan Reid Reviewed-by: Zach Reizner --- device_manager/src/device_manager.rs | 2 +- devices/src/virtio/mmio.rs | 4 ++-- devices/src/virtio/mod.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/device_manager/src/device_manager.rs b/device_manager/src/device_manager.rs index f177f08633..8695bba970 100644 --- a/device_manager/src/device_manager.rs +++ b/device_manager/src/device_manager.rs @@ -104,7 +104,7 @@ impl<'a> DeviceManager<'a> { .map_err(Error::CreateMmioDevice)?; for (i, queue_evt) in mmio_device.queue_evts().iter().enumerate() { let io_addr = IoeventAddress::Mmio(self.mmio_base + - devices::virtio::NOITFY_REG_OFFSET as u64); + devices::virtio::NOTIFY_REG_OFFSET as u64); self.vm .register_ioevent(&queue_evt, io_addr, i as u32) .map_err(Error::RegisterIoevent)?; diff --git a/devices/src/virtio/mmio.rs b/devices/src/virtio/mmio.rs index 1548f40235..b1426808ea 100644 --- a/devices/src/virtio/mmio.rs +++ b/devices/src/virtio/mmio.rs @@ -81,7 +81,7 @@ pub trait VirtioDevice: Send { /// This requires 3 points of installation to work with a VM: /// /// 1. Mmio reads and writes must be sent to this device at what is referred to here as MMIO base. -/// 1. `Mmio::queue_evts` must be installed at `virtio::NOITFY_REG_OFFSET` offset from the MMIO +/// 1. `Mmio::queue_evts` must be installed at `virtio::NOTIFY_REG_OFFSET` offset from the MMIO /// base. Each event in the array must be signaled if the index is written at that offset. /// 1. `Mmio::interrupt_evt` must signal an interrupt that the guest driver is listening to when it /// is written to. @@ -133,7 +133,7 @@ impl MmioDevice { } /// Gets the list of queue events that must be triggered whenever the VM writes to - /// `virtio::NOITFY_REG_OFFSET` past the MMIO base. Each event must be triggered when the + /// `virtio::NOTIFY_REG_OFFSET` past the MMIO base. Each event must be triggered when the /// value being written equals the index of the event in this list. pub fn queue_evts(&self) -> &[EventFd] { self.queue_evts.as_slice() diff --git a/devices/src/virtio/mod.rs b/devices/src/virtio/mod.rs index f225142f9a..99907f0bfe 100644 --- a/devices/src/virtio/mod.rs +++ b/devices/src/virtio/mod.rs @@ -41,4 +41,4 @@ const INTERRUPT_STATUS_CONFIG_CHANGED: u32 = 0x2; /// Offset from the base MMIO address of a virtio device used by the guest to notify the device of /// queue events. -pub const NOITFY_REG_OFFSET: u32 = 0x50; +pub const NOTIFY_REG_OFFSET: u32 = 0x50;