* [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable
@ 2014-10-07 16:12 David Scott
2014-10-08 13:08 ` Ian Campbell
0 siblings, 1 reply; 2+ messages in thread
From: David Scott @ 2014-10-07 16:12 UTC (permalink / raw)
To: xen-devel; +Cc: David Scott, ian.jackson, ian.campbell, stefano.stabellini
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@citrix.com>
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable
2014-10-07 16:12 [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable David Scott
@ 2014-10-08 13:08 ` Ian Campbell
0 siblings, 0 replies; 2+ messages in thread
From: Ian Campbell @ 2014-10-08 13:08 UTC (permalink / raw)
To: David Scott; +Cc: xen-devel, ian.jackson, stefano.stabellini
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 <dave.scott@citrix.com>
> ---
> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-10-08 13:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-07 16:12 [PATCH] libxl: create /local/domain/<domid>/error and make guest-writable David Scott
2014-10-08 13:08 ` Ian Campbell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.