Several suggestions were put forward by reviewers(Joao, Raghu, Olivier) during the review of hafnium patches. This ticket captures these suggestions to be fixed/implemented in the next iteration.
1. Manage the partition runtime model upon completion of initialization by secondary execution contexts: https://review.trustedfirmware.org/c/hafnium/hafnium/+/15655/comment/9cb4e08b_0c9c5089/
2. Declutter the member fields of vcpu struct that are specific to arm aarch64/secure state: https://review.trustedfirmware.org/c/hafnium/hafnium/+/15656/comment/3d2b3990_455839cd/
3. Pass locked structures to newly created helper functions such as plat_ffa_check_runtime_state_transition():
https://review.trustedfirmware.org/c/hafnium/hafnium/+/15657/comment/6708ec9b_e1b7e5ae/
https://review.trustedfirmware.org/c/hafnium/hafnium/+/15657/comment/f6917756_6fc31ff9/
https://review.trustedfirmware.org/c/hafnium/hafnium/+/15660/comment/6539f1e4_29cd1912/
https://review.trustedfirmware.org/c/hafnium/hafnium/+/15662/comment/f6d82d82_b41779ef/
4. Revisit the need for implicit_completion_signal in the design of virtual secure interrupt signaling/completion:
https://review.trustedfirmware.org/c/hafnium/hafnium/+/15671/comment/84eb76f8_5ff0fee3/
5. https://review.trustedfirmware.org/c/hafnium/hafnium/+/15662/comment/376cf89e_15a672f0/
Further improvement to tf-a-tests
6. https://review.trustedfirmware.org/c/TF-A/tf-a-tests/+/15678/comment/b1c3b914_53767cfc/
7. https://review.trustedfirmware.org/c/TF-A/tf-a-tests/+/15678/comment/de1949da_6409bc47/
8. https://review.trustedfirmware.org/c/TF-A/tf-a-tests/+/15675/comment/d4ba98f8_940e3d08/
9. Revisit the excessive usage of panic. It is discouraged and SPMC must leverage other graceful mechanisms.
https://review.trustedfirmware.org/c/hafnium/hafnium/+/16570/comment/ea9ecbc6_88943b3d/
10. Consider the implications of deactivting the physical secure interrupt even before the SP gets an opportunity to handle the corresponding virtual interrupt , possibly correlated with a peripheral
https://review.trustedfirmware.org/c/hafnium/hafnium/+/16570/comment/18759be2_0f40d998/