[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] libxl: Call libxl__virtio_devtype.set_default() early enough
commit f68f4723ec06a07c7850c22790b01d888184b2ce Author: Viresh Kumar <viresh.kumar@xxxxxxxxxx> AuthorDate: Tue Jun 13 11:12:24 2023 +0200 Commit: Jan Beulich <jbeulich@xxxxxxxx> CommitDate: Tue Jun 13 11:12:24 2023 +0200 libxl: Call libxl__virtio_devtype.set_default() early enough The _setdefault() function for virtio devices is getting called after libxl__prepare_dtb(), which is late as libxl__prepare_dtb() expects the defaults to be already set by this time. Call libxl__virtio_devtype.set_default() from libxl__domain_config_setdefault(), in a similar way as other devices like disk, etc. Suggested-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> Signed-off-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx> Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- tools/libs/light/libxl_create.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tools/libs/light/libxl_create.c b/tools/libs/light/libxl_create.c index ec8eab02c2..36770af6d4 100644 --- a/tools/libs/light/libxl_create.c +++ b/tools/libs/light/libxl_create.c @@ -1068,7 +1068,7 @@ int libxl__domain_config_setdefault(libxl__gc *gc, uint32_t domid /* for logging, only */) { libxl_ctx *ctx = libxl__gc_owner(gc); - int ret; + int ret, i; bool pod_enabled = false; libxl_domain_create_info *c_info = &d_config->c_info; @@ -1266,6 +1266,15 @@ int libxl__domain_config_setdefault(libxl__gc *gc, goto error_out; } + for (i = 0; i < d_config->num_virtios; i++) { + ret = libxl__virtio_devtype.set_default(gc, domid, + &d_config->virtios[i], false); + if (ret) { + LOGD(ERROR, domid, "Unable to set virtio defaults for device %d", i); + goto error_out; + } + } + ret = 0; error_out: return ret; -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |