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 488734 - RHEL5.3 guest does not get proper ACPI / proc/cpuinfo from Nahalem host
Summary: RHEL5.3 guest does not get proper ACPI / proc/cpuinfo from Nahalem host
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.0
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: rc
: 6.1
Assignee: Jes Sorensen
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-05 15:26 UTC by John Shakshober
Modified: 2016-04-26 15:25 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-07 11:50:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Shakshober 2009-03-05 15:26:41 UTC
Description of problem:

RHEL5.3 guest does not get proper ACPI / proc/cpuinfo from Nahalem host 
binaries with Nahalem instruction sets will not run inside KVM guest.

Version-Release number of selected component (if applicable):
Linux perf18.lab.bos.redhat.com 2.6.18-128.el5 #1 SMP Wed Dec 17 11:41:38 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Using snap2 of KVM ovirt on the RHEL5.3 kernel 
Suspect other optimizations numa acpi etc all have issues too, but this is a show stopper from running SPECcpu inside KVM virtual guest on Nahalem.

How reproducible:

100%

Steps to Reproduce:
1. On a Nahalem system, as root untar speckit to /spec from Intel or http://perf1.bos.redhat.com:/shak/kits/spec_vanhalen.tar.bz2  (will need 16GB space)
2. cd /spec/SPEC2006
3. ./runit.sh (sets up the subdirectories 
  
Actual results:
Running Benchmarks
  Running (#1) 400.perlbench ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)

400.perlbench: copy 4 non-zero return code (exit code=1, signal=0)


****************************************
Contents of splitmail.1600.12.26.16.4500.err
****************************************

Fatal Error: This program was not built to run on the processor in your system.
The allowed processors are: Intel(R) processors with SSE4.2 and POPCNT instructions support.




Expected results:

When run on the perf22 host

Running Benchmarks
  Running (#1) 400.perlbench ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 401.bzip2 ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 403.gcc ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 429.mcf ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (8 copies)
  Running (#1) 445.gobmk ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 456.hmmer ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (8 copies)
  Running (#1) 458.sjeng ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 462.libquantum ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 464.h264ref ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 471.omnetpp ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 473.astar ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 483.xalancbmk ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#1) 999.specrand ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 400.perlbench ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 401.bzip2 ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 403.gcc ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 429.mcf ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (8 copies)
  Running (#2) 445.gobmk ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 456.hmmer ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (8 copies)
  Running (#2) 458.sjeng ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 462.libquantum ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 464.h264ref ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 471.omnetpp ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 473.astar ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 483.xalancbmk ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#2) 999.specrand ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 400.perlbench ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 401.bzip2 ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 403.gcc ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 429.mcf ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (8 copies)
  Running (#3) 445.gobmk ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 456.hmmer ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (8 copies)
  Running (#3) 458.sjeng ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 462.libquantum ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 464.h264ref ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 471.omnetpp ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 473.astar ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 483.xalancbmk ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
  Running (#3) 999.specrand ref peak cpu2006.1.1.ic11.0.linux64.sse42.rate.feb2009 default (16 copies)
Success: 3x400.perlbench 3x401.bzip2 3x403.gcc 3x429.mcf 3x445.gobmk 3x456.hmmer 3x458.sjeng 3x462.libquantum 3x464.h264ref 3x471.omnetpp 3x473.astar 3x483.xalancbmk 3x999.specrand
Producing Raw Reports

Additional info:


The "flags" fields in the guest do NOT have "popcnt" needed for this binary to run.

 
/proc/cpuinfo table on the guest
processor       : 15
vendor_id       : GenuineIntel
cpu family      : 6
model           : 2
model name      : QEMU Virtual CPU version 0.9.1
stepping        : 3
cpu MHz         : 2933.403
cache size      : 2048 KB
fpu             : yes
fpu_exception   : yes
cpuid level     : 2
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 pni
bogomips        : 5843.54
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:


/proc/cpuinfo on the host
processor       : 15
vendor_id       : GenuineIntel
cpu family      : 6
model           : 26
model name      : Intel(R) Xeon(R) CPU           X5570  @ 2.93GHz
stepping        : 5
cpu MHz         : 2933.591
cache size      : 8192 KB
physical id     : 1
siblings        : 8
core id         : 3
cpu cores       : 4
apicid          : 23
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
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 pni monitor ds_cpl vmx est tm2 cx16 xtpr popcnt lahf_lm
bogomips        : 5867.18
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

Comment 1 Dor Laor 2009-04-16 07:35:04 UTC
Please post the qemu command line flags.
Does it happen with "-cpu qemu64,+sse2" flags too? This is what we use by vdsm.

Comment 2 Amit Shah 2009-04-16 10:18:24 UTC
One of the features of virtualisation is the guest need not know which host it's running on -- this is useful for migration of the guest to various hosts (even to hosts which don't have similar capabilities) and things keep working the same.

Exposing flags which are only introduced in Nehalem to guests is not a good idea if other servers in the migration pool do not have those capabilities. On the other hand, if all the servers are known to have the required capability, they can be 'turned on' by passing flags on the command line as Dor mentions above.

We surely don't guarantee that binaries compiled for the host will run fine on the guest if they depend on cpu features exposed by the host cpu.

However, for this specific example, you can use the "-cpu qemu64,+popcnt" option to get the popcnt cpuid enabled

Comment 3 John Shakshober 2009-04-21 01:11:15 UTC
Starting qemu with the -cpu,+sse2,+popcnt flags did NOT alter the behavior the failure above attempting to run an optimized image with the newer Nahalem instructions.

Here is our command line ... if you see any errors, or other suggestions?


 /usr/bin/qemu-kvm -m 16384 -smp 16 -cpu qemu64,+sse2,+popcnt -name rhel5kvmfv -
uuid 32709c5a-d363-a8b0-b87c-78ca707fcb8f -boot c -drive file=/kvm/rhel5kvmfv.ds
k,if=ide,index=0,boot=on -drive file=/spec/kvmspec.dsk,if=ide,index=1,boot=off -
net nic,macaddr=00:16:3e:55:c7:4b,vlan=0,model=virtio -net tap,script=/etc/qemu-
ifup,vlan=0,ifname=prv9 -net nic,macaddr=00:30:48:c5:aa:66,vlan=1,model=virtio -
net tap,script=/etc/qemu-ifup1,vlan=1,ifname=pub1 -parallel none -usb -vnc 127.0
.0.1:0

Comment 4 Dor Laor 2009-04-22 11:17:28 UTC
This is we don't plan to expose Nehalem command set to the guest.
It will limit migration.
Maybe for future releases, and only if management prevent the guest for migration to non-Nehalem hosts.

Comment 5 Eduardo Habkost 2010-01-20 11:52:10 UTC
On RHEL-6, the KVM userspace package is named "qemu-kvm". Moving bug to the right component.

Comment 7 Jes Sorensen 2010-05-06 15:41:45 UTC
Shak,

Does this still happen with -cpu host ?

If the flag doesn't show up with -cpu host, it could be something to fix. 

Otherwise as Dor said, not exposing the Nehalem specifics is really a feature as opposed to a bug. I don't think it is something we should try to do anything about for RHEL6.

Cheers,
Jes

Comment 8 Jes Sorensen 2010-05-06 17:15:08 UTC
Agreed with John to take this one.

Comment 9 Jes Sorensen 2010-05-07 11:50:10 UTC
I ran some tests to verify this. In my case it was a Nehalem system with RHEL6 as host and RHEL55 as the guest:

Here is the output from cpuflags with -cpu host and with the default settings:

-cpu host:
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc up pni ssse3 cx16 sse4_1 sse4_2 popcnt lahf_lm

default:
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 up pni cx16 popcnt lahf_lm

As expected, -cpu host sets both sse4_2 and popcnt as expected.

I am going to close this BZ as the system is behaving as expected. Feel free to reopen if you can reproduce the problem with -cpu host.

Cheers,
Jes

Comment 10 John Shakshober 2010-05-07 12:50:57 UTC
I will re-try on RHEL5.5 and RHEL6 w/ -cpu host flags 
Once I confirm we can CLOSE the BZ.
Thanks
Shak


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