typedef bool (*exit_handler_fn)(struct kvm_vcpu *, u64 *);
-static const exit_handler_fn *kvm_get_exit_handler_array(void);
+static const exit_handler_fn *kvm_get_exit_handler_array(struct kvm *kvm);
/*
* Allow the hypervisor to handle the exit with an exit handler if it has one.
*/
static inline bool kvm_hyp_handle_exit(struct kvm_vcpu *vcpu, u64 *exit_code)
{
- const exit_handler_fn *handlers = kvm_get_exit_handler_array();
+ const exit_handler_fn *handlers = kvm_get_exit_handler_array(kern_hyp_va(vcpu->kvm));
exit_handler_fn fn;
fn = handlers[kvm_vcpu_trap_get_class(vcpu)];
[ESR_ELx_EC_PAC] = kvm_hyp_handle_ptrauth,
};
-static const exit_handler_fn *kvm_get_exit_handler_array(void)
+static const exit_handler_fn *kvm_get_exit_handler_array(struct kvm *kvm)
{
return hyp_exit_handlers;
}
[ESR_ELx_EC_PAC] = kvm_hyp_handle_ptrauth,
};
-static const exit_handler_fn *kvm_get_exit_handler_array(void)
+static const exit_handler_fn *kvm_get_exit_handler_array(struct kvm *kvm)
{
return hyp_exit_handlers;
}