VM is registered to the global service

When a new IVirtualMachine object is created, it is registered to the
global service (virtualizationservice), so that we can collect the list
of all virtual machines on the system via the global service.

Furthermore, if the global service is killed, virtmgr re-starts it (via
death recipient), and re-registers the VMs it manages to the service, so
that the list of VMs the global service maintains is always up to date.

Note that this change doesn't yet make use of the registered VMs.
Follow-up changes will do.

Bug: 418877672
Flag: EXEMPT bug fix
Test: run two VMs, kill one by one, observe logcat
I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2048 registered
I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2049 registered
I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2048 unregistered
I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2049 unregistered

Test: run two VMs, kill virtualizationservice, observe logcat. Notice
the difference in PID.
2727  2732 I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2050 registered
2727  2732 I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2051 registered
2848  2851 I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2051 registered
2848  2854 I VirtualizationService: virtualizationservice::aidl: Virtual machine with CID 2050 registered

Change-Id: I88696e9d000d07b7d7ddb9b04775ec8d4f720458
5 files changed
tree: d21a67e85f42ed66063b07d3bd9979fafa9d8088
  1. android/
  2. build/
  3. docs/
  4. guest/
  5. libs/
  6. microfuchsia/
  7. tests/
  8. .clang-format
  9. .gitignore
  10. Android.bp
  11. dice_for_avf_guest.cddl
  12. OWNERS
  13. PREUPLOAD.cfg
  14. README.md
  15. rustfmt.toml
  16. TEST_MAPPING
README.md

Android Virtualization Framework (AVF)

Android Virtualization Framework (AVF) provides secure and private execution environments for executing code. AVF is ideal for security-oriented use cases that require stronger isolation assurances over those offered by Android’s app sandbox.

Visit our public doc site to learn more about what AVF is, what it is for, and how it is structured. This repository contains source code for userspace components of AVF.

If you want a quick start, see the getting started guideline and follow the steps there.

For in-depth explanations about individual topics and components, visit the following links.

AVF components:

AVF APIs:

How-Tos: