WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [patch 19/20] XEN-paravirt: Add the Xenbus sysfs and vir

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Subject: [Xen-devel] Re: [patch 19/20] XEN-paravirt: Add the Xenbus sysfs and virtual device hotplug driver.
From: Pavel Machek <pavel@xxxxxx>
Date: Mon, 15 Jan 2007 13:18:06 +0000
Cc: Andrew Morton <akpm@xxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
Delivery-date: Thu, 18 Jan 2007 05:34:15 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070113014649.154623814@xxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070113014539.408244126@xxxxxxxx> <20070113014649.154623814@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
Hi!

> This communicates with the machine control software via a registry
> residing in a controlling virtual machine. This allows dynamic
> creation, destruction and modification of virtual device
> configurations (network devices, block devices and CPUS, to name some
> examples).
> 
> Signed-off-by: Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
> Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>
> Signed-off-by: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
> Signed-off-by: Chris Wright <chrisw@xxxxxxxxxxxx>
> ---
>  drivers/xen/Makefile               |    1
>  drivers/xen/xenbus/Makefile        |    7
>  drivers/xen/xenbus/xenbus_client.c |  528 ++++++++++++++++++++
>  drivers/xen/xenbus/xenbus_comms.c  |  222 ++++++++
>  drivers/xen/xenbus/xenbus_comms.h  |   43 +
>  drivers/xen/xenbus/xenbus_probe.c  |  954 
> +++++++++++++++++++++++++++++++++++++
>  drivers/xen/xenbus/xenbus_xs.c     |  828 ++++++++++++++++++++++++++++++++

Hmm, you have word 'xen' three times in this pathname, and then the
file is name 'xs'. Trying to do xen advertising in path names? :-)

> @@ -0,0 +1,565 @@
> +/******************************************************************************
> + * Client-facing interface for the Xenbus driver.  In other words, the
> + * interface between the Xenbus and the device-specific code, be it the
> + * frontend or the backend of that driver.
> + *
> + * Copyright (C) 2005 XenSource Ltd
> + * 
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License version 2
> + * as published by the Free Software Foundation; or, when distributed
> + * separately from the Linux kernel or incorporated into other
> + * software packages, subject to the following license:
> + * 
> + * Permission is hereby granted, free of charge, to any person obtaining a 
> copy
> + * of this source file (the "Software"), to deal in the Software without
> + * restriction, including without limitation the rights to use, copy, modify,
> + * merge, publish, distribute, sublicense, and/or sell copies of the 
> Software,
> + * and to permit persons to whom the Software is furnished to do so, subject 
> to
> + * the following conditions:
> + * 
> + * The above copyright notice and this permission notice shall be included in
> + * all copies or substantial portions of the Software.

So this is dual BSD/GPL?

> +#include <linux/types.h>
> +#include <xen/interface/xen.h>
> +#include <xen/interface/event_channel.h>
> +#include "../../../arch/i386/paravirt-xen/events.h"
> +#include <xen/grant_table.h>
> +#include <xen/xenbus.h>
> +#include <xen/driver_util.h>
> +
> +char *xenbus_strstate(enum xenbus_state state)
> +{
> +     static char *name[] = {
> +             [ XenbusStateUnknown      ] = "Unknown",

Constants are normally XENBUS_STATE_UNKNOWN in linux...

Can we get description of its kernel-user interface in Documentation/
somewhere?


> +#include <asm/io.h>
> +#include <asm/page.h>
> +//#include <asm/maddr.h>
> +#include <asm/pgtable.h>
> +#include <asm/hypervisor.h>
> +#include <xen/xenbus.h>
> +//#include <xen/xen_proc.h>
> +//#include <xen/evtchn.h>
> +#include <xen/features.h>
> +//#include <xen/hvm.h>
> +

Just delete the lines.

> +#ifdef HAVE_XEN_PLATFORM_COMPAT_H
> +#include <xen/platform-compat.h>
> +#endif

Is this really neccessary?

> +     .bus = {
> +             .name     = "xen-backend",
> +             .match    = xenbus_match,
> +             .probe    = xenbus_dev_probe,
> +             .remove   = xenbus_dev_remove,
> +//           .shutdown = xenbus_dev_shutdown,

Delete.

> --- /dev/null
> +++ b/drivers/xen/xenbus/xenbus_xs.c
> @@ -0,0 +1,840 @@
> +/******************************************************************************
> + * xenbus_xs.c
> + *
> + * This is the kernel equivalent of the "xs" library.  We don't need 
> everything
> + * and we use xenbus_comms for communication.

One line explanation what xs is would be nice.

                                                Pavel
-- 
Thanks for all the (sleeping) penguins.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel