1 #ifndef __VKI_XEN_MEMORY_H
2 #define __VKI_XEN_MEMORY_H
3 
4 #define VKI_XENMEM_increase_reservation 0
5 #define VKI_XENMEM_decrease_reservation 1
6 #define VKI_XENMEM_maximum_ram_page     2
7 #define VKI_XENMEM_current_reservation  3
8 #define VKI_XENMEM_maximum_reservation  4
9 #define VKI_XENMEM_machphys_mfn_list    5
10 #define VKI_XENMEM_populate_physmap     6
11 #define VKI_XENMEM_add_to_physmap       7
12 #define VKI_XENMEM_memory_map           9
13 #define VKI_XENMEM_machine_memory_map   10
14 #define VKI_XENMEM_exchange             11
15 #define VKI_XENMEM_machphys_mapping     12
16 #define VKI_XENMEM_set_memory_map       13
17 #define VKI_XENMEM_maximum_gpfn         14
18 #define VKI_XENMEM_remove_from_physmap  15
19 #define VKI_XENMEM_set_pod_target       16
20 #define VKI_XENMEM_get_pod_target       17
21 #define VKI_XENMEM_get_sharing_freed_pages    18
22 #define VKI_XENMEM_get_sharing_shared_pages   19
23 #define VKI_XENMEM_access_op                  21
24 #define VKI_XENMEM_claim_pages                24
25 
26 struct vki_xen_memory_map {
27     unsigned int nr_entries;
28     VKI_XEN_GUEST_HANDLE(void) buffer;
29 };
30 
31 struct vki_xen_foreign_memory_map {
32     vki_xen_domid_t domid;
33     struct vki_xen_memory_map map;
34 };
35 
36 struct xen_memory_reservation {
37     VKI_XEN_GUEST_HANDLE(vki_xen_pfn_t) extent_start;
38     vki_xen_ulong_t    nr_extents;
39     unsigned int   extent_order;
40     unsigned int   mem_flags;
41     vki_xen_domid_t domid;
42 };
43 
44 struct vki_xen_machphys_mfn_list {
45     unsigned int max_extents; /* IN */
46     VKI_XEN_GUEST_HANDLE(vki_xen_pfn_t) extent_start; /* OUT */
47     unsigned int nr_extents; /* OUT */
48 };
49 
50 struct vki_xen_add_to_physmap {
51     vki_xen_domid_t domid;
52     vki_uint16_t size;
53 
54 #define VKI_XENMAPSPACE_shared_info  0
55 #define VKI_XENMAPSPACE_grant_table  1
56 #define VKI_XENMAPSPACE_gmfn         2
57 #define VKI_XENMAPSPACE_gmfn_range   3
58 #define VKI_XENMAPSPACE_gmfn_foreign 4
59 
60     unsigned int space;
61     vki_xen_ulong_t idx;
62     vki_xen_pfn_t gpfn;
63 };
64 
65 struct vki_xen_remove_from_physmap {
66     vki_xen_domid_t domid;
67     vki_xen_pfn_t gpfn;
68 };
69 
70 struct vki_xen_mem_event_op {
71     vki_uint8_t     op;
72     vki_xen_domid_t     domain;
73     vki_uint64_t    buffer;
74     vki_uint64_t    gfn;
75 };
76 
77 #endif // __VKI_XEN_MEMORY_H
78 
79 /*--------------------------------------------------------------------*/
80 /*--- end                                                          ---*/
81 /*--------------------------------------------------------------------*/
82