[rialto] Initialize the shared memory pool
Test: atest rialto_test
Bug: 284462758
Change-Id: I88f04be6fcd29ade9bc5ab0af2f1e0e16d9b04d9
diff --git a/pvmfw/src/entry.rs b/pvmfw/src/entry.rs
index 3a870ab..0d2dfda 100644
--- a/pvmfw/src/entry.rs
+++ b/pvmfw/src/entry.rs
@@ -116,7 +116,11 @@
})?;
if get_hypervisor().has_cap(HypervisorCap::DYNAMIC_MEM_SHARE) {
- MEMORY.lock().as_mut().unwrap().init_dynamic_shared_pool().map_err(|e| {
+ let granule = get_hypervisor().memory_protection_granule().map_err(|e| {
+ error!("Failed to get memory protection granule: {e}");
+ RebootReason::InternalError
+ })?;
+ MEMORY.lock().as_mut().unwrap().init_dynamic_shared_pool(granule).map_err(|e| {
error!("Failed to initialize dynamically shared pool: {e}");
RebootReason::InternalError
})?;