[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 5 of 8] tools: libxl: pass device model info down into HVM domain build functions
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1305294079 -3600 # Node ID 5e7615dbe3008fd25edabb3fda3cb80a76015ed1 # Parent 66579385ed4e553740ac8e44c514bb10336686e7 tools: libxl: pass device model info down into HVM domain build functions. The builder will soon need to know the device model version in order to select the correct firmware. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> diff -r 66579385ed4e -r 5e7615dbe300 tools/libxl/libxl_create.c --- a/tools/libxl/libxl_create.c Fri May 13 14:41:19 2011 +0100 +++ b/tools/libxl/libxl_create.c Fri May 13 14:41:19 2011 +0100 @@ -144,8 +144,11 @@ static int init_console_info(libxl_devic return 0; } -int libxl__domain_build(libxl__gc *gc, libxl_domain_build_info *info, - uint32_t domid, libxl__domain_build_state *state) +int libxl__domain_build(libxl__gc *gc, + libxl_domain_build_info *info, + libxl_device_model_info *dm_info, + uint32_t domid, + libxl__domain_build_state *state) { char **vments = NULL, **localents = NULL; struct timeval start_time; @@ -158,7 +161,7 @@ int libxl__domain_build(libxl__gc *gc, l gettimeofday(&start_time, NULL); if (info->hvm) { - ret = libxl__build_hvm(gc, domid, info, state); + ret = libxl__build_hvm(gc, domid, info, dm_info, state); if (ret) goto out; @@ -437,7 +440,7 @@ static int do_domain_create(libxl__gc *g free(dm_info->saved_state); dm_info->saved_state = NULL; } - ret = libxl__domain_build(gc, &d_config->b_info, domid, &state); + ret = libxl__domain_build(gc, &d_config->b_info, dm_info, domid, &state); } if (ret) { diff -r 66579385ed4e -r 5e7615dbe300 tools/libxl/libxl_dm.c --- a/tools/libxl/libxl_dm.c Fri May 13 14:41:19 2011 +0100 +++ b/tools/libxl/libxl_dm.c Fri May 13 14:41:19 2011 +0100 @@ -611,7 +611,7 @@ static int libxl__create_stubdom(libxl__ ret = libxl__domain_make(gc, &c_info, &domid); if (ret) goto out_free; - ret = libxl__domain_build(gc, &b_info, domid, &state); + ret = libxl__domain_build(gc, &b_info, info, domid, &state); if (ret) goto out_free; diff -r 66579385ed4e -r 5e7615dbe300 tools/libxl/libxl_dom.c --- a/tools/libxl/libxl_dom.c Fri May 13 14:41:19 2011 +0100 +++ b/tools/libxl/libxl_dom.c Fri May 13 14:41:19 2011 +0100 @@ -270,7 +270,8 @@ static int hvm_build_set_params(xc_inter } static const char *libxl__domain_firmware(libxl__gc *gc, - libxl_domain_build_info *info) + libxl_domain_build_info *info, + libxl_device_model_info *dm_info) { return libxl__abs_path(gc, info->u.hvm.firmware ? : "hvmloader", @@ -278,7 +279,9 @@ static const char *libxl__domain_firmwar } int libxl__build_hvm(libxl__gc *gc, uint32_t domid, - libxl_domain_build_info *info, libxl__domain_build_state *state) + libxl_domain_build_info *info, + libxl_device_model_info *dm_info, + libxl__domain_build_state *state) { libxl_ctx *ctx = libxl__gc_owner(gc); int ret, rc = ERROR_INVAL; @@ -289,7 +292,7 @@ int libxl__build_hvm(libxl__gc *gc, uint domid, (info->max_memkb - info->video_memkb) / 1024, (info->target_memkb - info->video_memkb) / 1024, - libxl__domain_firmware(gc, info)); + libxl__domain_firmware(gc, info, dm_info)); if (ret) { LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, ret, "hvm building failed"); goto out; diff -r 66579385ed4e -r 5e7615dbe300 tools/libxl/libxl_internal.h --- a/tools/libxl/libxl_internal.h Fri May 13 14:41:19 2011 +0100 +++ b/tools/libxl/libxl_internal.h Fri May 13 14:41:19 2011 +0100 @@ -186,7 +186,9 @@ _hidden int libxl__build_post(libxl__gc _hidden int libxl__build_pv(libxl__gc *gc, uint32_t domid, libxl_domain_build_info *info, libxl__domain_build_state *state); _hidden int libxl__build_hvm(libxl__gc *gc, uint32_t domid, - libxl_domain_build_info *info, libxl__domain_build_state *state); + libxl_domain_build_info *info, + libxl_device_model_info *dm_info, + libxl__domain_build_state *state); _hidden int libxl__domain_rename(libxl__gc *gc, uint32_t domid, const char *old_name, const char *new_name, @@ -245,7 +247,9 @@ typedef struct { /* from xl_create */ _hidden int libxl__domain_make(libxl__gc *gc, libxl_domain_create_info *info, uint32_t *domid); -_hidden int libxl__domain_build(libxl__gc *gc, libxl_domain_build_info *info, +_hidden int libxl__domain_build(libxl__gc *gc, + libxl_domain_build_info *info, + libxl_device_model_info *dm_info, uint32_t domid, libxl__domain_build_state *state); _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |