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.