pvmfw: Map image footer after dynamic PT switch

Teach the MemoryTracker to map the optional image footer into the
dynamic PTs. As vmbase now knows internally where it is located, there
is no need to receive the "payload range" from the client anymore.
Therefore, refactor MemoryTracker::new() to stop taking that argument.

As a result, pvmfw now first switches to the dynamic PTs before
requesting the footer to be mapped, which prepares it (along with other
vmbase clients) for an upcoming change that will activate the dynamic
PTs before it is entered from vmbase.

As the MemoryTracker keeps track of whether the footer has been mapped,
get_appended_data_slice() can now safely return a Result<&mut> as it
will fail if called more than once.

Note that the memory tracker uses dirty-bit tracking (flushed when
switching back to the static PTs) for the image footer.

Bug: 377276983
Test: m {pvmfw,rialto,vmbase_example_{bios,kernel}}_bin
Test: atest rialto_test vmbase_example.integration_test
Change-Id: I24954b6905db0a0a499f7aa2dedb9a4e5b83d168
5 files changed
tree: 41c89b2431b800b215e03fbc77ca93e46e125ebc
  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: