Re: [RFC PATCH 28/35] add support for Xen feature queries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> Add support for parsing and interpreting hypervisor feature
> flags. These allow the kernel to determine what features are provided
> by the underlying hypervisor. For example, whether page tables need to
> be write protected explicitly by the kernel, and whether the kernel
> (appears to) run in ring 0 rather than ring 1. This information allows
> the kernel to improve performance by avoiding unnecessary actions.


> --- /dev/null
> +++ linus-2.6/include/xen/features.h
> @@ -0,0 +1,20 @@
> +/******************************************************************************
> + * features.h
> + *
> + * Query the features reported by Xen.
> + *
> + * Copyright (c) 2006, Ian Campbell
> + */
> +
> +#ifndef __ASM_XEN_FEATURES_H__
> +#define __ASM_XEN_FEATURES_H__
> +
> +#include <xen/interface/version.h>
> +
> +extern void setup_xen_features(void);
> +
> +extern u8 xen_features[XENFEAT_NR_SUBMAPS * 32];

32 bytes per submap? Why not use __test_bit & friends and make the
bitmap compact?

> +#define xen_feature(flag)	(xen_features[flag])

Perhaps this kind of indirection is not neccessary?

> --- /dev/null
> +++ linus-2.6/drivers/xen/core/features.c
> @@ -0,0 +1,29 @@
> +/******************************************************************************
> + * features.c
> + *
> + * Xen feature flags.
> + *
> + * Copyright (c) 2006, Ian Campbell, XenSource Inc.

GPL?
						Pavel
-- 
Thanks for all the (sleeping) penguins.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux