[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 05/18] tools/libxl: Add xenstore and console backend domain IDs to config
This changes the event channels set up in the start_info structure of newly built domains to be associated with a domain other than dom0, to support xenstored or xenconsoled running in stub domains. Signed-off-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx> --- tools/libxl/libxl_dom.c | 4 ++-- tools/libxl/libxl_types.idl | 2 ++ tools/libxl/xl_cmdimpl.c | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/libxl/libxl_dom.c b/tools/libxl/libxl_dom.c index a4725fe..e12d687 100644 --- a/tools/libxl/libxl_dom.c +++ b/tools/libxl/libxl_dom.c @@ -104,8 +104,8 @@ int libxl__build_pre(libxl__gc *gc, uint32_t domid, xc_shadow_control(ctx->xch, domid, XEN_DOMCTL_SHADOW_OP_SET_ALLOCATION, NULL, 0, &shadow, 0, NULL); } - state->store_port = xc_evtchn_alloc_unbound(ctx->xch, domid, 0); - state->console_port = xc_evtchn_alloc_unbound(ctx->xch, domid, 0); + state->store_port = xc_evtchn_alloc_unbound(ctx->xch, domid, info->xenstore_dom); + state->console_port = xc_evtchn_alloc_unbound(ctx->xch, domid, info->console_dom); state->vm_generationid_addr = 0; return 0; } diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index 574dec7..013f5c6 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -168,6 +168,8 @@ libxl_domain_build_info = Struct("domain_build_info",[ ("video_memkb", uint32), ("shadow_memkb", uint32), ("disable_migrate", bool), + ("xenstore_dom", uint32), + ("console_dom", uint32), ("cpuid", libxl_cpuid_policy_list), ("type", libxl_domain_type), ("u", KeyedUnion(None, libxl_domain_type, "type", diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8c30de1..bb1bb5b 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -661,6 +661,12 @@ static void parse_config_data(const char *configfile_filename_report, if (!xlu_cfg_get_long (config, "maxvcpus", &l, 0)) b_info->max_vcpus = l; + if (!xlu_cfg_get_long (config, "xenstore_dom", &l, 0)) + b_info->xenstore_dom = l; + + if (!xlu_cfg_get_long (config, "console_dom", &l, 0)) + b_info->console_dom = l; + if (!xlu_cfg_get_long (config, "memory", &l, 0)) { b_info->max_memkb = l * 1024; b_info->target_memkb = b_info->max_memkb; -- 1.7.7.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |