[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable



Frontends write error information to these paths which is currently
blocked with an EACCES. Typical errors from a Linux 3.x look like:

$ sudo xenstore-ls /local/domain/11/error -p
device = ""  . . . . . . . . . . . . . . . . . . . . . . . .  (n11)
 vbd = ""  . . . . . . . . . . . . . . . . . . . . . . . . .  (n11)
  5632 = ""  . . . . . . . . . . . . . . . . . . . . . . . .  (n11)
   error = "19 xenbus_dev_probe on device/vbd/5632"  . . . .  (n11)

Signed-off-by: David Scott <dave.scott@xxxxxxxxxx>
---
 docs/misc/xenstore-paths.markdown |   20 ++++++++++++++++++++
 tools/libxl/libxl_create.c        |    3 +++
 2 files changed, 23 insertions(+)

diff --git a/docs/misc/xenstore-paths.markdown 
b/docs/misc/xenstore-paths.markdown
index ea67536..bef5a0c 100644
--- a/docs/misc/xenstore-paths.markdown
+++ b/docs/misc/xenstore-paths.markdown
@@ -217,21 +217,37 @@ for the first PV console.
 A virtual block device frontend. Described by
 [xen/include/public/io/blkif.h][BLKIF]
 
+#### ~/error/device/vbd/$DEVID/error = STRING []
+
+An error message reported by the virtual block device frontend driver.
+
 #### ~/device/vfb/$DEVID/* []
 
 A virtual framebuffer frontend. Described by
 [xen/include/public/io/fbif.h][FBIF]
 
+#### ~/error/device/vfb/$DEVID/error = STRING []
+
+An error message reported by the virtual framebuffer frontend driver.
+
 #### ~/device/vkbd/$DEVID/* []
 
 A virtual keyboard device frontend. Described by
 [xen/include/public/io/kbdif.h][KBDIF]
 
+#### ~/error/device/vkbd/$DEVID/error = STRING []
+
+An error message reported by the virtual keyboard frontend driver.
+
 #### ~/device/vif/$DEVID/* []
 
 A virtual network device frontend. Described by
 [xen/include/public/io/netif.h][NETIF]
 
+#### ~/error/device/vif/$DEVID/error = STRING []
+
+An error message reported by the virtual network device frontend driver.
+
 #### ~/console/* []
 
 The primary PV console device. Described in [console.txt](console.txt)
@@ -240,6 +256,10 @@ The primary PV console device. Described in 
[console.txt](console.txt)
 
 A secondary PV console device. Described in [console.txt](console.txt)
 
+#### ~/error/device/console/$DEVID/error = STRING []
+
+An error message reported by the secondary console device frontend driver.
+
 #### ~/device/serial/$DEVID/* [HVM]
 
 An emulated serial device. Described in [console.txt](console.txt)
diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index 8b82584..af56896 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -600,6 +600,9 @@ retry_transaction:
     libxl__xs_mkdir(gc, t,
                     libxl__sprintf(gc, "%s/data", dom_path),
                     rwperm, ARRAY_SIZE(rwperm));
+    libxl__xs_mkdir(gc, t,
+                    libxl__sprintf(gc, "%s/error", dom_path),
+                    rwperm, ARRAY_SIZE(rwperm));
 
     if (libxl_defbool_val(info->driver_domain)) {
         /*
-- 
1.7.10.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.