diff options
Diffstat (limited to 'arch/arm64/hyperv/hv_core.c')
-rw-r--r-- | arch/arm64/hyperv/hv_core.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm64/hyperv/hv_core.c b/arch/arm64/hyperv/hv_core.c index 69004f619c57..e33a9e3c366a 100644 --- a/arch/arm64/hyperv/hv_core.c +++ b/arch/arm64/hyperv/hv_core.c @@ -54,6 +54,23 @@ u64 hv_do_fast_hypercall8(u16 code, u64 input) EXPORT_SYMBOL_GPL(hv_do_fast_hypercall8); /* + * hv_do_fast_hypercall16 -- Invoke the specified hypercall + * with arguments in registers instead of physical memory. + * Avoids the overhead of virt_to_phys for simple hypercalls. + */ +u64 hv_do_fast_hypercall16(u16 code, u64 input1, u64 input2) +{ + struct arm_smccc_res res; + u64 control; + + control = (u64)code | HV_HYPERCALL_FAST_BIT; + + arm_smccc_1_1_hvc(HV_FUNC_ID, control, input1, input2, &res); + return res.a0; +} +EXPORT_SYMBOL_GPL(hv_do_fast_hypercall16); + +/* * Set a single VP register to a 64-bit value. */ void hv_set_vpreg(u32 msr, u64 value) |