[xen staging] libxl: create control/sysrq xenstore node

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen staging] libxl: create control/sysrq xenstore node

patchbot
commit 30a970906038a4d360e1f7ee29ba80ef832dd78b
Author:     Vitaly Kuznetsov <[hidden email]>
AuthorDate: Tue Sep 4 13:39:29 2018 +0200
Commit:     Wei Liu <[hidden email]>
CommitDate: Wed Sep 5 11:21:25 2018 +0100

    libxl: create control/sysrq xenstore node
   
    'xl sysrq' command doesn't work with modern Linux guests with the following
    message in guest's log:
   
     xen:manage: sysrq_handler: Error -13 writing sysrq in control/sysrq
   
    xenstore trace confirms:
   
     IN 0x24bd9a0 20180904 04:36:32 WRITE (control/sysrq )
     OUT 0x24bd9a0 20180904 04:36:32 ERROR (EACCES )
   
    The problem seems to be in the fact that we don't pre-create control/sysrq
    xenstore node and libxl_send_sysrq() doing libxl__xs_printf() creates it as
    read-only. As we want to allow guests to clean 'control/sysrq' after the
    requested action is performed, we need to make this node writable.
   
    Signed-off-by: Vitaly Kuznetsov <[hidden email]>
    Acked-by: Wei Liu <[hidden email]>
---
 tools/libxl/libxl_create.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 60676304e9..dcfde7787e 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -696,6 +696,9 @@ retry_transaction:
                         rwperm, ARRAY_SIZE(rwperm));
     }
     libxl__xs_mknod(gc, t,
+                    GCSPRINTF("%s/control/sysrq", 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,
--
generated by git-patchbot for /home/xen/git/xen.git#staging

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog