Re: [Xen-devel] [PATCH 3/4] xen: Add xenbusd device driver

From: Ian Campbell
Date: Thu Dec 08 2011 - 03:24:51 EST


On Wed, 2011-12-07 at 21:13 +0000, Bastian Blank wrote:
> Access for xenstored to the event channel and pre-allocated ring is
> managed via xenfs. This adds its own device driver featuring mmap for
> the ring and an ioctl for the event channel.
>
> Signed-off-by: Bastian Blank <waldi@xxxxxxxxxx>
> ---
> drivers/xen/xenbus/Makefile | 1 +
> drivers/xen/xenbus/xenbus_dev_backend.c | 79 +++++++++++++++++++++++++++++++
> include/xen/xenbus_dev.h | 41 ++++++++++++++++
> 3 files changed, 121 insertions(+), 0 deletions(-)
> create mode 100644 drivers/xen/xenbus/xenbus_dev_backend.c
> create mode 100644 include/xen/xenbus_dev.h
>
> diff --git a/drivers/xen/xenbus/Makefile b/drivers/xen/xenbus/Makefile
> index a2ea363..31e2e90 100644
> --- a/drivers/xen/xenbus/Makefile
> +++ b/drivers/xen/xenbus/Makefile
> @@ -10,4 +10,5 @@ xenbus-objs += xenbus_probe.o
> xenbus-be-objs-$(CONFIG_XEN_BACKEND) += xenbus_probe_backend.o
> xenbus-objs += $(xenbus-be-objs-y)
>
> +obj-$(CONFIG_XEN_BACKEND) += xenbus_dev_backend.o

In principal this could be its own module which does not depend on any
of the backend stuff but I think this is fine for now.

> [...]

> +static int __init xenbusd_init(void)
> +{
> + int err;
> +
> + if (!xen_initial_domain())
> + return -ENODEV;
> +
> + err = misc_register(&xenbusd_dev);
> + if (err)
> + printk(KERN_ERR "Could not register xenbus device\n");

"Could not register xenbus backend device" to distinguish from the f.e.
failure message, you could also add "frontend" there I suppose. Other
than that:

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/