[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 3/8] tools: handle CQM resource when creating/destroying guests
From: Dongxiao Xu <dongxiao.xu@xxxxxxxxx> If a guest is created with parameter "pqos_cqm" set to 1, an RMID will be allocated to the guest. This RMID will be relinquished when guest is destroyed. Signed-off-by: Jiongxi Li <jiongxi.li@xxxxxxxxx> Signed-off-by: Dongxiao Xu <dongxiao.xu@xxxxxxxxx> --- tools/libxl/libxl_create.c | 3 +++ tools/libxl/libxl_types.idl | 1 + tools/libxl/xl_cmdimpl.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c index 5e9cdcc..454c69d 100644 --- a/tools/libxl/libxl_create.c +++ b/tools/libxl/libxl_create.c @@ -40,6 +40,8 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc, libxl_defbool_setdefault(&c_info->run_hotplug_scripts, true); + libxl_defbool_setdefault(&c_info->pqos_cqm, false); + return 0; } @@ -454,6 +456,7 @@ int libxl__domain_make(libxl__gc *gc, libxl_domain_create_info *info, } flags |= XEN_DOMCTL_CDF_hap; } + flags |= libxl_defbool_val(info->pqos_cqm) ? XEN_DOMCTL_CDF_pqos_cqm : 0; *domid = -1; /* Ultimately, handle is an array of 16 uint8_t, same as uuid */ diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl index de5bac3..22688d8 100644 --- a/tools/libxl/libxl_types.idl +++ b/tools/libxl/libxl_types.idl @@ -275,6 +275,7 @@ libxl_domain_create_info = Struct("domain_create_info",[ ("poolid", uint32), ("run_hotplug_scripts",libxl_defbool), ("pvh", libxl_defbool), + ("pqos_cqm", libxl_defbool), ], dir=DIR_IN) libxl_domain_restore_params = Struct("domain_restore_params", [ diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c index 8690ec7..84a604f 100644 --- a/tools/libxl/xl_cmdimpl.c +++ b/tools/libxl/xl_cmdimpl.c @@ -670,6 +670,8 @@ static void parse_config_data(const char *config_source, exit(1); } + xlu_cfg_get_defbool(config, "pqos_cqm", &c_info->pqos_cqm, 0); + libxl_domain_build_info_init_type(b_info, c_info->type); if (blkdev_start) b_info->blkdev_start = strdup(blkdev_start); -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |