mirror of
https://github.com/xen-project/xen.git
synced 2026-10-30 03:00:05 +01:00
libxl: add libxl_set_parameters() function
Add a new libxl function to set hypervisor parameters at runtime similar to boot time parameters via command line. Signed-off-by: Juergen Gross <jgross@suse.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
6d3cc2d266
commit
cf0f4d5373
2 files changed
+23
No files matched your search
@@ -652,6 +652,21 @@ int libxl_send_debug_keys(libxl_ctx *ctx, char *keys)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int libxl_set_parameters(libxl_ctx *ctx, char *params)
|
||||
{
|
||||
int ret;
|
||||
GC_INIT(ctx);
|
||||
|
||||
ret = xc_set_parameters(ctx->xch, params);
|
||||
if (ret < 0) {
|
||||
LOGEV(ERROR, ret, "setting parameters");
|
||||
GC_FREE;
|
||||
return ERROR_FAIL;
|
||||
}
|
||||
GC_FREE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int fd_set_flags(libxl_ctx *ctx, int fd,
|
||||
int fcntlgetop, int fcntlsetop, const char *fl,
|
||||
int flagmask, int set_p)
|
||||
|
||||
@@ -1051,6 +1051,13 @@ void libxl_mac_copy(libxl_ctx *ctx, libxl_mac *dst, const libxl_mac *src);
|
||||
*/
|
||||
#define LIBXL_HAVE_QED 1
|
||||
|
||||
/*
|
||||
* LIBXL_HAVE_SET_PARAMETERS
|
||||
*
|
||||
* If this is defined setting hypervisor parameters is supported.
|
||||
*/
|
||||
#define LIBXL_HAVE_SET_PARAMETERS 1
|
||||
|
||||
typedef char **libxl_string_list;
|
||||
void libxl_string_list_dispose(libxl_string_list *sl);
|
||||
int libxl_string_list_length(const libxl_string_list *sl);
|
||||
@@ -2105,6 +2112,7 @@ int libxl_send_trigger(libxl_ctx *ctx, uint32_t domid,
|
||||
libxl_trigger trigger, uint32_t vcpuid);
|
||||
int libxl_send_sysrq(libxl_ctx *ctx, uint32_t domid, char sysrq);
|
||||
int libxl_send_debug_keys(libxl_ctx *ctx, char *keys);
|
||||
int libxl_set_parameters(libxl_ctx *ctx, char *params);
|
||||
|
||||
typedef struct libxl__xen_console_reader libxl_xen_console_reader;
|
||||
|
||||
|
||||