case LIBXL_DEVICE_MODEL_VERSION_QEMU_XEN:
domain_suspend_switch_qemu_xen_logdirty(domid, enable, shs);
break;
+ case LIBXL_DEVICE_MODEL_VERSION_NONE:
+ libxl__xc_domain_saverestore_async_callback_done(egc, shs, 0);
+ break;
default:
LOG(ERROR,"logdirty switch failed"
", no valid device model version found, abandoning suspend");
break;
case REC_TYPE_EMULATOR_XENSTORE_DATA:
+ if (dcs->guest_config->b_info.device_model_version ==
+ LIBXL_DEVICE_MODEL_VERSION_NONE) {
+ rc = ERROR_FAIL;
+ LOG(ERROR,
+ "Received a xenstore emulator record when none was expected");
+ goto err;
+ }
+
if (rec->hdr.length < sizeof(libxl__sr_emulator_hdr)) {
rc = ERROR_FAIL;
LOG(ERROR,
break;
case REC_TYPE_EMULATOR_CONTEXT:
+ if (dcs->guest_config->b_info.device_model_version ==
+ LIBXL_DEVICE_MODEL_VERSION_NONE) {
+ rc = ERROR_FAIL;
+ LOG(ERROR,
+ "Received an emulator context record when none was expected");
+ goto err;
+ }
+
write_emulator_blob(egc, stream, rec);
break;
stream->emu_sub_hdr.id = EMULATOR_QEMU_UPSTREAM;
break;
+ case LIBXL_DEVICE_MODEL_VERSION_NONE:
+ break;
+
default:
rc = ERROR_FAIL;
LOG(ERROR, "Unknown emulator for HVM domain");
char *buf = NULL;
uint32_t len = 0;
+ if (libxl__device_model_version_running(gc, dss->domid) ==
+ LIBXL_DEVICE_MODEL_VERSION_NONE) {
+ emulator_xenstore_record_done(egc, stream);
+ return;
+ }
+
rc = libxl__save_emulator_xenstore_data(dss, &buf, &len);
if (rc)
goto err;
libxl__stream_write_state *stream)
{
libxl__domain_suspend_state *dss = stream->dss;
+ STATE_AO_GC(stream->ao);
if (dss->type == LIBXL_DOMAIN_TYPE_HVM)
write_emulator_context_record(egc, stream);
assert(dss->type == LIBXL_DOMAIN_TYPE_HVM);
+ if (libxl__device_model_version_running(gc, dss->domid) ==
+ LIBXL_DEVICE_MODEL_VERSION_NONE) {
+ emulator_context_record_done(egc, stream);
+ return;
+ }
+
/* Convenience aliases */
const char *const filename = dss->dm_savefile;