Bug 517928 - bare-metal and xen: /proc/cpuinfo does not list all CPU flags presented by CPU
Summary: bare-metal and xen: /proc/cpuinfo does not list all CPU flags presented by CPU
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel
Version: 5.4
Hardware: All
OS: Linux
urgent
urgent
Target Milestone: rc
: ---
Assignee: Prarit Bhargava
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks: 518337 520686
TreeView+ depends on / blocked
 
Reported: 2009-08-17 22:38 UTC by Andrew Cathrow
Modified: 2014-09-07 22:53 UTC (History)
15 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 518337 (view as bug list)
Environment:
Last Closed: 2010-03-30 06:58:03 UTC


Attachments (Terms of Use)
RHEL5 initial patch for this issue (5.82 KB, patch)
2009-08-19 14:52 UTC, Prarit Bhargava
no flags Details | Diff
RHEL5 fix for this issue (6.48 KB, patch)
2009-08-19 17:48 UTC, Prarit Bhargava
no flags Details | Diff
RHEL5 fix for bare-metal and xen (6.58 KB, patch)
2009-08-20 13:12 UTC, Prarit Bhargava
no flags Details | Diff
RHEL5 fix for bare-metal and xen part II (1.49 KB, patch)
2010-01-29 20:10 UTC, Prarit Bhargava
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0178 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 5.5 kernel security and bug fix update 2010-03-29 12:18:21 UTC

Description Andrew Cathrow 2009-08-17 22:38:07 UTC
/proc/cpuinfo only shows the original set of flags supported from the base kernel release but does not include new features present in supported cpus, so even for features supported in CPUs that we backport to RHEL5 (eg. nahalem) these features are not reflected in /proc/cpuinfo.

x86info does reflect the supported features.

Comment 2 Prarit Bhargava 2009-08-18 18:05:21 UTC
I've noticed this too but haven't really thought it much of a problem as no one has really complained about it.  In all likelihood the setup.c code needs to be updated (probably along with a few other chunks here and there).

P.

