pvmfw: Loop SMCCC_TRNG_RND on NO_ENTROPY

As the firmware is allowed by the specification to return NO_ENTROPY:

    The call is non-blocking, when the available entropy is less than N,
    the call must returns `NO_ENTROPY`.
    There are system designs where FW may limit the rate at which
    entropy is requested by a caller.
    To enable this entropy request rate limitation, the call is allowed
    to return `NO_ENTROPY` even if sufficient conditioned

Loop until we receive the requested entropy instead of throwing an error
(resulting in a pvmfw panic).

Note that this could cause a pVM to become unresponsive during boot if
the firmware never returns the requested entropy (a behaviour that seems
to be compliant with the spec).

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