2005-11-30 21:13:22

by Dugger, Donald D

[permalink] [raw]
Subject: [PATCH] Add VT flag to cpuinfo

Andrew-

Attached is a trivial patch to 2.6 that will add `vt' to the flags field
of `/proc/cpuinfo' for CPUs that have Intel's virtualization technology.

Signed-off-by: Donald D. Dugger <[email protected]>

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
[email protected]
Ph: (303)440-1368

diff -Naur linux-2.6.14/arch/i386/kernel/cpu/proc.c linux-2.6.14-ddd/arch/i386/kernel/cpu/proc.c
--- linux-2.6.14/arch/i386/kernel/cpu/proc.c 2005-10-27 18:02:08.000000000 -0600
+++ linux-2.6.14-ddd/arch/i386/kernel/cpu/proc.c 2005-11-14 14:22:52.000000000 -0700
@@ -44,7 +44,7 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

/* Intel-defined (#2) */
- "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est",
+ "pni", NULL, NULL, "monitor", "ds_cpl", "vt", NULL, "est",
"tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
diff -Naur linux-2.6.14/arch/x86_64/kernel/setup.c linux-2.6.14-ddd/arch/x86_64/kernel/setup.c
--- linux-2.6.14/arch/x86_64/kernel/setup.c 2005-10-27 18:02:08.000000000 -0600
+++ linux-2.6.14-ddd/arch/x86_64/kernel/setup.c 2005-11-11 14:47:59.000000000 -0700
@@ -1213,7 +1213,7 @@
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,

/* Intel-defined (#2) */
- "pni", NULL, NULL, "monitor", "ds_cpl", NULL, NULL, "est",
+ "pni", NULL, NULL, "monitor", "ds_cpl", "vt", NULL, "est",
"tm2", NULL, "cid", NULL, NULL, "cx16", "xtpr", NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,


2005-11-30 21:24:24

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] Add VT flag to cpuinfo

[email protected] (Donald D Dugger) writes:

> Andrew-
>
> Attached is a trivial patch to 2.6 that will add `vt' to the flags field
> of `/proc/cpuinfo' for CPUs that have Intel's virtualization technology.

The x86-64 tree already has "vmx" for it. What is the correct
name?

-Andi

2005-11-30 23:34:33

by Dugger, Donald D

[permalink] [raw]
Subject: RE: [PATCH] Add VT flag to cpuinfo

Andi-

Good guess. We discuessed it and decided that `vmx' was the best
term so I'll rework the patch to use that name.

BTW, I don't see any reference to `vmx' in the 2.6.14 tree, is
this a change you recently made to your tree?

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
[email protected]
Ph: (303)440-1368

>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Andi Kleen
>Sent: Wednesday, November 30, 2005 6:53 PM
>To: Dugger, Donald D
>Cc: [email protected]; Shah, Rajesh; [email protected]
>Subject: Re: [PATCH] Add VT flag to cpuinfo
>
>[email protected] (Donald D Dugger) writes:
>
>> Andrew-
>>
>> Attached is a trivial patch to 2.6 that will add `vt' to the
>flags field
>> of `/proc/cpuinfo' for CPUs that have Intel's virtualization
>technology.
>
>The x86-64 tree already has "vmx" for it. What is the correct
>name?
>
>-Andi
>-
>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/
>

2005-11-30 23:41:42

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] Add VT flag to cpuinfo

On Wed, Nov 30, 2005 at 03:34:19PM -0800, Dugger, Donald D wrote:
> Andi-
>
> Good guess. We discuessed it and decided that `vmx' was the best
> term so I'll rework the patch to use that name.
>
> BTW, I don't see any reference to `vmx' in the 2.6.14 tree, is
> this a change you recently made to your tree?

2.6.14 is ancient. Check 2.6.15rc*
Actually I think I changed 32bit too, so your patch is wholly
obsolete unless you want to rename it.

-Andi

2005-11-30 23:46:19

by Dugger, Donald D

[permalink] [raw]
Subject: RE: [PATCH] Add VT flag to cpuinfo

Andi-

Story of my life (I've had way too many patches that I
sent out just a little too late :-)

