diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-05-26 09:58:38 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-05-26 09:58:38 +0100 |
commit | 6a9b5290e9d24efbc6271b4d7e80682b440c812e (patch) | |
tree | b5ff5a8e6ab3e0fb38810b8b96434fc35ae18b26 /tools/libxc/xc_dom_boot.c | |
parent | 2cda4bd1e1a623b7c99bf2266dcb9ff82aa0f463 (diff) | |
download | xen-6a9b5290e9d24efbc6271b4d7e80682b440c812e.tar.gz xen-6a9b5290e9d24efbc6271b4d7e80682b440c812e.tar.bz2 xen-6a9b5290e9d24efbc6271b4d7e80682b440c812e.zip |
Add support for superpages (hugepages) in PV domain
This patch adds the option "superpages" to the domain configuration
file. If it is set, the domain is populated using 2M pages.
This code does not support fallback to small pages. If the domain can
not be created with 2M pages, the create will fail.
The patch also includes support for saving and restoring domains with
the superpage flag set. However, if a domain has freed small pages
within its physical page array and then extended the array, the
restore will fill in those freed pages. It will then attempt to
allocate more than its memory limit and will fail. This is
significant because apparently Linux does this during boot, thus a
freshly booted Linux image can not be saved and restored successfully.
Signed-off-by: Dave McCracken <dcm@mccr.org>
Diffstat (limited to 'tools/libxc/xc_dom_boot.c')
-rw-r--r-- | tools/libxc/xc_dom_boot.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/libxc/xc_dom_boot.c b/tools/libxc/xc_dom_boot.c index e767e8cee1..ac192a3dac 100644 --- a/tools/libxc/xc_dom_boot.c +++ b/tools/libxc/xc_dom_boot.c @@ -129,13 +129,13 @@ int xc_dom_boot_xen_init(struct xc_dom_image *dom, int xc, domid_t domid) return 0; } -int xc_dom_boot_mem_init(struct xc_dom_image *dom) +int xc_dom_boot_mem_init(struct xc_dom_image *dom, int superpages) { long rc; xc_dom_printf("%s: called\n", __FUNCTION__); - rc = arch_setup_meminit(dom); + rc = arch_setup_meminit(dom, superpages); if ( rc != 0 ) { xc_dom_panic(XC_OUT_OF_MEMORY, |