diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-04-02 13:54:13 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-24 17:57:33 -0400 |
commit | 1775826ceec51187aa868406585799b7e76ffa7d (patch) | |
tree | 585b75deeb350a36ff54095de591ecd58e860ea1 /include/xen/interface | |
parent | af7ae3b9c4a4c1337903f31131d58e3c0d2b6d55 (diff) |
xen: add balloon driver
The balloon driver allows memory to be dynamically added or removed from the domain,
in order to allow host memory to be balanced between multiple domains.
This patch introduces the Xen balloon driver, though it currently only
allows a domain to be shrunk from its initial size (and re-grown back to
that size). A later patch will add the ability to grow a domain beyond
its initial size.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/xen/interface')
-rw-r--r-- | include/xen/interface/memory.h | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/include/xen/interface/memory.h b/include/xen/interface/memory.h index af36ead16817..da768469aa92 100644 --- a/include/xen/interface/memory.h +++ b/include/xen/interface/memory.h | |||
@@ -29,7 +29,7 @@ struct xen_memory_reservation { | |||
29 | * OUT: GMFN bases of extents that were allocated | 29 | * OUT: GMFN bases of extents that were allocated |
30 | * (NB. This command also updates the mach_to_phys translation table) | 30 | * (NB. This command also updates the mach_to_phys translation table) |
31 | */ | 31 | */ |
32 | GUEST_HANDLE(ulong) extent_start; | 32 | ulong extent_start; |
33 | 33 | ||
34 | /* Number of extents, and size/alignment of each (2^extent_order pages). */ | 34 | /* Number of extents, and size/alignment of each (2^extent_order pages). */ |
35 | unsigned long nr_extents; | 35 | unsigned long nr_extents; |
@@ -50,7 +50,6 @@ struct xen_memory_reservation { | |||
50 | domid_t domid; | 50 | domid_t domid; |
51 | 51 | ||
52 | }; | 52 | }; |
53 | DEFINE_GUEST_HANDLE_STRUCT(xen_memory_reservation); | ||
54 | 53 | ||
55 | /* | 54 | /* |
56 | * Returns the maximum machine frame number of mapped RAM in this system. | 55 | * Returns the maximum machine frame number of mapped RAM in this system. |
@@ -86,7 +85,7 @@ struct xen_machphys_mfn_list { | |||
86 | * any large discontiguities in the machine address space, 2MB gaps in | 85 | * any large discontiguities in the machine address space, 2MB gaps in |
87 | * the machphys table will be represented by an MFN base of zero. | 86 | * the machphys table will be represented by an MFN base of zero. |
88 | */ | 87 | */ |
89 | GUEST_HANDLE(ulong) extent_start; | 88 | ulong extent_start; |
90 | 89 | ||
91 | /* | 90 | /* |
92 | * Number of extents written to the above array. This will be smaller | 91 | * Number of extents written to the above array. This will be smaller |
@@ -94,7 +93,6 @@ struct xen_machphys_mfn_list { | |||
94 | */ | 93 | */ |
95 | unsigned int nr_extents; | 94 | unsigned int nr_extents; |
96 | }; | 95 | }; |
97 | DEFINE_GUEST_HANDLE_STRUCT(xen_machphys_mfn_list); | ||
98 | 96 | ||
99 | /* | 97 | /* |
100 | * Sets the GPFN at which a particular page appears in the specified guest's | 98 | * Sets the GPFN at which a particular page appears in the specified guest's |
@@ -117,7 +115,6 @@ struct xen_add_to_physmap { | |||
117 | /* GPFN where the source mapping page should appear. */ | 115 | /* GPFN where the source mapping page should appear. */ |
118 | unsigned long gpfn; | 116 | unsigned long gpfn; |
119 | }; | 117 | }; |
120 | DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap); | ||
121 | 118 | ||
122 | /* | 119 | /* |
123 | * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error | 120 | * Translates a list of domain-specific GPFNs into MFNs. Returns a -ve error |
@@ -132,14 +129,13 @@ struct xen_translate_gpfn_list { | |||
132 | unsigned long nr_gpfns; | 129 | unsigned long nr_gpfns; |
133 | 130 | ||
134 | /* List of GPFNs to translate. */ | 131 | /* List of GPFNs to translate. */ |
135 | GUEST_HANDLE(ulong) gpfn_list; | 132 | ulong gpfn_list; |
136 | 133 | ||
137 | /* | 134 | /* |
138 | * Output list to contain MFN translations. May be the same as the input | 135 | * 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). | 136 | * list (in which case each input GPFN is overwritten with the output MFN). |
140 | */ | 137 | */ |
141 | GUEST_HANDLE(ulong) mfn_list; | 138 | ulong mfn_list; |
142 | }; | 139 | }; |
143 | DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list); | ||
144 | 140 | ||
145 | #endif /* __XEN_PUBLIC_MEMORY_H__ */ | 141 | #endif /* __XEN_PUBLIC_MEMORY_H__ */ |