From: Will Deacon <will@kernel.org>
To: perlarsen@google.com
Cc: Marc Zyngier <maz@kernel.org>,
Oliver Upton <oliver.upton@linux.dev>,
Joey Gouly <joey.gouly@arm.com>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Zenghui Yu <yuzenghui@huawei.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Sudeep Holla <sudeep.holla@arm.com>,
linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
linux-kernel@vger.kernel.org, ahomescu@google.com,
armellel@google.com, arve@android.com, ayrton@google.com,
qperret@google.com, sebastianene@google.com, qwandor@google.com
Subject: Re: [PATCH v11 2/6] KVM: arm64: Use SMCCC 1.2 for FF-A initialization and in host handler
Date: Mon, 8 Sep 2025 15:38:58 +0100 [thread overview]
Message-ID: <aL7qghmPfM3NMyMz@willie-the-truck> (raw)
In-Reply-To: <20250820-virtio-msg-ffa-v11-2-497ef43550a3@google.com>
On Wed, Aug 20, 2025 at 01:10:06AM +0000, Per Larsen via B4 Relay wrote:
> From: Per Larsen <perlarsen@google.com>
>
> SMCCC 1.1 and prior allows four registers to be sent back as a result
> of an FF-A interface. SMCCC 1.2 increases the number of results that can
> be sent back to 8 and 16 for 32-bit and 64-bit SMC/HVCs respectively.
>
> FF-A 1.0 references SMCCC 1.2 (reference [4] on page xi) and FF-A 1.2
> explicitly requires SMCCC 1.2 so it should be safe to use this version
> unconditionally. Moreover, it is simpler to implement FF-A features
> without having to worry about compatibility with SMCCC 1.1 and older.
>
> SMCCC 1.2 requires that SMC32/HVC32 from aarch64 mode preserves x8-x30
> but given that there is no reliable way to distinguish 32-bit/64-bit
> calls, we assume SMC64 unconditionally. This has the benefit of being
> consistent with the handling of calls that are passed through, i.e., not
> proxied. (A cleaner solution will become available in FF-A 1.3.)
>
> Update the FF-A initialization and host handler code to use SMCCC 1.2.
>
> Signed-off-by: Per Larsen <perlarsen@google.com>
> ---
> arch/arm64/kvm/hyp/nvhe/Makefile | 1 +
> arch/arm64/kvm/hyp/nvhe/ffa.c | 193 +++++++++++++++++++++++++--------------
> 2 files changed, 125 insertions(+), 69 deletions(-)
Acked-by: Will Deacon <will@kernel.org>
Will
next prev parent reply other threads:[~2025-09-08 17:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-20 1:10 [PATCH v11 0/6] KVM: arm64: Support FF-A 1.2 Per Larsen via B4 Relay
2025-08-20 1:10 ` [PATCH v11 1/6] KVM: arm64: Correct return value on host version downgrade attempt Per Larsen via B4 Relay
2025-08-20 1:10 ` [PATCH v11 2/6] KVM: arm64: Use SMCCC 1.2 for FF-A initialization and in host handler Per Larsen via B4 Relay
2025-09-08 14:38 ` Will Deacon [this message]
2025-08-20 1:10 ` [PATCH v11 3/6] KVM: arm64: Mark FFA_NOTIFICATION_* calls as unsupported Per Larsen via B4 Relay
2025-08-20 1:10 ` [PATCH v11 4/6] KVM: arm64: Mark optional FF-A 1.2 interfaces " Per Larsen via B4 Relay
2025-08-20 1:10 ` [PATCH v11 5/6] KVM: arm64: Mask response to FFA_FEATURE call Per Larsen via B4 Relay
2025-08-20 1:10 ` [PATCH v11 6/6] KVM: arm64: Bump the supported version of FF-A to 1.2 Per Larsen via B4 Relay
2025-09-08 14:39 ` [PATCH v11 0/6] KVM: arm64: Support FF-A 1.2 Will Deacon
2025-09-15 9:53 ` Marc Zyngier
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=aL7qghmPfM3NMyMz@willie-the-truck \
--to=will@kernel.org \
--cc=ahomescu@google.com \
--cc=armellel@google.com \
--cc=arve@android.com \
--cc=ayrton@google.com \
--cc=catalin.marinas@arm.com \
--cc=joey.gouly@arm.com \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=perlarsen@google.com \
--cc=qperret@google.com \
--cc=qwandor@google.com \
--cc=sebastianene@google.com \
--cc=sudeep.holla@arm.com \
--cc=suzuki.poulose@arm.com \
--cc=yuzenghui@huawei.com \
/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