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

Re: [Xen-devel] [PATCH v3 03/28] xen/public: Export cpu featureset information in the public API



On Tue, Mar 15, 2016 at 03:34:59PM +0000, Andrew Cooper wrote:
> For the featureset to be a useful object, it needs a stable interpretation, a
> property which is missing from the current hw_caps interface.
> 
> Additionly, introduce TSC_ADJUST, FDP_EXCP_ONLY, SHA, PREFETCHWT1, ITSC, EFRO
> and CLZERO which will be used by later changes.
> 
> To maintain compilation, FSCAPINTS is currently hardcoded at 9.  Future
> changes will change this to being dynamically generated.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Tim Deegan <tim@xxxxxxx>
> 
> v3:
>  * Allow the constants to be in a namespace of the includers choosing.
>  * Add FDP_EXCP_ONLY
> 
> v2:
>  * Rebase over upstream changes
>  * Collect all feature introductions from later in the series
>  * Restrict API to Xen and toolstack
> ---
>  xen/include/asm-x86/cpufeature.h            | 152 ++----------------
>  xen/include/asm-x86/cpufeatureset.h         |  22 +++
>  xen/include/public/arch-x86/cpufeatureset.h | 240 
> ++++++++++++++++++++++++++++
>  3 files changed, 275 insertions(+), 139 deletions(-)
>  create mode 100644 xen/include/asm-x86/cpufeatureset.h
>  create mode 100644 xen/include/public/arch-x86/cpufeatureset.h


.snip..> 
> diff --git a/xen/include/asm-x86/cpufeatureset.h 
> b/xen/include/asm-x86/cpufeatureset.h
> new file mode 100644
> index 0000000..09c58ef
> --- /dev/null
> +++ b/xen/include/asm-x86/cpufeatureset.h
> @@ -0,0 +1,22 @@
> +#ifndef __XEN_X86_CPUFEATURESET_H__
> +#define __XEN_X86_CPUFEATURESET_H__
> +
> +#ifndef __ASSEMBLY__
> +
> +#define XEN_CPUFEATURE(name, value) X86_FEATURE_##name = value,
> +enum {
> +#include <public/arch-x86/cpufeatureset.h>
> +#undef XEN_CPUFEATURE
> +};
> +
> +#define XEN_CPUFEATURE(name, value) asm (".equ X86_FEATURE_" #name ", " 
> #value);
> +#include <public/arch-x86/cpufeatureset.h>
> +
> +#else /* !__ASSEMBLY__ */
> +
> +#define XEN_CPUFEATURE(name, value) .equ X86_FEATURE_##name, value
> +#include <public/arch-x86/cpufeatureset.h>
> +
> +#endif /* __ASSEMBLY__ */
> +
> +#endif /* !__XEN_X86_CPUFEATURESET_H__ */

You forgot the local file block.

..snip..


> +
> +/* Intel-defined CPU features, CPUID level 0x00000001.ecx, word 1 */

This is quite the redefinition of the x86_capability[] array.

As in if folks look at this from Linux and Xen there is quite
a change. Could you address why we can't use the existing placement
of these bits?



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.