From: Roger Pau Monne Date: Tue, 9 Jan 2018 14:45:25 +0000 (+0000) Subject: libxl: add PVH support to vpcu hotplug, domain destruction/pause and domain configuration X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=dfcd6be8220f0509e12db4fae77cac046fb25aa9;p=people%2Fiwj%2Fxen.git libxl: add PVH support to vpcu hotplug, domain destruction/pause and domain configuration And remove support for device model "none". Signed-off-by: Roger Pau Monné Acked-by: Ian Jackson Ported over spliting of libxl.c into libxl_domain.c --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index 526eb70bf4..0fb89042ee 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -1011,14 +1011,11 @@ int libxl_domain_unpause(libxl_ctx *ctx, uint32_t domid) } if (type == LIBXL_DOMAIN_TYPE_HVM) { - if (libxl__device_model_version_running(gc, domid) != - LIBXL_DEVICE_MODEL_VERSION_NONE) { - rc = libxl__domain_resume_device_model(gc, domid); - if (rc < 0) { - LOG(ERROR, "failed to unpause device model for domain %u:%d", - domid, rc); - goto out; - } + rc = libxl__domain_resume_device_model(gc, domid); + if (rc < 0) { + LOG(ERROR, "failed to unpause device model for domain %u:%d", + domid, rc); + goto out; } } ret = xc_domain_unpause(ctx->xch, domid); @@ -1584,6 +1581,7 @@ void libxl__destroy_domid(libxl__egc *egc, libxl__destroy_domid_state *dis) break; } /* fall through */ + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_PV: dm_present = libxl__dm_active(gc, domid); break; @@ -5149,7 +5147,6 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) case LIBXL_DOMAIN_TYPE_HVM: switch (libxl__device_model_version_running(gc, domid)) { case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: - case LIBXL_DEVICE_MODEL_VERSION_NONE: break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: rc = libxl__set_vcpuonline_qmp(gc, domid, cpumap, &info); @@ -5158,6 +5155,7 @@ int libxl_set_vcpuonline(libxl_ctx *ctx, uint32_t domid, libxl_bitmap *cpumap) rc = ERROR_INVAL; } break; + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_PV: break; default: @@ -6796,7 +6794,6 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, max_vcpus, map); break; case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN_TRADITIONAL: - case LIBXL_DEVICE_MODEL_VERSION_NONE: rc = libxl__update_avail_vcpus_xenstore(gc, domid, max_vcpus, map); break; @@ -6804,6 +6801,7 @@ int libxl_retrieve_domain_configuration(libxl_ctx *ctx, uint32_t domid, abort(); } break; + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_PV: rc = libxl__update_avail_vcpus_xenstore(gc, domid, max_vcpus, map);