No, if you made the same change to the IA32 branch then
that's fine, tnx.

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
[email protected]
Ph: (303)440-1368

>-----Original Message-----
>From: Andi Kleen [mailto:[email protected]]
>Sent: Wednesday, November 30, 2005 4:42 PM
>To: Dugger, Donald D
>Cc: Andi Kleen; [email protected]; Shah, Rajesh;
>[email protected]
>Subject: Re: [PATCH] Add VT flag to cpuinfo
>
>On Wed, Nov 30, 2005 at 03:34:19PM -0800, Dugger, Donald D wrote:
>> Andi-
>>
>> Good guess. We discuessed it and decided that `vmx' was the best
>> term so I'll rework the patch to use that name.
>>
>> BTW, I don't see any reference to `vmx' in the 2.6.14 tree, is
>> this a change you recently made to your tree?
>
>2.6.14 is ancient. Check 2.6.15rc*
>Actually I think I changed 32bit too, so your patch is wholly
>obsolete unless you want to rename it.
>
>-Andi
>

2005-11-30 23:50:23

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] Add VT flag to cpuinfo

On Wed, Nov 30, 2005 at 03:46:09PM -0800, Dugger, Donald D wrote:
> Andi-
>
> Story of my life (I've had way too many patches that I
> sent out just a little too late :-)

It might be useful if you could confirm "vmx" is the really
official name that will continue to be used to describe that feature
in the future. We're already stuck with PNI instead of SSE3 and no
need to make that mistake problem. If VT matches the long term naming better
it would be a good idea to still rename it.

-Andi

2005-12-01 00:09:09

by Dugger, Donald D

[permalink] [raw]
Subject: RE: [PATCH] Add VT flag to cpuinfo

Andi-

As I said, we discussed this internally and the concensus was that
`vmx' was correct. Especially since this term is used in the
documentation this should be safe.

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
[email protected]
Ph: (303)440-1368

>-----Original Message-----
>From: Andi Kleen [mailto:[email protected]]
>Sent: Wednesday, November 30, 2005 4:50 PM
>To: Dugger, Donald D
>Cc: Andi Kleen; [email protected]; Shah, Rajesh;
>[email protected]
>Subject: Re: [PATCH] Add VT flag to cpuinfo
>
>On Wed, Nov 30, 2005 at 03:46:09PM -0800, Dugger, Donald D wrote:
>> Andi-
>>
>> Story of my life (I've had way too many patches that I
>> sent out just a little too late :-)
>
>It might be useful if you could confirm "vmx" is the really
>official name that will continue to be used to describe that feature
>in the future. We're already stuck with PNI instead of SSE3 and no
>need to make that mistake problem. If VT matches the long term
>naming better
>it would be a good idea to still rename it.
>
>-Andi
>

2005-12-01 16:10:21

by Anton Blanchard

[permalink] [raw]
Subject: Re: [PATCH] Add VT flag to cpuinfo


> Good guess. We discuessed it and decided that `vmx' was the best
> term so I'll rework the patch to use that name.
>
> BTW, I don't see any reference to `vmx' in the 2.6.14 tree, is
> this a change you recently made to your tree?

Unfortunate choice of TLA, VMX is the name for the vector instruction set
on powerpc (otherwise known as altivec).

Anton

2005-12-01 16:45:33

by Dugger, Donald D

[permalink] [raw]
Subject: RE: [PATCH] Add VT flag to cpuinfo

Well, I really don't see a conflict here, TLA's for x86
architectures are orthogonal to PowerPC and vice versa
so this shouldn't cause any confusion.

--
Don Dugger
"Censeo Toto nos in Kansa esse decisse." - D. Gale
[email protected]
Ph: (303)440-1368

>-----Original Message-----
>From: Anton Blanchard [mailto:[email protected]]
>Sent: Thursday, December 01, 2005 9:10 AM
>To: Dugger, Donald D
>Cc: Andi Kleen; [email protected]; Shah, Rajesh;
>[email protected]
>Subject: Re: [PATCH] Add VT flag to cpuinfo
>
>
>> Good guess. We discuessed it and decided that `vmx' was the best
>> term so I'll rework the patch to use that name.
>>
>> BTW, I don't see any reference to `vmx' in the 2.6.14 tree, is
>> this a change you recently made to your tree?
>
>Unfortunate choice of TLA, VMX is the name for the vector
>instruction set
>on powerpc (otherwise known as altivec).
>
>Anton
>

