Handle ramdump in microdroid_manager
Previously pvmfw read AVF debug policy and remove `crashkernel=`
accordingly. However, it unexpectidly disables ramdump for a device
without AVF debug policy even when `--debug=full` is specified.
Changed to read ramdump debug policy in microdroid_manager instead of
pvmfw. microdroid_manager can both debug level and AVF device policy
read, so it might be the better place. Also, pvmfw is now less VM OS aware,
and also need to trust less input from host OS.
Bug: 272752814
Test: atest on devices without AVF debug policy
Change-Id: I3cb4e7425834d5c0deb604e57d28c55e13039f09
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 19f5f01..745d4f6 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -723,8 +723,7 @@
command.arg("--unmap-guest-memory-on-fork");
if config.ramdump.is_some() {
- // Protected VM needs to reserve memory for ramdump here. pvmfw will drop This
- // if ramdump should be disabled (via debug policy). Note that we reserve more
+ // Protected VM needs to reserve memory for ramdump here. Note that we reserve more
// memory for the restricted dma pool.
let ramdump_reserve = RAMDUMP_RESERVED_MIB + swiotlb_size_mib;
command.arg("--params").arg(format!("crashkernel={ramdump_reserve}M"));