From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] libxl: create /local/domain//error and make guest-writable Date: Wed, 8 Oct 2014 14:08:28 +0100 Message-ID: <1412773708.24894.6.camel@citrix.com> References: <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.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Xbqz1-0002BJ-Nt for xen-devel@lists.xenproject.org; Wed, 08 Oct 2014 13:08:47 +0000 In-Reply-To: <1412698325-32748-1-git-send-email-dave.scott@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Scott Cc: xen-devel@lists.xenproject.org, ian.jackson@eu.citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Tue, 2014-10-07 at 17:12 +0100, David Scott wrote: > 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) I had no idea this existed! > Signed-off-by: David Scott > --- > docs/misc/xenstore-paths.markdown | 20 ++++++++++++++++++++ What do you think of a single more generic entry e.g. #### ~/error/device/$DEVTYPE/$DEVID/error An error message reported by the virtual device driver associated with ~/device/$DEVTYPE/$DEVID/* (see above) > 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)); Looks to be trivially correct to me. It's a shame to be opening up yet another area where the guest is free to do whatever, but I expect the patch to create each of the specific device paths as we add the device would be somewhat larger. Ian.