blob: 3d057641d61ec3c16078da2109e742cf30519dc5 [file] [log] [blame] [edit]
/* SPDX-License-Identifier: GPL-2.0-only */
#include <asm/kvm_pkvm_module.h>
#include <linux/arm-smccc.h>
const struct pkvm_module_ops *pkvm_ops;
void test_lazy_pte_hyp_hvc(struct user_pt_regs *regs)
{
u64 pfn = regs->regs[1];
bool enable = regs->regs[2];
regs->regs[1] = enable ? pkvm_ops->host_stage2_enable_lazy_pte(pfn, 1) :
pkvm_ops->host_stage2_disable_lazy_pte(pfn, 1);
regs->regs[0] = SMCCC_RET_SUCCESS;
}
int test_lazy_pte_hyp_init(const struct pkvm_module_ops *ops)
{
pkvm_ops = ops;
return 0;
}