aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/xen/xen-common.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/xen/xen-common.c b/hw/xen/xen-common.c
index 454777c587..6ec14c73ca 100644
--- a/hw/xen/xen-common.c
+++ b/hw/xen/xen-common.c
@@ -101,7 +101,12 @@ static void xenstore_record_dm_state(struct xs_handle *xs, const char *state)
}
snprintf(path, sizeof (path), "device-model/%u/state", xen_domid);
- if (!xs_write(xs, XBT_NULL, path, state, strlen(state))) {
+ /*
+ * This call may fail when running restricted so don't make it fatal in
+ * that case. Toolstacks should instead use QMP to listen for state changes.
+ */
+ if (!xs_write(xs, XBT_NULL, path, state, strlen(state)) &&
+ !xen_domid_restrict) {
error_report("error recording dm state");
exit(1);
}