1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (C) 2022 - Google LLC 4 * Author: Andrew Walbran <qwandor@google.com> 5 */ 6 #ifndef __KVM_HYP_FFA_H 7 #define __KVM_HYP_FFA_H 8 9 #include <asm/kvm_host.h> 10 #include <nvhe/spinlock.h> 11 12 #define FFA_MIN_FUNC_NUM 0x60 13 #define FFA_MAX_FUNC_NUM 0x7F 14 15 struct kvm_ffa_buffers { 16 hyp_spinlock_t lock; 17 void *tx; 18 void *rx; 19 }; 20 21 int hyp_ffa_init(void *pages); 22 bool kvm_host_ffa_handler(struct kvm_cpu_context *host_ctxt); 23 24 #endif /* __KVM_HYP_FFA_H */ 25