Test instance.img conditional to Updatable VM support
instance.img is only required if AVF does not support Updatable VM (i.e,
Secretkeeper is not supported by device)
Bug: 328387716
Test: atest MicrodroidTestApp
Change-Id: I041eeb55d7808b0cd0c35404fd4ee8754df3fd15
diff --git a/virtualizationmanager/src/aidl.rs b/virtualizationmanager/src/aidl.rs
index d0d3878..a72f724 100644
--- a/virtualizationmanager/src/aidl.rs
+++ b/virtualizationmanager/src/aidl.rs
@@ -318,6 +318,14 @@
check_manage_access()?;
GLOBAL_SERVICE.isRemoteAttestationSupported()
}
+
+ fn isUpdatableVmSupported(&self) -> binder::Result<bool> {
+ // The response is specific to Microdroid. Updatable VMs are only possible if device
+ // supports Secretkeeper. Guest OS needs to use Secretkeeper based secrets. Microdroid does
+ // this, however other guest OSes may do things differently.
+ check_manage_access()?;
+ Ok(is_secretkeeper_supported())
+ }
}
impl VirtualizationService {