2014-10-29 07:50:14 +01:00
|
|
|
/** @file
|
|
|
|
Grant Table function declaration.
|
|
|
|
|
|
|
|
Grant Table are used to grant access to certain page of the current
|
|
|
|
VM to an other VM.
|
|
|
|
|
|
|
|
Copyright (C) 2014, Citrix Ltd.
|
|
|
|
|
2019-04-04 01:06:33 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2014-10-29 07:50:14 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
#ifndef __GNTTAB_H__
|
|
|
|
#define __GNTTAB_H__
|
|
|
|
|
|
|
|
#include <IndustryStandard/Xen/grant_table.h>
|
|
|
|
|
|
|
|
/**
|
|
|
|
Initialize the Grant Table at the address MmioAddr.
|
|
|
|
|
|
|
|
@param Dev A pointer to XENBUS_DEVICE.
|
|
|
|
@param MmioAddr An address where the grant table can be mapped into
|
|
|
|
the guest.
|
|
|
|
**/
|
|
|
|
VOID
|
|
|
|
XenGrantTableInit (
|
2015-02-28 21:33:11 +01:00
|
|
|
IN XENBUS_DEVICE *Dev
|
2014-10-29 07:50:14 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2020-02-07 02:08:12 +01:00
|
|
|
De-initialize the Grant Table.
|
2014-10-29 07:50:14 +01:00
|
|
|
**/
|
|
|
|
VOID
|
|
|
|
XenGrantTableDeinit (
|
|
|
|
IN XENBUS_DEVICE *Dev
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Grant access to the page Frame to the domain DomainId.
|
|
|
|
|
|
|
|
@param This A pointer to XENBUS_PROTOCOL instance.
|
2020-02-07 02:08:13 +01:00
|
|
|
@param DomainId ID of the domain to grant access to.
|
2014-10-29 07:50:14 +01:00
|
|
|
@param Frame Frame Number of the page to grant access to.
|
|
|
|
@param ReadOnly Provide read-only or read-write access.
|
2016-09-13 10:33:20 +02:00
|
|
|
@param RefPtr Reference number of the grant will be written to this pointer.
|
2014-10-29 07:50:14 +01:00
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
XenBusGrantAccess (
|
|
|
|
IN XENBUS_PROTOCOL *This,
|
|
|
|
IN domid_t DomainId,
|
|
|
|
IN UINTN Frame, // MFN
|
|
|
|
IN BOOLEAN ReadOnly,
|
|
|
|
OUT grant_ref_t *RefPtr
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
|
|
|
End access to grant Ref, previously return by XenBusGrantAccess.
|
|
|
|
|
|
|
|
@param This A pointer to XENBUS_PROTOCOL instance.
|
|
|
|
@param Ref Reference numeber of a grant previously returned by
|
|
|
|
XenBusGrantAccess.
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
XenBusGrantEndAccess (
|
|
|
|
IN XENBUS_PROTOCOL *This,
|
|
|
|
IN grant_ref_t Ref
|
|
|
|
);
|
|
|
|
|
|
|
|
#endif /* !__GNTTAB_H__ */
|