[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] tools/libxl: Plumb domain_create_state down into libxl__build_pre()
commit aacc143006429de46932aabae17c13846c71fa45 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Thu Jan 2 21:37:36 2020 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Thu Jan 16 19:26:09 2020 +0000 tools/libxl: Plumb domain_create_state down into libxl__build_pre() To fix CPUID handling, libxl__build_pre() is going to have to distinguish between a brand new VM vs one which is being migrated-in/resumed. No functional change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- tools/libxl/libxl_create.c | 16 ++++++++-------- tools/libxl/libxl_dm.c | 5 +++-- tools/libxl/libxl_dom.c | 4 +++- tools/libxl/libxl_internal.h | 11 ++++------- 4 files changed, 18 insertions(+), 18 deletions(-) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 32d45dcef0..69fceff061 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -431,17 +431,17 @@ static void init_console_info(libxl__gc *gc, Only 'channels' when mapped to consoles have a string name. */ } -int libxl__domain_build(libxl__gc *gc, - libxl_domain_config *d_config, - uint32_t domid, - libxl__domain_build_state *state) +int libxl__domain_build(libxl__gc *gc, uint32_t domid, + libxl__domain_create_state *dcs) { + libxl_domain_config *d_config = dcs->guest_config; libxl_domain_build_info *const info = &d_config->b_info; + libxl__domain_build_state *state = &dcs->build_state; char **vments = NULL, **localents = NULL; struct timeval start_time; int i, ret; - ret = libxl__build_pre(gc, domid, d_config, state); + ret = libxl__build_pre(gc, domid, dcs); if (ret) goto out; @@ -1218,7 +1218,7 @@ static void domcreate_bootloader_done(libxl__egc *egc, dcs->sdss.callback = domcreate_devmodel_started; if (restore_fd < 0 && dcs->domid_soft_reset == INVALID_DOMID) { - rc = libxl__domain_build(gc, d_config, domid, state); + rc = libxl__domain_build(gc, domid, dcs); domcreate_rebuild_done(egc, dcs, rc); return; } @@ -1244,7 +1244,7 @@ static void domcreate_bootloader_done(libxl__egc *egc, goto out; } - rc = libxl__build_pre(gc, domid, d_config, state); + rc = libxl__build_pre(gc, domid, dcs); if (rc) goto out; @@ -1554,7 +1554,7 @@ static void domcreate_launch_dm(libxl__egc *egc, libxl__multidev *multidev, dcs->sdss.dm.guest_domid = domid; if (libxl_defbool_val(d_config->b_info.device_model_stubdomain)) - libxl__spawn_stub_dm(egc, &dcs->sdss); + libxl__spawn_stub_dm(egc, dcs); else libxl__spawn_local_dm(egc, &dcs->sdss.dm); diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index e92e412c1b..3f08ccad1b 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -2097,8 +2097,9 @@ char *libxl__stub_dm_name(libxl__gc *gc, const char *guest_name) return GCSPRINTF("%s-dm", guest_name); } -void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss) +void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs) { + libxl__stub_dm_spawn_state *sdss = &dcs->sdss; STATE_AO_GC(sdss->dm.spawn.ao); libxl_ctx *ctx = libxl__gc_owner(gc); int ret; @@ -2197,7 +2198,7 @@ void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state *sdss) if (ret) goto out; uint32_t dm_domid = sdss->pvqemu.guest_domid; - ret = libxl__domain_build(gc, dm_config, dm_domid, stubdom_state); + ret = libxl__domain_build(gc, dm_domid, dcs); if (ret) goto out; diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index cdb294ab8d..e0b6d4a8d3 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -387,9 +387,11 @@ static void hvm_set_conf_params(xc_interface *handle, uint32_t domid, } int libxl__build_pre(libxl__gc *gc, uint32_t domid, - libxl_domain_config *d_config, libxl__domain_build_state *state) + libxl__domain_create_state *dcs) { + libxl_domain_config *d_config = dcs->guest_config; libxl_domain_build_info *const info = &d_config->b_info; + libxl__domain_build_state *state = &dcs->build_state; libxl_ctx *ctx = libxl__gc_owner(gc); char *xs_domid, *con_domid; int rc; diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index ba8c9b41ab..d919f91882 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -1389,8 +1389,7 @@ _hidden void libxl__domain_build_state_init(libxl__domain_build_state *s); _hidden void libxl__domain_build_state_dispose(libxl__domain_build_state *s); _hidden int libxl__build_pre(libxl__gc *gc, uint32_t domid, - libxl_domain_config * const d_config, - libxl__domain_build_state *state); + libxl__domain_create_state *dcs); _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); @@ -1960,10 +1959,8 @@ _hidden int libxl__domain_make(libxl__gc *gc, libxl__domain_build_state *state, uint32_t *domid); -_hidden int libxl__domain_build(libxl__gc *gc, - libxl_domain_config *d_config, - uint32_t domid, - libxl__domain_build_state *state); +_hidden int libxl__domain_build(libxl__gc *gc, uint32_t domid, + libxl__domain_create_state *dcs); /* for device model creation */ _hidden const char *libxl__domain_device_model(libxl__gc *gc, @@ -4113,7 +4110,7 @@ typedef struct { libxl__xswait_state xswait; } libxl__stub_dm_spawn_state; -_hidden void libxl__spawn_stub_dm(libxl__egc *egc, libxl__stub_dm_spawn_state*); +_hidden void libxl__spawn_stub_dm(libxl__egc *egc, libxl__domain_create_state *dcs); _hidden char *libxl__stub_dm_name(libxl__gc *gc, const char * guest_name); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |