tools: Enable superpages for HVM domains by default
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 26 May 2011 14:27:34 +0000 (15:27 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Thu, 26 May 2011 14:27:34 +0000 (15:27 +0100)
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson.citrix.com>
tools/libxl/libxl_dom.c
tools/xcutils/xc_restore.c

index 87d424b62017fb221d95fd990e229c5cf80ce714..e07c4ba8788415518f5b46acd51ad7811fdd3734 100644 (file)
@@ -340,7 +340,7 @@ int libxl__domain_restore_common(libxl__gc *gc, uint32_t domid,
     rc = xc_domain_restore(ctx->xch, fd, domid,
                              state->store_port, &state->store_mfn,
                              state->console_port, &state->console_mfn,
-                             info->hvm, info->u.hvm.pae, 0);
+                             info->hvm, info->u.hvm.pae, !!info->hvm);
     if ( rc ) {
         LIBXL__LOG_ERRNO(ctx, LIBXL__LOG_ERROR, "restoring domain");
         return ERROR_FAIL;
index ea069ac8f55bb51e8c04db24568c3c6bf6a18820..985cbecb11a2130c0d1d118461e86f783dc1ceaf 100644 (file)
@@ -43,7 +43,7 @@ main(int argc, char **argv)
     if ( argc == 9 )
            superpages = atoi(argv[8]);
     else
-           superpages = 0;
+           superpages = !!hvm;
 
     ret = xc_domain_restore(xch, io_fd, domid, store_evtchn, &store_mfn,
                             console_evtchn, &console_mfn, hvm, pae, superpages);