pvmfw: apply_debug_policy: Improve failure path

As the function already makes an internal backup of the debug_policy,
turn the parameter into a shareable reference and pass the backup to
fdt_apply_overlay instead of the original DTBO. This removes the need to
do any work to restore the overlay on failure.

Avoid confusing logs such as

    [ERROR] Failed to apply debug policy: The requested node or property does not exist. Recovering...
    [INFO] Debug policy applied.

by returning a bool letting the caller know if DP was properly applied.

Report failure to apply DP as warnings instead of info! or error!.

Bug: 280425124
Test: atest MicrodroidHostTests
Change-Id: Ib5979b07c7978edd94dd90537faefebd25620b19
Merged-In: Ib5979b07c7978edd94dd90537faefebd25620b19
1 file changed
tree: 041db72ea63fc48c4f0092723509ef3de5f30faf
  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.