[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250513-virtio-msg-ffa-v3-0-d66c76ff1b2c@google.com>
Date: Tue, 13 May 2025 06:28:29 +0000
From: Per Larsen via B4 Relay <devnull+perlarsen.google.com@...nel.org>
To: Marc Zyngier <maz@...nel.org>, Oliver Upton <oliver.upton@...ux.dev>,
Joey Gouly <joey.gouly@....com>, Suzuki K Poulose <suzuki.poulose@....com>,
Zenghui Yu <yuzenghui@...wei.com>,
Catalin Marinas <catalin.marinas@....com>, Will Deacon <will@...nel.org>,
Sudeep Holla <sudeep.holla@....com>
Cc: linux-arm-kernel@...ts.infradead.org, kvmarm@...ts.linux.dev,
linux-kernel@...r.kernel.org, sebastianene@...gle.com,
lpieralisi@...nel.org, arve@...roid.com, qwandor@...gle.com,
kernel-team@...roid.com, armellel@...gle.com, perl@...unant.com,
jean-philippe@...aro.org, ahomescu@...gle.com, tabba@...gle.com,
qperret@...gle.com, james.morse@....com, Per Larsen <perlarsen@...gle.com>,
Ayrton Munoz <ayrton@...gle.com>
Subject: [PATCH v3 0/3] KVM: arm64: Support FF-A 1.2 and SEND_DIRECT2 ABI
Hi,
The FF-A 1.2 specification introduces a new SEND_DIRECT2 ABI which
allows registers x4-x17 to be used for the message payload. This patch
set prevents the host from using a lower FF-A version than what has
already been negotiated with the hypervisor. This is necessary because
the hypervisor does not have the necessary compatibility paths to
translate from the hypervisor FF-A version to a previous version.
Support for FF-A 1.2 in the hypervisor is added as a precursor to the
addition of the FFA_MSG_SEND_DIRECT_REQ2 messaging interface. The bulk
of this change has to do with the upgrade to SMCCC 1.2 required by
FF-A 1.2. Additionally, unimplemented FF-A 1.2 interfaces are added to
the list of unsupported functions.
Tested by booting Android under QEMU and loading Trusty as the guest
VM and observing the SEND_DIRECT2 ABI being used successfully during
guest boot.
Changes since v2:
- 2/3: Removed files added by mistake.
Add and use ffa_get_hypervisor_version to access hyp_ffa_version
- 3/3: Use ffa_get_hypervisor_version to access hyp_ffa_version safely
- Link to v2: https://lore.kernel.org/r/20250508-virtio-msg-ffa-v2-0-ed84f8053965@google.com
Changes since v1:
- 1/3: Simplify commit message; drop long comment in do_ffa_version
- 2/3: Correct use of Co-developed-by: footer
s/arm_smccc_1_2_smc_fallback/arm_smccc_1_x_smc/
Always access hyp_ffa_version w/lock held
Remove superfluous comments in ffa_call_supported
Add and use FFA_FEAT_RXTX_MIN_SZ_MASK instead of constant
Add FFA_PARTITION_INFO_GET_REGS to calls that require SMCCC 1.2
- 3/3: Always access hyp_ffa_version w/lock held
Correct formatting
Thanks,
Per Larsen
--
2.49.0
---
To: Marc Zyngier <maz@...nel.org>
To: Oliver Upton <oliver.upton@...ux.dev>
To: Joey Gouly <joey.gouly@....com>
To: Suzuki K Poulose <suzuki.poulose@....com>
To: Zenghui Yu <yuzenghui@...wei.com>
To: Catalin Marinas <catalin.marinas@....com>
To: Will Deacon <will@...nel.org>
To: Sudeep Holla <sudeep.holla@....com>
Cc: linux-arm-kernel@...ts.infradead.org
Cc: kvmarm@...ts.linux.dev
Cc: linux-kernel@...r.kernel.org
---
Per Larsen (3):
KVM: arm64: Restrict FF-A host version renegotiation
KVM: arm64: Bump the supported version of FF-A to 1.2
KVM: arm64: Support FFA_MSG_SEND_DIRECT_REQ2 in host handler
arch/arm64/kvm/hyp/include/nvhe/ffa.h | 1 +
arch/arm64/kvm/hyp/nvhe/Makefile | 1 +
arch/arm64/kvm/hyp/nvhe/ffa.c | 202 ++++++++++++++++++++++++++++++++--
include/linux/arm_ffa.h | 3 +
4 files changed, 199 insertions(+), 8 deletions(-)
---
base-commit: e9565e23cd89d4d5cd4388f8742130be1d6f182d
change-id: 20250506-virtio-msg-ffa-22af72c92150
Best regards,
--
Per Larsen <perlarsen@...gle.com>
Powered by blists - more mailing lists