diff options
author | Will Deacon <[email protected]> | 2023-05-23 11:18:20 +0100 |
---|---|---|
committer | Oliver Upton <[email protected]> | 2023-06-01 21:34:50 +0000 |
commit | bc3888a0f4e979ecf9dd8c33a84b8da8cc130790 (patch) | |
tree | 8e82812248a4ce48682e680402ecc8b85454ae7f /arch/arm64/include/asm/kvm_pkvm.h | |
parent | 12bdce4f41197a1a97ba1c711f77d557841e13d9 (diff) |
KVM: arm64: Allocate pages for hypervisor FF-A mailboxes
The FF-A proxy code needs to allocate its own buffer pair for
communication with EL3 and for forwarding calls from the host at EL1.
Reserve a couple of pages for this purpose and use them to initialise
the hypervisor's FF-A buffer structure.
Co-developed-by: Andrew Walbran <[email protected]>
Signed-off-by: Andrew Walbran <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Oliver Upton <[email protected]>
Diffstat (limited to 'arch/arm64/include/asm/kvm_pkvm.h')
-rw-r--r-- | arch/arm64/include/asm/kvm_pkvm.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/kvm_pkvm.h b/arch/arm64/include/asm/kvm_pkvm.h index 01129b0d4c68..2b495ec59deb 100644 --- a/arch/arm64/include/asm/kvm_pkvm.h +++ b/arch/arm64/include/asm/kvm_pkvm.h @@ -106,4 +106,12 @@ static inline unsigned long host_s2_pgtable_pages(void) return res; } +#define KVM_FFA_MBOX_NR_PAGES 1 + +static inline unsigned long hyp_ffa_proxy_pages(void) +{ + /* A page each for the hypervisor's RX and TX mailboxes. */ + return 2 * KVM_FFA_MBOX_NR_PAGES; +} + #endif /* __ARM64_KVM_PKVM_H__ */ |