pvmfw: Optimize MMIO guard map
Optimize MMIO guard mapping device pages by mapping the pages as invalid
in order to produce translation faults. When a translation fault
happens, re-enable the pages and only then MMIO guard map the pages.
Bug: 245267332
Test: atest MicrodroidTestApp
Change-Id: I81128d7efec1249a9a7da988ec098b29936338ef
diff --git a/pvmfw/src/entry.rs b/pvmfw/src/entry.rs
index d172474..4d2d696 100644
--- a/pvmfw/src/entry.rs
+++ b/pvmfw/src/entry.rs
@@ -250,14 +250,7 @@
})?;
// This wrapper allows main() to be blissfully ignorant of platform details.
- let next_bcc = crate::main(
- slices.fdt,
- slices.kernel,
- slices.ramdisk,
- bcc_slice,
- debug_policy,
- MEMORY.lock().as_mut().unwrap(),
- )?;
+ let next_bcc = crate::main(slices.fdt, slices.kernel, slices.ramdisk, bcc_slice, debug_policy)?;
helpers::flushed_zeroize(bcc_slice);