]>
Commit | Line | Data |
---|---|---|
0fd14246 SS |
1 | /** @file\r |
2 | Grant Table function declaration.\r | |
3 | \r | |
4 | Grant Table are used to grant access to certain page of the current\r | |
5 | VM to an other VM.\r | |
6 | \r | |
7 | Copyright (C) 2014, Citrix Ltd.\r | |
8 | \r | |
9 | This program and the accompanying materials\r | |
10 | are licensed and made available under the terms and conditions of the BSD License\r | |
11 | which accompanies this distribution. The full text of the license may be found at\r | |
12 | http://opensource.org/licenses/bsd-license.php\r | |
13 | \r | |
14 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
15 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
16 | \r | |
17 | **/\r | |
18 | #ifndef __GNTTAB_H__\r | |
19 | #define __GNTTAB_H__\r | |
20 | \r | |
21 | #include <IndustryStandard/Xen/grant_table.h>\r | |
22 | \r | |
23 | /**\r | |
24 | Initialize the Grant Table at the address MmioAddr.\r | |
25 | \r | |
26 | @param Dev A pointer to XENBUS_DEVICE.\r | |
27 | @param MmioAddr An address where the grant table can be mapped into\r | |
28 | the guest.\r | |
29 | **/\r | |
30 | VOID\r | |
31 | XenGrantTableInit (\r | |
d9fdfd85 | 32 | IN XENBUS_DEVICE *Dev\r |
0fd14246 SS |
33 | );\r |
34 | \r | |
35 | /**\r | |
36 | Desinitilize the Grant Table.\r | |
37 | **/\r | |
38 | VOID\r | |
39 | XenGrantTableDeinit (\r | |
40 | IN XENBUS_DEVICE *Dev\r | |
41 | );\r | |
42 | \r | |
43 | /**\r | |
44 | Grant access to the page Frame to the domain DomainId.\r | |
45 | \r | |
46 | @param This A pointer to XENBUS_PROTOCOL instance.\r | |
47 | @param DomainId ID of the domain to grant acces to.\r | |
48 | @param Frame Frame Number of the page to grant access to.\r | |
49 | @param ReadOnly Provide read-only or read-write access.\r | |
b6b33f67 | 50 | @param RefPtr Reference number of the grant will be written to this pointer.\r |
0fd14246 SS |
51 | **/\r |
52 | EFI_STATUS\r | |
53 | EFIAPI\r | |
54 | XenBusGrantAccess (\r | |
55 | IN XENBUS_PROTOCOL *This,\r | |
56 | IN domid_t DomainId,\r | |
57 | IN UINTN Frame, // MFN\r | |
58 | IN BOOLEAN ReadOnly,\r | |
59 | OUT grant_ref_t *RefPtr\r | |
60 | );\r | |
61 | \r | |
62 | /**\r | |
63 | End access to grant Ref, previously return by XenBusGrantAccess.\r | |
64 | \r | |
65 | @param This A pointer to XENBUS_PROTOCOL instance.\r | |
66 | @param Ref Reference numeber of a grant previously returned by\r | |
67 | XenBusGrantAccess.\r | |
68 | **/\r | |
69 | EFI_STATUS\r | |
70 | EFIAPI\r | |
71 | XenBusGrantEndAccess (\r | |
72 | IN XENBUS_PROTOCOL *This,\r | |
73 | IN grant_ref_t Ref\r | |
74 | );\r | |
75 | \r | |
76 | #endif /* !__GNTTAB_H__ */\r |