vmbase: Integrate libhyp as module
The only client of libhyp should ever be libvmbase so integrate the
former into the latter, which will allow code de-dup, easier tracking of
logic (including global static variables) and more straightforward code
structure.
Bug: 279539763
Test: m libpvmfw libvmbase_example librialto
Change-Id: Icbeda4cc936ead9c6c6df0533089ddb6b88a0833
diff --git a/vmbase/src/memory/shared.rs b/vmbase/src/memory/shared.rs
index dd433d4..8fda7a6 100644
--- a/vmbase/src/memory/shared.rs
+++ b/vmbase/src/memory/shared.rs
@@ -20,6 +20,7 @@
use super::util::{page_4kb_of, virt_to_phys};
use crate::dsb;
use crate::exceptions::HandleExceptionError;
+use crate::hyp::{self, get_mem_sharer, get_mmio_guard, MMIO_GUARD_GRANULE_SIZE};
use crate::util::RangeExt as _;
use aarch64_paging::paging::{
Attributes, Descriptor, MemoryRegion as VaRange, VirtualAddress, BITS_PER_LEVEL, PAGE_SIZE,
@@ -35,7 +36,6 @@
use core::ops::Range;
use core::ptr::NonNull;
use core::result;
-use hyp::{get_mem_sharer, get_mmio_guard, MMIO_GUARD_GRANULE_SIZE};
use log::{debug, error, trace};
use once_cell::race::OnceBox;
use spin::mutex::SpinMutex;