|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] libxl: create control/sysrq xenstore node
Also CC Linux maintainers.
On Tue, Sep 04, 2018 at 07:27:31PM +0200, Vitaly Kuznetsov wrote:
> Wei Liu <wei.liu2@xxxxxxxxxx> writes:
>
> > On Tue, Sep 04, 2018 at 01:39:29PM +0200, Vitaly Kuznetsov wrote:
> >> '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 <vkuznets@xxxxxxxxxx>
> >
> > Hmm... this node isn't documented.
> >
>
> But libxl already writes it, see libxl_send_sysrq().
I think your patch is fine.
What I wanted to do is to document this node. :p
>
> > Can you point me to the code in Linux?
> >
>
> Sure,
>
> drivers/xen/manage.c:
Alright, it appears DomU only expects a single character to be written.
I have written the following diff, do you think it is sensible? I
believe this is Linux only, but I have CC Roger for correction.
diff --git a/docs/misc/xenstore-paths.markdown
b/docs/misc/xenstore-paths.markdown
index 60c8b3fbe5..33d281915c 100644
--- a/docs/misc/xenstore-paths.markdown
+++ b/docs/misc/xenstore-paths.markdown
@@ -410,6 +410,14 @@ by udev ("0") or will be run by the toolstack directly
("1").
### Platform Feature and Control Paths
+#### ~/control/sysrq = (""|COMMAND) [w]
+
+This is the PV SysRq control node. A toolstack can write a single character
+representing a magic SysRq key understood by the Linux kernel. The guest
+acknowledges a request by writing the empty string back to the command node.
+
+This protocol is Linux only.
+
#### ~/control/shutdown = (""|COMMAND) [w]
This is the PV shutdown control node. A toolstack can write various
Wei.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |