Hi, Olivier, The framework message definition that I mentioned is refered in the FF-A Specification. I hope I didn't misinterpret it. The work flow is interpreted as follows: When the system run into the host OS, I want implemented the post-boot load optee as mentioned in the email with Hafnium as SPMC https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/18635 <https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/18635 > However, when the intialization about hafnium and optee has been finished, SMC_RET8 instruction failed reback from spmd to optee driver. I suspect that there may be some special handling of context needed here. Can you provide some suggestions or help? Regards, Yuye. ------------------------------------------------------------------ 发件人:Olivier Deprez Olivier.Deprez@arm.com 发送时间:2023年3月7日(星期二) 16:55 收件人:梅建强(禹夜) meijianqiang.mjq@alibaba-inc.com 抄 送:Jens Wiklander jens.wiklander@linaro.org; hafnium@lists.trustedfirmware.org hafnium@lists.trustedfirmware.org 主 题:Re: Multi-OPTEE run with Hafnium Hi Yuye, I sense those questions are related to downstream changes of yours, and I may not be able to provide accurate answers without seeing the code. Please clarify if the questions are related to the upstream version of Hafnium. See additional comments below [OD]. Regards, Olivier. From: 梅建强(禹夜) meijianqiang.mjq@alibaba-inc.com Sent: 06 March 2023 14:15 To: Olivier Deprez Olivier.Deprez@arm.com Cc: Jens Wiklander jens.wiklander@linaro.org Subject: Re: Multi-OPTEE run with Hafnium Hi, Olivier, On this question, I should add something based on the results of my tests. When I enter Hafnium through framwork message, the value of the global variable remains the same. [OD] please explain what is a framework message. When I re-enter the Hafnium image_entry via spmd_init, the global variable is restored to its original value. [OD] I'm not sure about the flow here, it depends about where the variable is declared and whether you have local changes to the hafnium boot flows. Do you know why? Regards, Yuye. ------------------------------------------------------------------ 发件人:梅建强(禹夜) meijianqiang.mjq@alibaba-inc.com 发送时间:2023年3月6日(星期一) 17:00 收件人:Olivier Deprez olivier.deprez@arm.com 抄 送:Jens Wiklander jens.wiklander@linaro.org 主 题:Multi-OPTEE run with Hafnium Hi, Olivier, I want to ask a question about variable modification. Before this, let me explain the background about the question. Now, I have run into host OS with Hafnium as spmc and OPTEE as SP. Then the optee driver will send a framwork message to Hafnium to inform it that whether the current state of the host OS is booting or running, [OD] What is a 'framework message' in this context? Is this a custom direct request from driver to optee? so that Hafnium could know which vm node(SP) it should load and init at current state. [OD] Can you please explain why this is required? This current state is represented by a global variable. [OD] do you mean a variable in Hafnium's BSS space? Will the global variable change when message flow exit Hafnium and enter it again? [OD] This depends in which section the variable is declared (see above). Regards, Yuye.