[pvmfw][vmbase] Move MemoryTracker to vmbase for reuse
No behavior change in this cl.
Bug: 284462758
Test: m pvmfw_img
Change-Id: Id2970e3e8bb87d7c43903fe7e750b3c944178905
diff --git a/pvmfw/src/virtio/hal.rs b/pvmfw/src/virtio/hal.rs
index c8b279d..f223a7e 100644
--- a/pvmfw/src/virtio/hal.rs
+++ b/pvmfw/src/virtio/hal.rs
@@ -15,13 +15,12 @@
//! HAL for the virtio_drivers crate.
use super::pci::PCI_INFO;
-use crate::memory::{alloc_shared, dealloc_shared};
use core::alloc::Layout;
use core::mem::size_of;
use core::ptr::{copy_nonoverlapping, NonNull};
use log::trace;
use virtio_drivers::{BufferDirection, Hal, PhysAddr, PAGE_SIZE};
-use vmbase::memory::{phys_to_virt, virt_to_phys};
+use vmbase::memory::{alloc_shared, dealloc_shared, phys_to_virt, virt_to_phys};
use vmbase::util::RangeExt as _;
/// The alignment to use for the temporary buffers allocated by `HalImpl::share`. There doesn't seem
diff --git a/pvmfw/src/virtio/pci.rs b/pvmfw/src/virtio/pci.rs
index 58bc07e..ad7cfbb 100644
--- a/pvmfw/src/virtio/pci.rs
+++ b/pvmfw/src/virtio/pci.rs
@@ -15,7 +15,7 @@
//! Functions to scan the PCI bus for VirtIO devices.
use super::hal::HalImpl;
-use crate::{entry::RebootReason, memory::MemoryTracker};
+use crate::entry::RebootReason;
use alloc::boxed::Box;
use fdtpci::PciInfo;
use log::{debug, error};
@@ -30,6 +30,7 @@
DeviceType, Transport,
},
};
+use vmbase::memory::MemoryTracker;
pub(super) static PCI_INFO: OnceBox<PciInfo> = OnceBox::new();