memory.h (b981d8b3f5e008ff10d993be633ad00564fc22cd) memory.h (1775826ceec51187aa868406585799b7e76ffa7d)
1/******************************************************************************
2 * memory.h
3 *
4 * Memory reservation and information.
5 *
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
7 */
8

--- 15 unchanged lines hidden (view full) ---

24 * OUT: MFN (*not* GMFN) bases of extents that were allocated
25 * XENMEM_decrease_reservation:
26 * IN: GMFN bases of extents to free
27 * XENMEM_populate_physmap:
28 * IN: GPFN bases of extents to populate with memory
29 * OUT: GMFN bases of extents that were allocated
30 * (NB. This command also updates the mach_to_phys translation table)
31 */
1/******************************************************************************
2 * memory.h
3 *
4 * Memory reservation and information.
5 *
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
7 */
8

--- 15 unchanged lines hidden (view full) ---

24 * OUT: MFN (*not* GMFN) bases of extents that were allocated
25 * XENMEM_decrease_reservation:
26 * IN: GMFN bases of extents to free
27 * XENMEM_populate_physmap:
28 * IN: GPFN bases of extents to populate with memory
29 * OUT: GMFN bases of extents that were allocated
30 * (NB. This command also updates the mach_to_phys translation table)
31 */
32 GUEST_HANDLE(ulong) extent_start;
32 ulong extent_start;
33
34 /* Number of extents, and size/alignment of each (2^extent_order pages). */
35 unsigned long nr_extents;
36 unsigned int extent_order;
37
38 /*
39 * Maximum # bits addressable by the user of the allocated region (e.g.,
40 * I/O devices often have a 32-bit limitation even in 64-bit systems). If

--- 4 unchanged lines hidden (view full) ---

45
46 /*
47 * Domain whose reservation is being changed.
48 * Unprivileged domains can specify only DOMID_SELF.
49 */
50 domid_t domid;
51
52};
33
34 /* Number of extents, and size/alignment of each (2^extent_order pages). */
35 unsigned long nr_extents;
36 unsigned int extent_order;
37
38 /*
39 * Maximum # bits addressable by the user of the allocated region (e.g.,
40 * I/O devices often have a 32-bit limitation even in 64-bit systems). If

--- 4 unchanged lines hidden (view full) ---

45
46 /*
47 * Domain whose reservation is being changed.
48 * Unprivileged domains can specify only DOMID_SELF.
49 */
50 domid_t domid;
51
52};
53DEFINE_GUEST_HANDLE_STRUCT(xen_memory_reservation);
54
55/*
56 * Returns the maximum machine frame number of mapped RAM in this system.
57 * This command always succeeds (it never returns an error code).
58 * arg == NULL.
59 */
60#define XENMEM_maximum_ram_page 2
61

--- 19 unchanged lines hidden (view full) ---

81 */
82 unsigned int max_extents;
83
84 /*
85 * Pointer to buffer to fill with list of extent starts. If there are
86 * any large discontiguities in the machine address space, 2MB gaps in
87 * the machphys table will be represented by an MFN base of zero.
88 */
53
54/*
55 * Returns the maximum machine frame number of mapped RAM in this system.
56 * This command always succeeds (it never returns an error code).
57 * arg == NULL.
58 */
59#define XENMEM_maximum_ram_page 2
60

--- 19 unchanged lines hidden (view full) ---

80 */
81 unsigned int max_extents;
82
83 /*
84 * Pointer to buffer to fill with list of extent starts. If there are
85 * any large discontiguities in the machine address space, 2MB gaps in
86 * the machphys table will be represented by an MFN base of zero.
87 */
89 GUEST_HANDLE(ulong) extent_start;
88 ulong extent_start;
90
91 /*
92 * Number of extents written to the above array. This will be smaller
93 * than 'max_extents' if the machphys table is smaller than max_e * 2MB.
94 */
95 unsigned int nr_extents;
96};
89
90 /*
91 * Number of extents written to the above array. This will be smaller
92 * than 'max_extents' if the machphys table is smaller than max_e * 2MB.
93 */
94 unsigned int nr_extents;
95};
97DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list);
98
99/*
100 * Sets the GPFN at which a particular page appears in the specified guest's
101 * pseudophysical address space.
102 * arg == addr of xen_add_to_physmap_t.
103 */
104#define XENMEM_add_to_physmap 7
105struct xen_add_to_physmap {

--- 6 unchanged lines hidden (view full) ---

112 unsigned int space;
113
114 /* Index into source mapping space. */
115 unsigned long idx;
116
117 /* GPFN where the source mapping page should appear. */
118 unsigned long gpfn;
119};
96
97/*
98 * Sets the GPFN at which a particular page appears in the specified guest's
99 * pseudophysical address space.
100 * arg == addr of xen_add_to_physmap_t.
101 */
102#define XENMEM_add_to_physmap 7
103struct xen_add_to_physmap {

--- 6 unchanged lines hidden (view full) ---

110 unsigned int space;
111
112 /* Index into source mapping space. */
113 unsigned long idx;
114
115 /* GPFN where the source mapping page should appear. */
116 unsigned long gpfn;
117};
120DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap);
121
122/*
123 * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
124 * code on failure. This call only works for auto-translated guests.
125 */
126#define XENMEM_translate_gpfn_list 8
127struct xen_translate_gpfn_list {
128 /* Which domain to translate for? */
129 domid_t domid;
130
131 /* Length of list. */
132 unsigned long nr_gpfns;
133
134 /* List of GPFNs to translate. */
118
119/*
120 * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
121 * code on failure. This call only works for auto-translated guests.
122 */
123#define XENMEM_translate_gpfn_list 8
124struct xen_translate_gpfn_list {
125 /* Which domain to translate for? */
126 domid_t domid;
127
128 /* Length of list. */
129 unsigned long nr_gpfns;
130
131 /* List of GPFNs to translate. */
135 GUEST_HANDLE(ulong) gpfn_list;
132 ulong gpfn_list;
136
137 /*
138 * Output list to contain MFN translations. May be the same as the input
139 * list (in which case each input GPFN is overwritten with the output MFN).
140 */
133
134 /*
135 * Output list to contain MFN translations. May be the same as the input
136 * list (in which case each input GPFN is overwritten with the output MFN).
137 */
141 GUEST_HANDLE(ulong) mfn_list;
138 ulong mfn_list;
142};
139};
143DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
144
145#endif /* __XEN_PUBLIC_MEMORY_H__ */
140
141#endif /* __XEN_PUBLIC_MEMORY_H__ */