2005-12-01 16:56:11

by Anton Blanchard

[permalink] [raw]
Subject: Re: [PATCH] Add VT flag to cpuinfo


> Well, I really don't see a conflict here, TLA's for x86
> architectures are orthogonal to PowerPC and vice versa
> so this shouldn't cause any confusion.

Do you read all of the linux-kernel mailing list? :) Its caused me to
have to look twice on a number of occasions.

I know it isnt going to be fixed but I do wonder if intel knows how to
use google before creating yet another TLA :)

Anton

2005-12-01 17:40:58

by Jan Engelhardt

[permalink] [raw]
Subject: RE: Add VT flag to cpuinfo; SSE3 flag


>As I said, we discussed this internally and the concensus was that
>`vmx' was correct. Especially since this term is used in the
>documentation this should be safe.

If not, I would propose to prefix or postfix the cpuflag somehow, maybe
coupled with the arch or creator like 'ivmx' (intel vmx) and 'pvmx' (ppc
vmx).

Oh BTW, I am missing an 'sse3' flag in /proc/cpuinfo on Opterons (running
2.6.13). Could this be added, if it has not yet in 2.6.15rc*?


Jan Engelhardt
--

2005-12-01 17:49:04

by Andi Kleen

[permalink] [raw]
Subject: Re: Add VT flag to cpuinfo; SSE3 flag

> Oh BTW, I am missing an 'sse3' flag in /proc/cpuinfo on Opterons (running
> 2.6.13). Could this be added, if it has not yet in 2.6.15rc*?

It's pni for historical reasons.

-Andi

2005-12-01 17:57:51

by Andi Kleen

[permalink] [raw]
Subject: Re: [PATCH] Add VT flag to cpuinfo

On Fri, Dec 02, 2005 at 03:52:05AM +1100, Anton Blanchard wrote:
>
> > Well, I really don't see a conflict here, TLA's for x86
> > architectures are orthogonal to PowerPC and vice versa
> > so this shouldn't cause any confusion.
>
> Do you read all of the linux-kernel mailing list? :) Its caused me to
> have to look twice on a number of occasions.
>
> I know it isnt going to be fixed but I do wonder if intel knows how to
> use google before creating yet another TLA :)

It would be probably hopeless at least in the 2-6 letter TLA space.
Every possible TLA has been already used for countless other things.
Just live with the collisions. Or use names instead of them.

cpuinfo flags are deeply architecture specific anyways, so I don't
think it makes much sense to try to get them unique over architectures.
In fact I think ppc doesn't even have a "flags" line.

-Andi

2005-12-01 18:04:15

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Add VT flag to cpuinfo; SSE3 flag


>> Oh BTW, I am missing an 'sse3' flag in /proc/cpuinfo on Opterons (running
>> 2.6.13). Could this be added, if it has not yet in 2.6.15rc*?
>
>It's pni for historical reasons.

I could not find pni either. This is all what cpuinfo gives on one:

processor : 1
vendor_id : AuthenticAMD
cpu family : 15
model : 5
model name : AMD Opteron(tm) Processor 248
stepping : 10
cpu MHz : 2190.310
cache size : 1024 KB
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca
cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext lm 3dnowext
3dnow
bogomips : 4374.52
TLB size : 1088 4K pages
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management: ts fid vid ttp



Jan Engelhardt
--

2005-12-01 20:02:37

by Andi Kleen

[permalink] [raw]
Subject: Re: Add VT flag to cpuinfo; SSE3 flag

> I could not find pni either. This is all what cpuinfo gives on one:
>
> processor : 1
> vendor_id : AuthenticAMD
> cpu family : 15
> model : 5
> model name : AMD Opteron(tm) Processor 248
> stepping : 10

Only E stepping or later Opterons have SSE3. Yours is older.

-Andi