trusty: Set persistent instance ID for Security VM

This change implements the 64-byte instance ID for the Trusty Security
VM, following the agreed-upon format for persistent system VMs.

The instance ID is structured as follows:
 - Bytes 0-15: AVF Reserved Space
   - The first 4 bytes are set to `0x80000000` to flag the VM as a
     persistent system VM (see b/441000033).
   - The remaining bytes (4-15) are zeroed for future use.
 - Bytes 16-31: VM Identifier UUID
   - A constant 16-byte UUID that uniquely identifies the Trusty
     VM type.
 - Bytes 32-63: VM-Specific Space
   - This space is zeroed for the Security VM. For other types, such
     as a Test VM, these bytes can be used for a unique UUID to
     differentiate each specific VM instance.

To implement this, a build-time Python tool now generates the 64-byte
binary ID from a JSON configuration. The resulting binary is added as a
prebuilt file.

The `trusty_security_vm_launcher` now accepts a `--vm-instance-id`
argument pointing to this prebuilt file. The launcher reads the file
and constructs the full 64-byte `instanceId` before starting the VM.

Bug: 441228766
Bug: 417493963
Bug: 441000033
Test: Verified that the Security VM boots successfully on qemu
Flag: EXEMPT this change only affects trusty qemu
Change-Id: Ic6235f8875023c9c02885ed4ee99ea1911454d81
7 files changed
tree: e5debd7c3a65c12b37aa2cd53bca38bb46fc318b
  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. NOTICE
  13. OWNERS
  14. PREUPLOAD.cfg
  15. README.md
  16. rustfmt.toml
  17. 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: