commit | cb2322c440913047d012b421dffb7faaaafe9e61 | [log] [tgz] |
---|---|---|
author | Inseob Kim <inseob@google.com> | Thu Sep 15 20:27:56 2022 +0900 |
committer | Inseob Kim <inseob@google.com> | Thu Sep 15 16:09:42 2022 +0000 |
tree | 44be85fda1d10eb61f96bccc1bcc8d76c80e5ee7 | |
parent | 431ca439936d9e0f22869047ce36ae932549b1bd [diff] |
Share a single VirtualMachine object for VMs VirtualMachineManager.get() has always been returning a new VirtualMachine object. This can cause confusion because VirtualMachine object stores the VM's binder object which isn't shared among instances. So it may be possible to run multiple guest VMs on a single instance, which isn't advised. This fixes it by maintaining a map from the VM to the corresponding unique VirtualMachine object. VirtualMachineManager.get() will return an existing object, rather than creating a new one. The mapping is removed when the VM is deleted. Bug: 238692795 Test: atest MicrodroidTests Change-Id: Ie273e9118f4986aebf336b415d0e87a061228e1b
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.