hyp: Introduce HypervisorCap::MMIO_GUARD

Similarly to DYNAMIC_MEM_SHARE, introduce a capability that client code
can check before calling MMIO_GUARD functions. This will remove the need
to implement stubs in the backends due to client code unconditionally
calling the functions.

Note that KvmHypervisor currently covers both pKVM and non-protected KVM
and will therefore have HypervisorCap::MMIO_GUARD, for now. As the only
client code that makes use of MMIO_GUARD and is intended to run on both
pKVM and regular KVM, Rialto, already deals with the distinction, this
patch doesn't deal with differentiating between the two modes, which is
done in a following patch.

No functional change intended.

Test: atest DebugPolicyHostTests#testNoAdbInDebugPolicy_withDebugLevelNone_boots
Test: atest rialto_test vmbase_example.integration_test
Change-Id: If45d31e65b2407deaf4df16cd4d354ccd6bf4506
5 files changed
tree: c213ef45d8d93e4fa1e13fb04e495f45ed030bf9
  1. apex/
  2. apkdmverity/
  3. authfs/
  4. compos/
  5. demo/
  6. demo_native/
  7. docs/
  8. encryptedstore/
  9. javalib/
  10. launcher/
  11. libs/
  12. microdroid/
  13. microdroid_manager/
  14. pvmfw/
  15. rialto/
  16. service_vm/
  17. tests/
  18. virtualizationmanager/
  19. virtualizationservice/
  20. vm/
  21. vm_payload/
  22. vmbase/
  23. vmclient/
  24. zipfuse/
  25. .clang-format
  26. .gitignore
  27. Android.bp
  28. OWNERS
  29. PREUPLOAD.cfg
  30. README.md
  31. TEST_MAPPING
README.md

Virtualization

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.