mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
libxl: create xenstore nodes for control/feature-XXX flags
The xenstore-paths documentation specifies various control/feature-XXX flags to allow a guest to tell a toolstack about its abilities to respond to values written to control/shutdown. However, because the parent control xenstore key is created read-only to the guest, unless empty nodes for the feature flags are also created reat/write by the toolstack, the guest will not be able to set any flags. This patch adds code to create all specified feature flag nodes at domain creation time. Signed-off-by: Paul Durrant <paul.durrant@citrix.com> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Wei Liu <wei.liu2@citrix.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
This commit is contained in:
1 parent
25131cea72
commit
09a4ef8351
1 file changed
+17
@@ -645,6 +645,23 @@ retry_transaction:
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/control/shutdown", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/control/feature-poweroff", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/control/feature-reboot", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/control/feature-suspend", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
if (info->type == LIBXL_DOMAIN_TYPE_HVM) {
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/control/feature-s3", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/control/feature-s4", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
}
|
||||
libxl__xs_mknod(gc, t,
|
||||
GCSPRINTF("%s/device/suspend/event-channel", dom_path),
|
||||
rwperm, ARRAY_SIZE(rwperm));
|
||||
|
||||