Hi Bertrand,

On 26/04/2024 10:20, Bertrand Marquis wrote:
+static inline struct domain *ffa_get_domain_by_vm_id(uint16_t vm_id)
+{
+    /* -1 to match ffa_get_vm_id() */
+    return get_domain_by_id(vm_id - 1);
+}
+

I think there is a global discussion to have on using get_domain_by_vm_id
or rcu_lock_live_remote_domain_by_id to make sure the domain is not
dying when we try to do something with it.

It does not need to be done here as there are other places to adapt but
i wanted to raise the question.

I would like to know what you and also other maintainers think here.
@Julien/Michal/Stefano ?

Good question. I think the intention is get_domain_by_id() should be called when you need a reference for longer.

I would consider to involve the REST in this discussion.

Cheers,

--
Julien Grall

Reply via email to