From: Jean-Christophe DUBOIS <jcd@tribudubois.net>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: Qemu and ARM secure state.
Date: Mon, 8 Nov 2021 23:06:27 +0100 [thread overview]
Message-ID: <7e8cc67c-2380-e401-ddc7-7dc24df31ede@tribudubois.net> (raw)
In-Reply-To: <87k0hik9yc.fsf@linaro.org>
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).
>
next prev parent reply other threads:[~2021-11-08 22:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <07e63acb-b756-2586-2ba2-b54b837f7fc8@tribudubois.net>
2021-11-04 11:11 ` Qemu and ARM secure state Peter Maydell
2021-11-04 21:11 ` Jean-Christophe DUBOIS
2021-11-06 10:04 ` Jean-Christophe DUBOIS
2021-11-06 13:04 ` Jean-Christophe DUBOIS
2021-11-06 18:11 ` Jean-Christophe DUBOIS
2021-11-08 14:14 ` Alex Bennée
2021-11-08 22:06 ` Jean-Christophe DUBOIS [this message]
2021-11-08 14:50 ` Peter Maydell
2021-11-08 22:09 ` Jean-Christophe DUBOIS
2021-11-09 10:55 ` Peter Maydell
2021-11-09 19:06 ` Jean-Christophe DUBOIS
2021-11-09 19:20 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7e8cc67c-2380-e401-ddc7-7dc24df31ede@tribudubois.net \
--to=jcd@tribudubois.net \
--cc=alex.bennee@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).