From: David Scott Subject: [PATCH] libxl: create /local/domain//error and make guest-writable Date: Tue, 7 Oct 2014 17:12:05 +0100 Message-ID: <1412698325-32748-1-git-send-email-dave.scott@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XbXTN-00033L-J0 for xen-devel@lists.xenproject.org; Tue, 07 Oct 2014 16:18:49 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: David Scott , ian.jackson@eu.citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org 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 --- 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