1 /******************************************************************************
4 * Memory reservation and information.
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to
8 * deal in the Software without restriction, including without limitation the
9 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10 * sell copies of the Software, and to permit persons to whom the Software is
11 * furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
24 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
27 #ifndef __XEN_PUBLIC_MEMORY_H__
28 #define __XEN_PUBLIC_MEMORY_H__
32 /* Source mapping space. */
33 /* ` enum phys_map_space { */
34 #define XENMAPSPACE_shared_info 0 /* shared info page */
35 #define XENMAPSPACE_grant_table 1 /* grant table page */
36 #define XENMAPSPACE_gmfn 2 /* GMFN */
37 #define XENMAPSPACE_gmfn_range 3 /* GMFN range, XENMEM_add_to_physmap only. */
38 #define XENMAPSPACE_gmfn_foreign 4 /* GMFN from another dom,
39 * XENMEM_add_to_physmap_batch only. */
43 * Sets the GPFN at which a particular page appears in the specified guest's
44 * pseudophysical address space.
45 * arg == addr of xen_add_to_physmap_t.
47 #define XENMEM_add_to_physmap 7
48 struct xen_add_to_physmap
{
49 /* Which domain to change the mapping for. */
52 /* Number of pages to go through for gmfn_range */
55 UINT32 space
; /* => enum phys_map_space */
57 #define XENMAPIDX_grant_table_status 0x80000000
59 /* Index into space being mapped. */
62 /* GPFN in domid where the source mapping page should appear. */
65 typedef struct xen_add_to_physmap xen_add_to_physmap_t
;
66 DEFINE_XEN_GUEST_HANDLE(xen_add_to_physmap_t
);
69 * Unmaps the page appearing at a particular GPFN from the specified guest's
70 * pseudophysical address space.
71 * arg == addr of xen_remove_from_physmap_t.
73 #define XENMEM_remove_from_physmap 15
74 struct xen_remove_from_physmap
{
75 /* Which domain to change the mapping for. */
78 /* GPFN of the current mapping of the page. */
81 typedef struct xen_remove_from_physmap xen_remove_from_physmap_t
;
82 DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t
);
84 #endif /* __XEN_PUBLIC_MEMORY_H__ */
92 * indent-tabs-mode: nil