lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1242804196.3260.50.camel@localhost.localdomain>
Date:	Wed, 20 May 2009 12:53:16 +0530
From:	Jaswinder Singh Rajput <jaswinder@...nel.org>
To:	"H. Peter Anvin" <hpa@...nel.org>
Cc:	Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...e.hu>,
	Robert Richter <robert.richter@....com>,
	Dave Jones <davej@...hat.com>,
	LKML <linux-kernel@...r.kernel.org>,
	x86 maintainers <x86@...nel.org>
Subject: Re: [PATCH 3/10 -tip] x86: Add cpufeatures for Advanced Power
 Management

On Wed, 2009-05-20 at 12:45 +0530, Jaswinder Singh Rajput wrote:
> On Tue, 2009-05-19 at 09:41 -0700, H. Peter Anvin wrote:
> > Jaswinder Singh Rajput wrote:
> > > 
> > > Peter, Ingo:
> > > Do you think we need to arrange x86_capability in some order, currently
> > > we are using x86_capability numbering in random order.
> > > 
> > 
> > No.
> > 
> 
> I think better I will show with the coding to get the clear picture.
> 
> Currently we are using hardcoded x86_capability as [0], [2], [4], [5].
> 
> Thomas prefer to use constant so may be we can define current system as:
> 
> enum {
> 	CPUID_0000_0001_EDX = 0,	/* 0x00000001 edx */
> 	CPUID_8000_0001_EDX,		/* 0x80000001 edx */
> 	CPUID_8086_0001_EDX,		/* 0x80860001 edx */
> 	CPUID_SOFT_MISC1,		/* Software Misc1 */
> 	CPUID_0000_0001_ECX,		/* 0x00000001 ecx */
> 	CPUID_C000_0001_EDX,		/* 0xC0000001 edx */
> 	CPUID_8000_0001_ECX,		/* 0x80000001 ecx */
> 	CPUID_SOFT_MISC2,		/* Software Misc2 */
> 	CPUID_SOFT_VIRTUAL,		/* Software Virtualization */
> };
> 
> I was suggesting to also sort it out based on address and register like this:
> 
> enum {
> 	/* Hardware CPUIDs */
> 	CPUID_0000_0001_ECX = 0,	/* 0x00000001 ecx */
> 	CPUID_0000_0001_EDX,		/* 0x00000001 edx */
> 	CPUID_8000_0001_ECX,		/* 0x80000001 ecx */
> 	CPUID_8000_0001_EDX,		/* 0x80000001 edx */
> 	CPUID_8086_0001_EDX,		/* 0x80860001 edx */
> 	CPUID_C000_0001_EDX,		/* 0xC0000001 edx */
> 
> 	/* Software/Miscellaneous CPUIDs */
> 	CPUID_SOFT_MISC1,		/* Software Misc1 */
> 	CPUID_SOFT_MISC2,		/* Software Misc2 */
> 	CPUID_SOFT_VIRTUAL,		/* Software Virtualization */

	/* End of CPUIDs */
	NCAPINTS,			/* N 32-bit words worth of info */
};

This will also take care of max x86_capability CPUID limit.

--
JSR

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