commit | 0719e1ae2e9284de592d0c2ad0a8280118dbcb55 | [log] [tgz] |
---|---|---|
author | Alan Stokes <alanstokes@google.com> | Tue Nov 08 15:13:14 2022 +0000 |
committer | Alan Stokes <alanstokes@google.com> | Tue Nov 08 15:36:03 2022 +0000 |
tree | cebb6e660f4ea9b201f719709dd856975b2bc5a1 | |
parent | 20696d97901ed3f00d1f872da375800f29f63776 [diff] |
Fix threading bugs - Move sCreateLock to VirtualMachine, use it to guard VM create/load/delete, since these can all race with each other in complicated ways (e.g. deleting files while we're in the process of creating them). - Add a per-VM lock to protect mutable state, with a separate one for callback-related state. - Document lock ordering, add @GuardedBy to fields & methods as appropriate. - Use the existence of the VM directory, rather than the config file within it, to detect if a VM of a given name exists. Delete the directory if creation fails. - Make the immutability of mExtraApks explicit. - Extract various helper functions, especially for checking the VM is in the expected state. - Add checking VM is running to connectVsock (fixing a possible NPE). - Other random refactorings. Bug: 193471517 Test: atest MicrodroidTests MicrodroidHostTests Change-Id: Ie32090426fcf7a42aa82eba7b48f62bc12cfd479
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.