pvmfw: debug policy application failure is recoverable

If pvmfw fails to apply the debug policy, the original fdt is recovered
from the backup.

In this change also moves apply_debug_policy into modify_for_next_stage,
so that modification to the fdt after the verification is done in one
place.

Finally, error codes that are specific to debug policy are replaced with
the original errors from libfdt because the former don't give much
detail information than the other.

Bug: 275132866
Bug: 275306568
Test: forcibly modify a bit in debug_policy inside pvmfw and see if the
VM boots (without applying it). Flashing an invalid debug_policy was not
an option for the test because then ABL would reject it and doesn't pass
it to pvmfw at all.

Change-Id: I1c40967087449deb89a9698a87109fc16e588b70
4 files changed
tree: 41d6e2d333092525c6526f2fe9b43822486db27d
  1. apex/
  2. apkdmverity/
  3. authfs/
  4. compos/
  5. demo/
  6. docs/
  7. encryptedstore/
  8. javalib/
  9. launcher/
  10. libs/
  11. microdroid/
  12. microdroid_manager/
  13. pvmfw/
  14. rialto/
  15. tests/
  16. virtualizationmanager/
  17. virtualizationservice/
  18. vm/
  19. vm_payload/
  20. vmbase/
  21. vmclient/
  22. zipfuse/
  23. .clang-format
  24. .gitignore
  25. Android.bp
  26. OWNERS
  27. PREUPLOAD.cfg
  28. README.md
  29. 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.