OvmfPkg[all]  0.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
XenHypercallLib.h File Reference

Functions

RETURN_STATUS EFIAPI XenHypercallLibInit (VOID)
 
BOOLEAN EFIAPI XenHypercallIsAvailable (VOID)
 
INTN EFIAPI XenHypercall2 (IN UINTN HypercallID, IN OUT INTN Arg1, IN OUT INTN Arg2)
 
UINT64 EFIAPI XenHypercallHvmGetParam (UINT32 Index)
 
INTN EFIAPI XenHypercallMemoryOp (IN UINTN Operation, IN OUT VOID *Arguments)
 
INTN EFIAPI XenHypercallEventChannelOp (IN INTN Operation, IN OUT VOID *Arguments)
 

Detailed Description

Functions declarations to make Xen hypercalls.

Copyright (C) 2014, Citrix Ltd.

SPDX-License-Identifier: BSD-2-Clause-Patent

Function Documentation

INTN EFIAPI XenHypercall2 ( IN UINTN  HypercallID,
IN OUT INTN  Arg1,
IN OUT INTN  Arg2 
)

This function will put the two arguments in the right place (registers) and invoke the hypercall identified by HypercallID.

Parameters
HypercallIDThe symbolic ID of the hypercall to be invoked
Arg1First argument.
Arg2Second argument.
Returns
Return 0 if success otherwise it return an errno.
INTN EFIAPI XenHypercallEventChannelOp ( IN INTN  Operation,
IN OUT VOID Arguments 
)

Do an operation on the event channels.

Parameters
OperationThe operation number, e.g. EVTCHNOP_send.
ArgumentsThe argument associated to the operation.
Returns
Return the return value from the hypercall, 0 in case of success otherwise, an error code.
UINT64 EFIAPI XenHypercallHvmGetParam ( UINT32  Index)

Return the value of the HVM parameter Index.

Parameters
IndexThe parameter to get, e.g. HVM_PARAM_STORE_EVTCHN.
Returns
The value of the asked parameter or 0 in case of error.
BOOLEAN EFIAPI XenHypercallIsAvailable ( VOID  )

Check if the Xen Hypercall library is able to make calls to the Xen hypervisor.

Client code should call further functions in this library only if, and after, this function returns TRUE.

Return values
TRUEHypercalls are available.
FALSEHypercalls are not available.
RETURN_STATUS EFIAPI XenHypercallLibInit ( VOID  )

To call when the gEfiXenInfoGuid HOB became available after the library init function has already been executed.

This allow to make hypercall in the PEIM stage.

INTN EFIAPI XenHypercallMemoryOp ( IN UINTN  Operation,
IN OUT VOID Arguments 
)

Hypercall to do different operation on the memory.

Parameters
OperationThe operation number, e.g. XENMEM_add_to_physmap.
ArgumentsThe arguments associated to the operation.
Returns
Return the return value from the hypercall, 0 in case of success otherwise, an error code.