From 650354dbc2626b643c12873275ca67782f1382c8 Mon Sep 17 00:00:00 2001 From: Tim Deegan Date: Thu, 14 Mar 2013 12:39:39 +0000 Subject: libxl: run libxl__arch_domain_create() much earlier. Among other things, arch_domain_create() sets the shadow(/hap/p2m) memory allocation, which must happen after vcpus are assigned (or the shadow op will fail) but before memory is allocated (or we might run out of p2m memory). libxl__build_pre(), which already sets similar things like maxmem, semes like a reasonable spot for it. That needed a bit of plumbing to get the right datastructure from the caller. As a side-effect, the return code from libxl__arch_domain_create() is no longer ignored. This bug was analysed in: From: "Jan Beulich" "Re: [Xen-devel] [xen-unstable test] 16788: regressions - FAIL" Date: Mon, 04 Mar 2013 16:34:53 +0000 http://lists.xen.org/archives/html/xen-devel/2013-03/msg00191.html Reported-by: Jan Beulich Signed-off-by: Tim Deegan Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell --- tools/libxl/libxl_internal.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/libxl/libxl_internal.h') diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index 8be086d6bb..3ba3a21850 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -884,7 +884,8 @@ typedef struct { } libxl__domain_build_state; _hidden int libxl__build_pre(libxl__gc *gc, uint32_t domid, - libxl_domain_build_info *info, libxl__domain_build_state *state); + libxl_domain_config * const d_config, + libxl__domain_build_state *state); _hidden int libxl__build_post(libxl__gc *gc, uint32_t domid, libxl_domain_build_info *info, libxl__domain_build_state *state, char **vms_ents, char **local_ents); @@ -1278,7 +1279,7 @@ _hidden int libxl__domain_make(libxl__gc *gc, uint32_t *domid); _hidden int libxl__domain_build(libxl__gc *gc, - libxl_domain_build_info *info, + libxl_domain_config *d_config, uint32_t domid, libxl__domain_build_state *state); -- cgit v1.2.3