RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 618131 - 64bit RHEL3.9 Guest kernel has cpu flags "sse3" unsupported in RHEL6.0 host
Summary: 64bit RHEL3.9 Guest kernel has cpu flags "sse3" unsupported in RHEL6.0 host
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.0
Hardware: All
OS: Linux
low
low
Target Milestone: rc
: ---
Assignee: Jes Sorensen
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 580953
TreeView+ depends on / blocked
 
Reported: 2010-07-26 08:38 UTC by Joy Pu
Modified: 2013-01-09 22:56 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-08-02 15:20:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Joy Pu 2010-07-26 08:38:55 UTC
Description:
In the RHEL6.0 host, RHEL3.9 guest will get unsupported cpu flag 'see3'.
Version-Release number of selected component (if applicable):
host kernel:2.6.32-52.el6.x86_64
guest kernel: 2.4.21-63.ELsmp
 rpm -qa |grep qemu
qemu-kvm-0.12.1.2-2.99.el6.x86_64
qemu-img-0.12.1.2-2.99.el6.x86_64
qemu-kvm-tools-0.12.1.2-2.99.el6.x86_64
gpxe-roms-qemu-0.9.7-6.3.el6.noarch
qemu-kvm-debuginfo-0.12.1.2-2.99.el6.x86_64


How reproducible:
Always

Steps to Reproduce:
1. boot up a RHEL-3.9 guest
2. get the cpuinfo by cat both in guest and host
#cat /proc/cpuinfo

Actual results:
Guest kernel has unsupported cpu flags by host

Expected results:
There is no flags which is shown in guest but not in host

Additional info:
1. The command line:
#   /root/work/autotest/client/tests/kvm/qemu -name 'vm1' -monitor unix:'/tmp/monitor-humanmonitor1-20100722-213352-TLhB',server,nowait -serial unix:'/tmp/serial-20100722-213352-TLhB',server,nowait -drive file='/root/work/autotest/client/tests/kvm/images/RHEL-3.9-64-virtio.qcow2',if=none,id=drive-ide0-0-0,media=disk,cache=none,format=qcow2 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -net nic,vlan=0,netdev=idTFLwlV,model=virtio,macaddr='02:30:0D:20:36:22' -netdev tap,id=idTFLwlV,ifname='e1000_0_8000',script='/root/work/autotest/client/tests/kvm/scripts/qemu-ifup-switch',downscript='no' -m 2048 -smp 1 -vnc :0 -spice port=8000,disable-ticketing  -rtc base=utc,clock=host -M rhel6.0.0 -usbdevice tablet -cpu qemu64,+sse2 -no-kvm-pit-reinjection

2.Host cpuinfo
processor       : 2
vendor_id       : AuthenticAMD
cpu family      : 16
model           : 2
model name      : AMD Phenom(tm) 8750 Triple-Core Processor
stepping        : 3
cpu MHz         : 1200.000
cache size      : 512 KB
physical id     : 0
siblings        : 3
core id         : 2
cpu cores       : 3
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 5
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm 3dnowext 3dnow constant_tsc rep_good nonstop_tsc extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs npt lbrv svm_lock
bogomips        : 4809.90
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management: ts ttp tm stc 100mhzsteps hwpstate



3. Guest cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : QEMU Virtual CPU version 0.12.1
physical id     : 0
siblings        : 1
runqueue        : 0
stepping        : 3
cpu MHz         : 2405.262
cache size      : 512 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm sse3
bogomips        : 4797.23
TLB size        : 1534 4K pages
clflush size    : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

Comment 2 Jes Sorensen 2010-07-26 08:54:07 UTC
Hi,

I strongly suspect you see the sse3 flag because the code in the RHEL3.9 
kernel is so old that it pre-dates sse4 and simply misidentifies one of
the other flags as sse3, like popcnt.

I'll check the source if I can see, but I am pretty sure this is not a bug
in RHEL6, but a limitation in RHEL3.9.

Jes

Comment 3 RHEL Program Management 2010-07-26 08:57:39 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 4 Jes Sorensen 2010-07-26 09:31:27 UTC
Please provide the exact kernel version you are running in the guest.
I don't see any reference to 'sse3' in the RHEL3U9 kernel sources that
I can find.

Thanks,
Jes

