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: [RFC PATCH 28/35] add support for Xen feature queries

To: Chris Wright <chrisw@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: [RFC PATCH 28/35] add support for Xen feature queries
From: Pavel Machek <pavel@xxxxxx>
Date: Fri, 12 May 2006 21:56:45 +0000
Cc: virtualization@xxxxxxxxxxxxxx, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>
Delivery-date: Mon, 15 May 2006 00:31:33 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060509085158.933866000@xxxxxxxxxxxx>
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: <20060509084945.373541000@xxxxxxxxxxxx> <20060509085158.933866000@xxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
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.

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

<Prev in Thread] Current Thread [Next in Thread>