commit | ed18093e7a5cd67ca1917a80b6beddc06d78e9d3 | [log] [tgz] |
---|---|---|
author | Jiyong Park <jiyong@google.com> | Fri Feb 24 19:55:41 2023 +0900 |
committer | Jiyong Park <jiyong@google.com> | Sat Feb 25 09:15:25 2023 +0900 |
tree | 1476dc91cc8e4622d7c60fab4d1b98e601e9d9d0 | |
parent | a3f3916c6a0a9c7bbaa67799598fdc9c5fe96bb8 [diff] |
Change the condition for preparing for ramdump on the crosvm side Preparing for ramdump on the crosvm side means two activities: * creating an empty file for storing the ramdump (and making it as the backing file for the /dev/hvc1 virtio console) * adding `crashkernel=xxM` parameter For protected VMs: ramdump is prepared if debug policy (accessed by reading the device tree) says ramdump is enabled. Note that we can do this unconditionally for protected VMs because pvmfw will anyway kick in and remove the parameter if ramdump is enabled. We do this conditionally on the host just because we don't want to create the ramdump file unnecessarily. For non-protected VMs: ramdump is prepared if debug policy says so OR the debugLevel is full. This allows developers to do the ramdump even on a device where debug policy is not provisioed. Bug: 270657304 Test: test ramdump on the following combinations: * dp provisioned + pVM + debugLevel=none: ramdump enabled * dp provisioned + pVM + debugLevel=full: ramdump enabled * dp provisioned + non-pVM + debugLevel=none: ramdump enabled * dp provisioned + non-pVM + debugLevel=full: ramdump enabled * dp empty + pVM + debugLevel=none: ramdump disabled * dp empty + pVM + debugLevel=full: ramdump disabled [note] * dp empty + non-pVM + debugLevel=none: ramdump disabled * dp empty + non-pVM + debugLevel=full: ramdump enabled [note] `crashkernel=xx` is sent from the host. However, pvmfw unconditionally removes the parameter from the cmdline because dp is not provisioned. It could have checked the debug level by looking into the bootconfig in the initrd, but it's too dirty. Change-Id: I52ce34e0f9ef6404e482abec728c8108341a9fd6
This repository contains userspace services related to running virtual machines on Android, especially protected virtual machines. See the getting started documentation and Microdroid README for more information.