Comment 3 Prarit Bhargava 2009-08-18 18:15:47 UTC
(In reply to comment #0)
> /proc/cpuinfo only shows the original set of flags supported from the base
> kernel release but does not include new features present in supported cpus, so
> even for features supported in CPUs that we backport to RHEL5 (eg. nahalem)
> these features are not reflected in /proc/cpuinfo.
> 
> x86info does reflect the supported features.  

Andrew, I'm basically planning on backporting upstream's representation of the cpu flags.  Are there any in particular you want me to get, or is just taking as much of upstream as possible good enough?

P.

Comment 7 Prarit Bhargava 2009-08-19 13:00:58 UTC
Adding both Bhavna(AMD) and John(Intel) to this BZ.

From a private comment,

"the important ones for now are:
intel: ssse3,sse4_1,sse4_2,popcnt
amd: sse4a,misalignsse,popcnt,abm

the ones i know are missing for sure are ssse3, sse4_1, sse4_2.  "

Bhavna, John -- anything else you two consider critical for a cpu flag update?

P.

Comment 8 Prarit Bhargava 2009-08-19 13:29:49 UTC
Looking at things, a wholesale flag backport is likely out of the question.  So I'm going to concentrate on the 8 flags previously identified in this BZ.

P.

Comment 9 Prarit Bhargava 2009-08-19 14:52:13 UTC
Created attachment 357947 [details]
RHEL5 initial patch for this issue

i386 testing on 5300 series chips:

patched:

flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm
---
unpatched:

flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr 

P.

Comment 10 Dan Kenigsberg 2009-08-19 15:30:08 UTC
come to think of it, we should also add these flags to arch/x86/kvm/x86.c if we want them to be exposed to guests and actually used (assuming these flags virtualize well). so patch 357947 is only part of the solution.

Comment 11 Prarit Bhargava 2009-08-19 15:48:25 UTC
(In reply to comment #10)
> come to think of it, we should also add these flags to arch/x86/kvm/x86.c if we
> want them to be exposed to guests and actually used (assuming these flags
> virtualize well). so patch 357947 is only part of the solution.  

Yup.  The patch is a preliminary patch just for proof of concept.  I also have to update the xen files as well.

P.

Comment 12 Dan Kenigsberg 2009-08-19 16:25:44 UTC
(In reply to comment #10)
> we should also add these flags to arch/x86/kvm/x86.c if we
> want them to be exposed to guests and actually used

I have to retract that part; if specified on the command line, a flag is exposed to guest no matter if kvm considers it "supported" or not. Adding these flags to qemu's target-i386/helper.c should be enough.

Comment 13 Prarit Bhargava 2009-08-19 17:48:43 UTC
Created attachment 357963 [details]
RHEL5 fix for this issue

Included xen changes.

Comment 14 Prarit Bhargava 2009-08-19 22:46:03 UTC
From Nehalem-EX

< flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lm

> flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm syscall nx rdtscp lm constant_tsc ida nonstop_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 sse4_2 popcnt lahf_lm

Comment 15 Prarit Bhargava 2009-08-20 12:58:13 UTC
I've opened 517337 for the kvm patch which appears to be a single line patch.

Bug 517337 has been assigned to danken.

P.

Comment 16 Prarit Bhargava 2009-08-20 13:12:40 UTC
Created attachment 358088 [details]
RHEL5 fix for bare-metal and xen

Comment 17 Itamar Heim 2009-08-20 14:24:54 UTC
(In reply to comment #15)
> I've opened 517337 for the kvm patch which appears to be a single line patch.
> 
> Bug 517337 has been assigned to danken.
> 
> P.  
bug is # Bug 518337

Comment 18 Bhavna Sarathy 2009-08-20 19:18:22 UTC
(In reply to comment #7)
> Adding both Bhavna(AMD) and John(Intel) to this BZ.
> 
> From a private comment,
> 
> "the important ones for now are:
> intel: ssse3,sse4_1,sse4_2,popcnt
> amd: sse4a,misalignsse,popcnt,abm
> 
> the ones i know are missing for sure are ssse3, sse4_1, sse4_2.  "
> 
> Bhavna, John -- anything else you two consider critical for a cpu flag update?
> 
> P.  

The flags you list for AMD are all present in RHEL5.4 development kernel that's running on one of my test systems.   I don't see anything critical missing, however, could you please show me a dump much like comment #9, just so I'm clear on the problem that's been identified?

Bhavna

Comment 19 Itamar Heim 2009-08-20 19:48:15 UTC
this was just the list of flags to verify since we want to expose them.
if you see the amd flags on a 5.4 kernel we should be fine.

Comment 20 Prarit Bhargava 2009-08-21 10:39:48 UTC
> The flags you list for AMD are all present in RHEL5.4 development kernel that's
> running on one of my test systems.   I don't see anything critical missing,
> however, could you please show me a dump much like comment #9, just so I'm
> clear on the problem that's been identified?
> 

The AMD flags are showing up, they're just not defined in cpufeature.h.  My patch only adds them to cpufeature.h.  So I think you're okay ;)

The Intel flags are missing, however.

diff of /proc/cpuinfo on Barcelona system 

128.el5

< flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc pni cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw

162.el5 + patch

> flags         : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc nonstop_tsc pni cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy altmovcr8 abm sse4a misalignsse 3dnowprefetch osvw

P.

> Bhavna

Comment 23 Don Zickus 2009-09-04 18:46:25 UTC
in kernel-2.6.18-165.el5
You can download this test kernel from http://people.redhat.com/dzickus/el5

Please do NOT transition this bugzilla state to VERIFIED until our QE team
has sent specific instructions indicating when to do so.  However feel free
to provide a comment indicating that this fix has been verified.

Comment 30 Prarit Bhargava 2010-01-29 19:56:33 UTC
It seems like I got a false positive on testing.  ddd retested and didn't see the flags.  We added a simple two line patch to setup-xen.c, and the flags then appeared.

P.

Comment 31 Prarit Bhargava 2010-01-29 20:10:45 UTC
Created attachment 387637 [details]
RHEL5 fix for bare-metal and xen part II

Comment 32 Prarit Bhargava 2010-01-29 20:11:13 UTC
Posted the above patch that resolves the xen side of things.

P.

Comment 38 errata-xmlrpc 2010-03-30 06:58:03 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0178.html


Note You need to log in before you can comment on or make changes to this bug.