libxl: create xenstore nodes for control/feature-XXX flags
PATCH 1/1 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.
--- tools/libxl/libxl_create.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
tools/libxl/libxl_create.c +17 -0
@@ -646,6 +646,23 @@ retry_transaction: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)); libxl__xs_mknod(gc, t,
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 7 lines · Paul Durrant
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.
Quoted 6 lines
This patch adds code to create all specified feature flag nodes at domain creation time.
Signed-off-by Paul Durrant <[email protected]>Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>
This is in accordance with docs/mis/xenstore-paths.markdown.
Quoted 35 lines
--- tools/libxl/libxl_create.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)tools/libxl/libxl_create.c +17
-0@@ -646,6 +646,23 @@ retry_transaction: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)); libxl__xs_mknod(gc, t,Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 11 lines · Wei Liu
Quoted 10 lines · Paul Durrant
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.
Quoted 7 lines
Quoted 3 lines
Signed-off-by Paul Durrant <[email protected]>Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>This is in accordance with docs/mis/xenstore-paths.markdown.
Acked-by Wei Liu <[email protected]>
Pushed.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel