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

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

29 * XENMEM_populate_physmap:
30 * IN: GPFN bases of extents to populate with memory
31 * OUT: GMFN bases of extents that were allocated
32 * (NB. This command also updates the mach_to_phys translation table)
33 */
34 GUEST_HANDLE(xen_pfn_t) extent_start;
35
36 /* Number of extents, and size/alignment of each (2^extent_order pages). */
1/******************************************************************************
2 * memory.h
3 *
4 * Memory reservation and information.
5 *
6 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
7 */
8

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

29 * XENMEM_populate_physmap:
30 * IN: GPFN bases of extents to populate with memory
31 * OUT: GMFN bases of extents that were allocated
32 * (NB. This command also updates the mach_to_phys translation table)
33 */
34 GUEST_HANDLE(xen_pfn_t) extent_start;
35
36 /* Number of extents, and size/alignment of each (2^extent_order pages). */
37 unsigned long nr_extents;
37 xen_ulong_t nr_extents;
38 unsigned int extent_order;
39
40 /*
41 * Maximum # bits addressable by the user of the allocated region (e.g.,
42 * I/O devices often have a 32-bit limitation even in 64-bit systems). If
43 * zero then the user has no addressing restriction.
44 * This field is not used by XENMEM_decrease_reservation.
45 */

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

87 * deallocated.
88 * 2. The corresponding first entries in the output extent list correctly
89 * indicate the GMFNs that were successfully exchanged.
90 * 3. All other input and output extents are untouched.
91 * 4. If not all input exents are exchanged then the return code of this
92 * command will be non-zero.
93 * 5. THIS FIELD MUST BE INITIALISED TO ZERO BY THE CALLER!
94 */
38 unsigned int extent_order;
39
40 /*
41 * Maximum # bits addressable by the user of the allocated region (e.g.,
42 * I/O devices often have a 32-bit limitation even in 64-bit systems). If
43 * zero then the user has no addressing restriction.
44 * This field is not used by XENMEM_decrease_reservation.
45 */

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

87 * deallocated.
88 * 2. The corresponding first entries in the output extent list correctly
89 * indicate the GMFNs that were successfully exchanged.
90 * 3. All other input and output extents are untouched.
91 * 4. If not all input exents are exchanged then the return code of this
92 * command will be non-zero.
93 * 5. THIS FIELD MUST BE INITIALISED TO ZERO BY THE CALLER!
94 */
95 unsigned long nr_exchanged;
95 xen_ulong_t nr_exchanged;
96};
97
98DEFINE_GUEST_HANDLE_STRUCT(xen_memory_exchange);
99/*
100 * Returns the maximum machine frame number of mapped RAM in this system.
101 * This command always succeeds (it never returns an error code).
102 * arg == NULL.
103 */

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

143/*
144 * Returns the location in virtual address space of the machine_to_phys
145 * mapping table. Architectures which do not have a m2p table, or which do not
146 * map it by default into guest address space, do not implement this command.
147 * arg == addr of xen_machphys_mapping_t.
148 */
149#define XENMEM_machphys_mapping 12
150struct xen_machphys_mapping {
96};
97
98DEFINE_GUEST_HANDLE_STRUCT(xen_memory_exchange);
99/*
100 * Returns the maximum machine frame number of mapped RAM in this system.
101 * This command always succeeds (it never returns an error code).
102 * arg == NULL.
103 */

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

143/*
144 * Returns the location in virtual address space of the machine_to_phys
145 * mapping table. Architectures which do not have a m2p table, or which do not
146 * map it by default into guest address space, do not implement this command.
147 * arg == addr of xen_machphys_mapping_t.
148 */
149#define XENMEM_machphys_mapping 12
150struct xen_machphys_mapping {
151 unsigned long v_start, v_end; /* Start and end virtual addresses. */
152 unsigned long max_mfn; /* Maximum MFN that can be looked up. */
151 xen_ulong_t v_start, v_end; /* Start and end virtual addresses. */
152 xen_ulong_t max_mfn; /* Maximum MFN that can be looked up. */
153};
154DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mapping_t);
155
156/*
157 * Sets the GPFN at which a particular page appears in the specified guest's
158 * pseudophysical address space.
159 * arg == addr of xen_add_to_physmap_t.
160 */

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

167 uint16_t size;
168
169 /* Source mapping space. */
170#define XENMAPSPACE_shared_info 0 /* shared info page */
171#define XENMAPSPACE_grant_table 1 /* grant table page */
172 unsigned int space;
173
174 /* Index into source mapping space. */
153};
154DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mapping_t);
155
156/*
157 * Sets the GPFN at which a particular page appears in the specified guest's
158 * pseudophysical address space.
159 * arg == addr of xen_add_to_physmap_t.
160 */

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

167 uint16_t size;
168
169 /* Source mapping space. */
170#define XENMAPSPACE_shared_info 0 /* shared info page */
171#define XENMAPSPACE_grant_table 1 /* grant table page */
172 unsigned int space;
173
174 /* Index into source mapping space. */
175 unsigned long idx;
175 xen_ulong_t idx;
176
177 /* GPFN where the source mapping page should appear. */
178 xen_pfn_t gpfn;
179};
180DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap);
181
182/*
183 * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
184 * code on failure. This call only works for auto-translated guests.
185 */
186#define XENMEM_translate_gpfn_list 8
187struct xen_translate_gpfn_list {
188 /* Which domain to translate for? */
189 domid_t domid;
190
191 /* Length of list. */
176
177 /* GPFN where the source mapping page should appear. */
178 xen_pfn_t gpfn;
179};
180DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap);
181
182/*
183 * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error
184 * code on failure. This call only works for auto-translated guests.
185 */
186#define XENMEM_translate_gpfn_list 8
187struct xen_translate_gpfn_list {
188 /* Which domain to translate for? */
189 domid_t domid;
190
191 /* Length of list. */
192 unsigned long nr_gpfns;
192 xen_ulong_t nr_gpfns;
193
194 /* List of GPFNs to translate. */
195 GUEST_HANDLE(ulong) gpfn_list;
196
197 /*
198 * Output list to contain MFN translations. May be the same as the input
199 * list (in which case each input GPFN is overwritten with the output MFN).
200 */

--- 40 unchanged lines hidden ---
193
194 /* List of GPFNs to translate. */
195 GUEST_HANDLE(ulong) gpfn_list;
196
197 /*
198 * Output list to contain MFN translations. May be the same as the input
199 * list (in which case each input GPFN is overwritten with the output MFN).
200 */

--- 40 unchanged lines hidden ---