2 This file is part of Valgrind, a dynamic binary instrumentation
5 Copyright (C) 2012-2017 Citrix
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of the
10 License, or (at your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/>.
20 The GNU General Public License is contained in the file COPYING.
23 /* Contributed by Andrew Cooper <andrew.cooper3@citrix.com>
24 and Ian Campbell <ian.campbell@citrix.com> */
26 #ifndef __VKI_XEN_MEMORY_H
27 #define __VKI_XEN_MEMORY_H
29 #define VKI_XENMEM_increase_reservation 0
30 #define VKI_XENMEM_decrease_reservation 1
31 #define VKI_XENMEM_maximum_ram_page 2
32 #define VKI_XENMEM_current_reservation 3
33 #define VKI_XENMEM_maximum_reservation 4
34 #define VKI_XENMEM_machphys_mfn_list 5
35 #define VKI_XENMEM_populate_physmap 6
36 #define VKI_XENMEM_add_to_physmap 7
37 #define VKI_XENMEM_memory_map 9
38 #define VKI_XENMEM_machine_memory_map 10
39 #define VKI_XENMEM_exchange 11
40 #define VKI_XENMEM_machphys_mapping 12
41 #define VKI_XENMEM_set_memory_map 13
42 #define VKI_XENMEM_maximum_gpfn 14
43 #define VKI_XENMEM_remove_from_physmap 15
44 #define VKI_XENMEM_set_pod_target 16
45 #define VKI_XENMEM_get_pod_target 17
46 #define VKI_XENMEM_get_sharing_freed_pages 18
47 #define VKI_XENMEM_get_sharing_shared_pages 19
48 #define VKI_XENMEM_access_op 21
49 #define VKI_XENMEM_claim_pages 24
50 #define VKI_XENMEM_machphys_compat_mfn_list 25
52 struct vki_xen_memory_map
{
53 unsigned int nr_entries
;
54 VKI_XEN_GUEST_HANDLE(void) buffer
;
57 struct vki_xen_foreign_memory_map
{
58 vki_xen_domid_t domid
;
59 struct vki_xen_memory_map map
;
62 struct xen_memory_reservation
{
63 VKI_XEN_GUEST_HANDLE(vki_xen_pfn_t
) extent_start
;
64 vki_xen_ulong_t nr_extents
;
65 unsigned int extent_order
;
66 unsigned int mem_flags
;
67 vki_xen_domid_t domid
;
70 struct vki_xen_machphys_mfn_list
{
71 unsigned int max_extents
; /* IN */
72 VKI_XEN_GUEST_HANDLE(vki_xen_pfn_t
) extent_start
; /* OUT */
73 unsigned int nr_extents
; /* OUT */
76 struct vki_xen_add_to_physmap
{
77 vki_xen_domid_t domid
;
80 #define VKI_XENMAPSPACE_shared_info 0
81 #define VKI_XENMAPSPACE_grant_table 1
82 #define VKI_XENMAPSPACE_gmfn 2
83 #define VKI_XENMAPSPACE_gmfn_range 3
84 #define VKI_XENMAPSPACE_gmfn_foreign 4
91 struct vki_xen_remove_from_physmap
{
92 vki_xen_domid_t domid
;
96 struct vki_xen_mem_event_op
{
98 vki_xen_domid_t domain
;
103 #endif // __VKI_XEN_MEMORY_H
105 /*--------------------------------------------------------------------*/
107 /*--------------------------------------------------------------------*/