virtualizationmanager: enable crash_dump workaround
This enables crash_dump/debuggerd to inspect crosvm without accidentally
reading protected memory.
Bug: 238324526
Test: adb shell setenforce 0; adb shell /apex/com.android.virt/bin/vm run-microdroid --protected; adb shell debuggerd $(adb shell pidof crosvm)
Change-Id: I8b1dd28fee37efbbf6861e2b832a5534afdb46c9
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 09605a4..1456d17 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -724,6 +724,10 @@
// enough.
let swiotlb_size_mib = 2 * virtio_pci_device_count;
command.arg("--swiotlb").arg(swiotlb_size_mib.to_string());
+
+ // Workaround to keep crash_dump from trying to read protected guest memory.
+ // Context in b/238324526.
+ command.arg("--unmap-guest-memory-on-fork");
}
if let Some(memory_mib) = config.memory_mib {