KVM: arm64: pkvm: Add support for fragmented FF-A descriptors
authorQuentin Perret <qperret@google.com>
Tue, 23 May 2023 10:18:27 +0000 (11:18 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 1 Jun 2023 21:34:51 +0000 (21:34 +0000)
commit0a9f15fd56742b785ba4d06e64976f1f700b807c
treed2b9f6169d0a8ea61e8feb6322e99247635fc853
parent20936cd11479709ccd5de2dc77ac8063cd9bfad8
KVM: arm64: pkvm: Add support for fragmented FF-A descriptors

FF-A memory descriptors may need to be sent in fragments when they don't
fit in the mailboxes. Doing so involves using the FRAG_TX and FRAG_RX
primitives defined in the FF-A protocol.

Add support in the pKVM FF-A relayer for fragmented descriptors by
monitoring outgoing FRAG_TX transactions and by buffering large
descriptors on the reclaim path.

Co-developed-by: Andrew Walbran <qwandor@google.com>
Signed-off-by: Andrew Walbran <qwandor@google.com>
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230523101828.7328-11-will@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_pkvm.h
arch/arm64/kvm/hyp/nvhe/ffa.c