Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 618131 - 64bit RHEL3.9 Guest kernel has cpu flags "sse3" unsupported in RHEL6.0 host
64bit RHEL3.9 Guest kernel has cpu flags "sse3" unsupported in RHEL6.0 host
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel (Show other bugs)
6.0
All Linux
low Severity low
: rc
: ---
Assigned To: Jes Sorensen
Virtualization Bugs
: RHELNAK
Depends On:
Blocks: 580953
  Show dependency treegraph
 
Reported: 2010-07-26 04:38 EDT by Joy Pu
Modified: 2013-01-09 17:56 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-08-02 11:20:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joy Pu 2010-07-26 04:38:55 EDT
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 04:54:07 EDT
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 Product and Program Management 2010-07-26 04:57:39 EDT
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 05:31:27 EDT
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 05:50:08 EDT
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 07:02:33 EDT
(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 07:44:46 EDT
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 12:07:39 EDT
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-29 22:03:07 EDT
(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 11:20:15 EDT
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.