summaryrefslogtreecommitdiffstats
path: root/include/kvm
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2023-04-04 17:40:44 +0200
committerMarc Zyngier <maz@kernel.org>2023-04-05 13:07:41 +0200
commitfb88707dd39bd1d5ec4a058776de9ee99bcc7b72 (patch)
tree69568a3ffa09c4257bbf3b1195573b84a52510f4 /include/kvm
parentKVM: arm64: Refactor hvc filtering to support different actions (diff)
downloadlinux-fb88707dd39bd1d5ec4a058776de9ee99bcc7b72.tar.xz
linux-fb88707dd39bd1d5ec4a058776de9ee99bcc7b72.zip
KVM: arm64: Use a maple tree to represent the SMCCC filter
Maple tree is an efficient B-tree implementation that is intended for storing non-overlapping intervals. Such a data structure is a good fit for the SMCCC filter as it is desirable to sparsely allocate the 32 bit function ID space. To that end, add a maple tree to kvm_arch and correctly init/teardown along with the VM. Wire in a test against the hypercall filter for HVCs which does nothing until the controls are exposed to userspace. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20230404154050.2270077-8-oliver.upton@linux.dev
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_hypercalls.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/kvm/arm_hypercalls.h b/include/kvm/arm_hypercalls.h
index 8f4e33bc43e8..fe6c31575b05 100644
--- a/include/kvm/arm_hypercalls.h
+++ b/include/kvm/arm_hypercalls.h
@@ -43,6 +43,7 @@ static inline void smccc_set_retval(struct kvm_vcpu *vcpu,
struct kvm_one_reg;
void kvm_arm_init_hypercalls(struct kvm *kvm);
+void kvm_arm_teardown_hypercalls(struct kvm *kvm);
int kvm_arm_get_fw_num_regs(struct kvm_vcpu *vcpu);
int kvm_arm_copy_fw_reg_indices(struct kvm_vcpu *vcpu, u64 __user *uindices);
int kvm_arm_get_fw_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg);