[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 13/21] libxl: add PVH support to domain save/suspend
And remove the device model "none" support. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> --- Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> Cc: Wei Liu <wei.liu2@xxxxxxxxxx> --- tools/libxl/libxl_dom_save.c | 9 ++++++--- tools/libxl/libxl_dom_suspend.c | 8 +++----- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/tools/libxl/libxl_dom_save.c b/tools/libxl/libxl_dom_save.c index 77fe30e9c0..194bbdbc5d 100644 --- a/tools/libxl/libxl_dom_save.c +++ b/tools/libxl/libxl_dom_save.c @@ -158,6 +158,11 @@ void libxl__domain_suspend_common_switch_qemu_logdirty /* Convenience aliases. */ libxl__logdirty_switch *const lds = &dss->logdirty; + if (dss->type == LIBXL_DOMAIN_TYPE_PVH) { + domain_suspend_switch_qemu_logdirty_done(egc, lds, 0); + return; + } + lds->callback = domain_suspend_switch_qemu_logdirty_done; libxl__domain_common_switch_qemu_logdirty(egc, domid, enable, lds); } @@ -176,9 +181,6 @@ void libxl__domain_common_switch_qemu_logdirty(libxl__egc *egc, case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN: domain_suspend_switch_qemu_xen_logdirty(egc, domid, enable, lds); break; - case LIBXL_DEVICE_MODEL_VERSION_NONE: - lds->callback(egc, lds, 0); - break; default: LOGD(ERROR, domid, "logdirty switch failed" ", no valid device model version found, abandoning suspend"); @@ -363,6 +365,7 @@ void libxl__domain_save(libxl__egc *egc, libxl__domain_save_state *dss) if (rc) goto out; switch (type) { + case LIBXL_DOMAIN_TYPE_PVH: case LIBXL_DOMAIN_TYPE_HVM: { dss->hvm = 1; break; diff --git a/tools/libxl/libxl_dom_suspend.c b/tools/libxl/libxl_dom_suspend.c index 6314a001d1..ca41107412 100644 --- a/tools/libxl/libxl_dom_suspend.c +++ b/tools/libxl/libxl_dom_suspend.c @@ -90,8 +90,6 @@ int libxl__domain_suspend_device_model(libxl__gc *gc, if (ret) unlink(filename); break; - case LIBXL_DEVICE_MODEL_VERSION_NONE: - break; default: return ERROR_INVAL; } @@ -148,14 +146,14 @@ static void domain_suspend_callback_common(libxl__egc *egc, /* Convenience aliases */ const uint32_t domid = dsps->domid; - if (dsps->type == LIBXL_DOMAIN_TYPE_HVM) { + if (dsps->type != LIBXL_DOMAIN_TYPE_PV) { xc_hvm_param_get(CTX->xch, domid, HVM_PARAM_CALLBACK_IRQ, &hvm_pvdrv); xc_hvm_param_get(CTX->xch, domid, HVM_PARAM_ACPI_S_STATE, &hvm_s_state); } if ((hvm_s_state == 0) && (dsps->guest_evtchn.port >= 0)) { LOGD(DEBUG, domid, "issuing %s suspend request via event channel", - dsps->type == LIBXL_DOMAIN_TYPE_HVM ? "PVHVM" : "PV"); + dsps->type != LIBXL_DOMAIN_TYPE_PV ? "PVH/HVM" : "PV"); ret = xenevtchn_notify(CTX->xce, dsps->guest_evtchn.port); if (ret < 0) { LOGD(ERROR, domid, "xenevtchn_notify failed ret=%d", ret); @@ -190,7 +188,7 @@ static void domain_suspend_callback_common(libxl__egc *egc, } LOGD(DEBUG, domid, "issuing %s suspend request via XenBus control node", - dsps->type == LIBXL_DOMAIN_TYPE_HVM ? "PVHVM" : "PV"); + dsps->type != LIBXL_DOMAIN_TYPE_PV ? "PVH/HVM" : "PV"); libxl__domain_pvcontrol_write(gc, XBT_NULL, domid, "suspend"); -- 2.11.0 (Apple Git-81) _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |