libxl: create domain 'error' node in xenstore
authorPaul Durrant <pdurrant@amazon.com>
Thu, 19 Mar 2020 11:47:47 +0000 (11:47 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Thu, 19 Mar 2020 15:56:00 +0000 (15:56 +0000)
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 <paul@xen.org>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
docs/misc/xenstore-paths.pandoc
tools/libxl/libxl_create.c

index 0a6b36146e9ef49bff25ceaf3c1057f626e65e9e..e2ab5da54e7f973cb3c6e9f62e767d8562c4a8eb 100644 (file)
@@ -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]
index 772344c64883e05660bc5c71213148a7415bd9e8..e18aad43b556a43fee88d22ecac3ba64661b62e6 100644 (file)
@@ -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)) {
         /*