Use unsafe block to activate the ID map
The latest release of the aarch64-paging crate marks the activate()
function as unsafe, so we must invoke it from an unsafe {} block.
Test: build tested only
Change-Id: Id729b4c0ed321ce57c22fe5125eebaf8d436568d
diff --git a/vmbase/src/memory/page_table.rs b/vmbase/src/memory/page_table.rs
index ad164b4..dc346e7 100644
--- a/vmbase/src/memory/page_table.rs
+++ b/vmbase/src/memory/page_table.rs
@@ -83,7 +83,9 @@
/// code being currently executed. Otherwise, the Rust execution model (on which the borrow
/// checker relies) would be violated.
pub unsafe fn activate(&mut self) {
- self.idmap.activate()
+ // SAFETY: the caller of this unsafe function asserts that switching to a different
+ // translation is safe
+ unsafe { self.idmap.activate() }
}
/// Maps the given range of virtual addresses to the physical addresses as lazily mapped