]>
git.proxmox.com Git - mirror_edk2.git/blob - OvmfPkg/Include/Library/XenHypercallLib.h
2 Functions declarations to make Xen hypercalls.
4 Copyright (C) 2014, Citrix Ltd.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef __XEN_HYPERCALL_LIB_H__
11 #define __XEN_HYPERCALL_LIB_H__
14 To call when the gEfiXenInfoGuid HOB became available after the library init
15 function has already been executed.
17 This allow to make hypercall in the PEIM stage.
26 Check if the Xen Hypercall library is able to make calls to the Xen
29 Client code should call further functions in this library only if, and after,
30 this function returns TRUE.
32 @retval TRUE Hypercalls are available.
33 @retval FALSE Hypercalls are not available.
37 XenHypercallIsAvailable (
42 This function will put the two arguments in the right place (registers) and
43 invoke the hypercall identified by HypercallID.
45 @param HypercallID The symbolic ID of the hypercall to be invoked
46 @param Arg1 First argument.
47 @param Arg2 Second argument.
49 @return Return 0 if success otherwise it return an errno.
60 Return the value of the HVM parameter Index.
62 @param Index The parameter to get, e.g. HVM_PARAM_STORE_EVTCHN.
64 @return The value of the asked parameter or 0 in case of error.
68 XenHypercallHvmGetParam (
73 Hypercall to do different operation on the memory.
75 @param Operation The operation number, e.g. XENMEM_add_to_physmap.
76 @param Arguments The arguments associated to the operation.
78 @return Return the return value from the hypercall, 0 in case of success
79 otherwise, an error code.
83 XenHypercallMemoryOp (
85 IN OUT VOID
*Arguments
89 Do an operation on the event channels.
91 @param Operation The operation number, e.g. EVTCHNOP_send.
92 @param Arguments The argument associated to the operation.
94 @return Return the return value from the hypercall, 0 in case of success
95 otherwise, an error code.
99 XenHypercallEventChannelOp (
101 IN OUT VOID
*Arguments