[pvmfw] Move MemorySharer from pvmfw to vmbase
This cl mvoes MemorySharer and two utility functions
virt_to_phys and phys_to_virt from pvmfw to vmbase for reuse in
rialto later.
Bug: 284462758
Test: m pvmfw_img
Change-Id: I48a410792370beaa531ea0408670b8d831150272
diff --git a/pvmfw/src/virtio/hal.rs b/pvmfw/src/virtio/hal.rs
index becc263..ce246b1 100644
--- a/pvmfw/src/virtio/hal.rs
+++ b/pvmfw/src/virtio/hal.rs
@@ -16,12 +16,13 @@
use super::pci::PCI_INFO;
use crate::helpers::RangeExt as _;
-use crate::memory::{alloc_shared, dealloc_shared, phys_to_virt, virt_to_phys};
+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};
/// The alignment to use for the temporary buffers allocated by `HalImpl::share`. There doesn't seem
/// to be any particular alignment required by VirtIO for these, so 16 bytes should be enough to