Comment 5 Jes Sorensen 2010-07-26 09:50:08 UTC
Could you also provide me with the /proc/cpuinfo of a RHEL6 guest on this machine as well?

Comment 6 Joy Pu 2010-07-26 11:02:33 UTC
(In reply to comment #5)
> Could you also provide me with the /proc/cpuinfo of a RHEL6 guest on this
> machine as well?    

# cat /proc/cpuinfo 
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 6
model name      : QEMU Virtual CPU version 0.12.1
stepping        : 3
cpu MHz         : 2405.196
cache size      : 512 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 4
wp              : yes
flags           : fpu de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm up pni cx16 popcnt hypervisor lahf_lm abm sse4a
bogomips        : 4810.39
TLB size        : 1024 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

There is a flag "up" correspond for smp=1 shown in RHEL 6.0 guest, but not in RHEL 3.9 guest.

Comment 7 Jes Sorensen 2010-07-27 11:44:46 UTC
Ok so what shows as 'sse3' in the RHEL3.9 kernel is what shows up as 'pni'
in your RHEL6 output, aka the flags are consistent.

The real question is whether that flag should be enabled in the default
qemu64 cpu type or not.

From RHEL3.9 (linux-2.4.21-61):
/* Intel-defined CPU features, CPUID level 0x00000001, ecx, word 4 */
#define X86_FEATURE_SSE3	(4*32+ 0) /* Streaming SIMD Extensions-3 */

From upstream:
/* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
#define X86_FEATURE_XMM3        (4*32+ 0) /* "pni" SSE-3 */

Comment 8 Jes Sorensen 2010-07-27 16:07:39 UTC
After further discussion with Alex, John, and others, there is also a problem
with the qemu64 type which enables some incorrect flags.

I am not sure we wish to make any change to this in RHEL6 as sse3/pni is
available on all processors that KVM runs on, even if we do not enable
sse2 per default - yes I know it is very illogical.

Jes

Comment 9 john cooper 2010-07-30 02:03:07 UTC
(In reply to comment #7)
> Ok so what shows as 'sse3' in the RHEL3.9 kernel is what shows up as 'pni'
> in your RHEL6 output, aka the flags are consistent.

Personally I don't know where the "pni" moniker came from
as both Intel and AMD use "sse3" for cpuid 0000_0000, ecx & 1
with no mention of "pni" whatsoever in their respective cpuid
specifications.

FWIW qemu will accept and emit "pni" as an alias for "sse3".

> The real question is whether that flag should be enabled in the default
> qemu64 cpu type or not.
> 
> From RHEL3.9 (linux-2.4.21-61):
> /* Intel-defined CPU features, CPUID level 0x00000001, ecx, word 4 */
> #define X86_FEATURE_SSE3 (4*32+ 0) /* Streaming SIMD Extensions-3 */
> 
> From upstream:
> /* Intel-defined CPU features, CPUID level 0x00000001 (ecx), word 4 */
> #define X86_FEATURE_XMM3        (4*32+ 0) /* "pni" SSE-3 */    

Disabling it at this point is probably more of an unknown risk
vs. leaving it as-is, even if appearing somewhat odd.

Comment 10 john cooper 2010-08-02 15:20:15 UTC
Looks like this isn't a bug but rather some confusion over the
guest kernel's naming of cpuid flags.  This BTW is a persistent
issue we've been tripping over.  In the future it would be less
confusing using x86info to read the cpuid flags directly and
not rely on guest kernel interpretation.  For example:

    # x86info -a -f
        :
    eax in: 0x00000000, eax = 0000000a ebx = 756e6547 ecx = 6c65746e edx = 49656e69
    eax in: 0x00000001, eax = 00010676 ebx = 00020800 ecx = 0008e3fd edx = bfebfbff

Where for this case, sse3 is indicated via cpuid 0x00000001,
ecx & 1.  x86info also will interpret the flag bits and do its best
mapping to known names, but it as well may not do so correctly for
recently defined flag bits.  So examining the raw flag bits is the
most accurate approach.

You can find a copy of the utility tarball here:

    http://people.redhat.com/~jcooper/cpuid/utils/x86info/x86info-1.25.tgz

And vendor specs here:

    http://people.redhat.com/~jcooper/cpuid/vendor_specs/intel/241618.pdf
    http://people.redhat.com/~jcooper/cpuid/vendor_specs/amd/25481.pdf


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