public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs
@ 2006-02-21 14:36 Mike D. Day
  2006-02-21 15:21 ` Arjan van de Ven
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mike D. Day @ 2006-02-21 14:36 UTC (permalink / raw)
  To: xen-devel; +Cc: lkml, Greg KH, Dave Hansen

This series of patches is a module that exports Xen Hypervisor attributes
to sysfs. The directory structure created is: 

+---sys
	+---hypervisor
		+---xen
			+---version
			+---major
			+---minor
			+---extra
		+---compilation
			+---by
			+---date
			+---compiler 
		+---properties
			+---changeset
			+---capabilities
			+---virt_start
			+---translated_pm
			+---writable_dt
			+---writable_pt

The xen_sysfs module has a tri-state Kconfig so it can be built-in or
loaded as a module.

The module is in three patches: 

Patch 1 (this patch) is a Xen file that is used by all OS kernels that run
on Xen. This includes linux, NetBSD, FreeBSD, Solaris, and others. Patch 1
adds #defined constants so that linux users of this file can avoid typedefs. 

Patch 2 (follows) contains the Kconfig changes necessary to add this module
to the kernel build. 

Patch 3 (follows) contains the source for the xen_sysfs module itself. 

# HG changeset patch
# User mdday@dual.silverwood.home
# Node ID d296aaf07bcb4141c6dc2a1bfa7d183f919c2167
# Parent  a05e56904e7e5e86aae5a2e022621caaf7b3a6f5
define constants for array sizes. Allows linux users of this file 
to avoid #typedefs. Existing typedefs work as before. 

signed-off-by: Mike D. Day <ncmike@us.ibm.com>

diff -r a05e56904e7e -r d296aaf07bcb xen/include/public/version.h
--- a/xen/include/public/version.h	Mon Feb 20 23:01:50 2006 +0000
+++ b/xen/include/public/version.h	Tue Feb 21 08:11:03 2006 -0500
@@ -1,8 +1,8 @@
/******************************************************************************
 * version.h
- * 
+ *
 * Xen version, type, and compile information.
- * 
+ *
 * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
 * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
 */
@@ -17,6 +17,7 @@

/* arg == xen_extraversion_t. */
#define XENVER_extraversion 1
+#define XENVER_EXTRAVERSION_LEN 16
typedef char xen_extraversion_t[16];

/* arg == xen_compile_info_t. */
@@ -29,9 +30,11 @@ typedef struct xen_compile_info {
} xen_compile_info_t;

#define XENVER_capabilities 3
+#define XENVER_CAPABILITIES_INFO_LEN 1024
typedef char xen_capabilities_info_t[1024];

#define XENVER_changeset 4
+#define XENVER_CSET_INFO_LEN 64
typedef char xen_changeset_info_t[64];

#define XENVER_platform_parameters 5



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs
  2006-02-21 14:36 [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs Mike D. Day
@ 2006-02-21 15:21 ` Arjan van de Ven
  2006-02-21 17:37 ` [Xen-devel] " Keir Fraser
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Arjan van de Ven @ 2006-02-21 15:21 UTC (permalink / raw)
  To: Mike D. Day; +Cc: xen-devel, lkml, Greg KH, Dave Hansen


> 		+---compilation
> 			+---by
> 			+---date
> 			+---compiler 


not sure this is really useful info ;)


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xen-devel] [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs
  2006-02-21 14:36 [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs Mike D. Day
  2006-02-21 15:21 ` Arjan van de Ven
@ 2006-02-21 17:37 ` Keir Fraser
  2006-02-21 17:42 ` Christoph Hellwig
  2006-02-21 17:56 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Keir Fraser @ 2006-02-21 17:37 UTC (permalink / raw)
  To: Mike D. Day; +Cc: Dave Hansen, xen-devel, lkml, Greg KH


On 21 Feb 2006, at 14:36, Mike D. Day wrote:

> # HG changeset patch
> # User mdday@dual.silverwood.home
> # Node ID d296aaf07bcb4141c6dc2a1bfa7d183f919c2167
> # Parent  a05e56904e7e5e86aae5a2e022621caaf7b3a6f5
> define constants for array sizes. Allows linux users of this file to 
> avoid #typedefs. Existing typedefs work as before.
> signed-off-by: Mike D. Day <ncmike@us.ibm.com>

I took this patch, but renamed the xxx_LEN macros to more closely match 
the typedef names.

  -- Keir


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs
  2006-02-21 14:36 [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs Mike D. Day
  2006-02-21 15:21 ` Arjan van de Ven
  2006-02-21 17:37 ` [Xen-devel] " Keir Fraser
@ 2006-02-21 17:42 ` Christoph Hellwig
  2006-02-21 17:56 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2006-02-21 17:42 UTC (permalink / raw)
  To: Mike D. Day; +Cc: xen-devel, lkml, Greg KH, Dave Hansen

> Patch 1 (this patch) is a Xen file that is used by all OS kernels that run
> on Xen. This includes linux, NetBSD, FreeBSD, Solaris, and others. Patch 1
> adds #defined constants so that linux users of this file can avoid 
> typedefs. 

No way we're gonna put in that crap.  If you want linux to support Xen
add a set of sane linux-style headers for linux use.  What you use 
in the hypevisor or for other operating systems doesn't matter at all.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs
  2006-02-21 14:36 [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs Mike D. Day
                   ` (2 preceding siblings ...)
  2006-02-21 17:42 ` Christoph Hellwig
@ 2006-02-21 17:56 ` Greg KH
  3 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2006-02-21 17:56 UTC (permalink / raw)
  To: Mike D. Day; +Cc: xen-devel, lkml, Dave Hansen

On Tue, Feb 21, 2006 at 09:36:35AM -0500, Mike D. Day wrote:
> 		+---properties
> 			+---changeset

Just curious, but what is a "changeset"?

> The xen_sysfs module has a tri-state Kconfig so it can be built-in or
> loaded as a module.
> 
> The module is in three patches: 

This patch has it's leading spaces eaten by your email client and can
not be applied :(

> diff -r a05e56904e7e -r d296aaf07bcb xen/include/public/version.h
> --- a/xen/include/public/version.h	Mon Feb 20 23:01:50 2006 +0000
> +++ b/xen/include/public/version.h	Tue Feb 21 08:11:03 2006 -0500
> @@ -1,8 +1,8 @@
> /******************************************************************************
> * version.h
> - * 
> + *
> * Xen version, type, and compile information.
> - * 
> + *
> * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
> * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
> */
> @@ -17,6 +17,7 @@
> 
> /* arg == xen_extraversion_t. */
> #define XENVER_extraversion 1
> +#define XENVER_EXTRAVERSION_LEN 16
> typedef char xen_extraversion_t[16];

Shouldn't the typedef use the #define in it, so that if you change it,
the array size is properly changed too?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-02-21 18:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-21 14:36 [ PATCH 2.6.16-rc3-xen 1/3] sysfs: export Xen hypervisor attributes to sysfs Mike D. Day
2006-02-21 15:21 ` Arjan van de Ven
2006-02-21 17:37 ` [Xen-devel] " Keir Fraser
2006-02-21 17:42 ` Christoph Hellwig
2006-02-21 17:56 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox