From a77eb86f44e52c5aea7f0ba7023600c043a9cdcd Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Mon, 14 Oct 2013 10:25:39 +0200 Subject: libxl,xl: add max_event_channels option to xl configuration file Add the 'max_event_channels' option to the xl configuration file to limit the number of event channels that domain may use. Plumb this option through to libxl via a new libxl_build_info field and call xc_domain_set_max_evtchn() in the post build stage of domain creation. A new LIBXL_HAVE_BUILDINFO_EVENT_CHANNELS #define indicates that this new field is available. The default value of 1023 limits the domain to using the minimum amount of global mapping pages and at most 5 xenheap pages. Signed-off-by: David Vrabel Acked-by: Ian Campbell Acked-by: Keir Fraser --- tools/libxl/xl_cmdimpl.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tools/libxl/xl_cmdimpl.c') diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 14bb385f1a..a8261be048 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -845,6 +845,9 @@ static void parse_config_data(const char *config_source, if (!xlu_cfg_get_long (config, "videoram", &l, 0)) b_info->video_memkb = l * 1024; + if (!xlu_cfg_get_long(config, "max_event_channels", &l, 0)) + b_info->event_channels = l; + switch(b_info->type) { case LIBXL_DOMAIN_TYPE_HVM: if (!xlu_cfg_get_string (config, "kernel", &buf, 0)) -- cgit v1.2.3