@@ -972,6 +972,13 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
goto error_out;
}
+ ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info,
+ &physinfo);
+ if (ret) {
+ LOGD(ERROR, domid, "Unable to set domain create info defaults");
+ goto error_out;
+ }
+
/* If target_memkb is smaller than max_memkb, the subsequent call
* to libxc when building HVM domain will enable PoD mode.
*/
@@ -1011,13 +1018,6 @@ int libxl__domain_config_setdefault(libxl__gc *gc,
goto error_out;
}
- ret = libxl__domain_create_info_setdefault(gc, &d_config->c_info,
- &physinfo);
- if (ret) {
- LOGD(ERROR, domid, "Unable to set domain create info defaults");
- goto error_out;
- }
-
if (d_config->b_info.shadow_memkb == LIBXL_MEMKB_DEFAULT
&& ok_to_default_memkb_in_create(gc))
d_config->b_info.shadow_memkb =