diff mbox series

[1/3] libxl: create domain 'error' node in xenstore

Message ID 20200226160848.1854-2-pdurrant@amazon.com (mailing list archive)
State New, archived
Headers show
Series PV driver compatibility fixes | expand

Commit Message

Paul Durrant Feb. 26, 2020, 4:08 p.m. UTC
Several PV drivers (both historically and currently [1]) report errors
by writing text into /local/domain/$DOMID/error. This patch creates the
node in libxl and makes it writable by the domain, and also adds some
text into xenstore-paths.pandoc to state what the node is for.

[1] https://xenbits.xen.org/gitweb/?p=pvdrivers/win/xenvif.git;a=blob;f=src/xenvif/frontend.c;hb=HEAD#l459

Signed-off-by: Paul Durrant <pdurrant@amazon.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <george.dunlap@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Julien Grall <julien@xen.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Wei Liu <wl@xen.org>
Cc: Anthony PERARD <anthony.perard@citrix.com>
---
 docs/misc/xenstore-paths.pandoc | 5 +++++
 tools/libxl/libxl_create.c      | 3 +++
 2 files changed, 8 insertions(+)

Comments

Ian Jackson Feb. 26, 2020, 4:25 p.m. UTC | #1
Paul Durrant writes ("[PATCH 1/3] libxl: create domain 'error' node in xenstore"):
> Several PV drivers (both historically and currently [1]) report errors
> by writing text into /local/domain/$DOMID/error. This patch creates the
> node in libxl and makes it writable by the domain, and also adds some
> text into xenstore-paths.pandoc to state what the node is for.

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox series

Patch

diff --git a/docs/misc/xenstore-paths.pandoc b/docs/misc/xenstore-paths.pandoc
index 0a6b36146e..e2ab5da54e 100644
--- a/docs/misc/xenstore-paths.pandoc
+++ b/docs/misc/xenstore-paths.pandoc
@@ -539,6 +539,11 @@  address written in one of these paths to, for example, establish a VNC
 session to the guest (although clearly some level of trust is placed
 in the value supplied by the guest in this case).
 
+#### ~/error [w]
+
+A domain writable path used by some PV drivers to pass error messages
+to the toolstack.
+
 ### Paths private to the toolstack
 
 #### ~/device-model/$DOMID/state [w]
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index ccc9e70990..27627cb199 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -797,6 +797,9 @@  retry_transaction:
     libxl__xs_mknod(gc, t,
                     GCSPRINTF("%s/attr", dom_path),
                     rwperm, ARRAY_SIZE(rwperm));
+    libxl__xs_mknod(gc, t,
+                    GCSPRINTF("%s/error", dom_path),
+                    rwperm, ARRAY_SIZE(rwperm));
 
     if (libxl_defbool_val(info->driver_domain)) {
         /*