qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qemu and ARM secure state.


From: Jean-Christophe DUBOIS
Subject: Re: Qemu and ARM secure state.
Date: Mon, 8 Nov 2021 23:06:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2

Le 08/11/2021 à 15:14, Alex Bennée a écrit :
Jean-Christophe DUBOIS <jcd@tribudubois.net> writes:

One small question/remark:

According to the the "Arm Power State Coordinate Interface" (DEN0022D.b) 
document (chapter 5) PSCI calls can only be issued by
"normal world" (EL1 or EL2). Therefore, should we be adding a test for the 
current secure state in the arm_is_psci_call() function? This
would prevent calling the built-in Qemu PSCI function if SMC is issued
from secure state.
All that should be handled in:

   void HELPER(pre_smc)(CPUARMState *env, uint32_t syndrome)

which should cause things to be trapped if the CPU is in an invalid
state to execute the SMC instruction. If the exception is a valid SMC we
end up in arm_cpu_do_interrupt where we may divert to
arm_handle_psci_call.

The problem I have is that is seems that once the "psci-conduit" is set to SMC, all SMC exception would be handled only by the diverted  arm_handle_psci_call().

It seems there is no way to handle SMC exception in my software once "psci-conduit" is set to SMC on a platform.

It used to be that only some PSCI services were diverted and other SMC services were handled by the EL3 software if any (and this split was actually also a bit awkward).






reply via email to

[Prev in Thread] Current Thread [Next in Thread]