Bug 647125 - /proc/cpuinfo doesn't show pbe although it's supported by CPU
/proc/cpuinfo doesn't show pbe although it's supported by CPU
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.6
Unspecified Linux
medium Severity medium
: rc
: ---
Assigned To: john cooper
Virtualization Bugs
:
Depends On:
Blocks: Rhel5KvmTier2
  Show dependency treegraph
 
Reported: 2010-10-27 06:07 EDT by Alex Jia
Modified: 2014-07-24 23:46 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-03-21 19:07:56 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 Alex Jia 2010-10-27 06:07:12 EDT
Description of problem:
Host cpu flags don't exist 'pbe' feature name on rhel5.6 beta with intel x86_64 arch, but virsh cpu-compare still match it and thinks it is identical to host cpu.

Version-Release number of selected component (if applicable):
# uname -r
2.6.18-225.el5

# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.6 Beta (Tikanga)

# rpm -qa | grep libvirt
libvirt-0.8.2-6.el5
libvirt-0.8.2-6.el5
libvirt-python-0.8.2-6.el5
libvirt-cim-0.5.8-3.el5

# rpm -q kvm
kvm-83-200.el5


How reproducible:
always

Steps to Reproduce:
1. Using virsh capabilities to get <cpu> ... </cpu> block xml and save to a file cpu.xml
2. Using virsh cpu-compare cpu.xml to match it
  
Actual results:
# virsh capabilities
<capabilities>

  <host>
    <uuid>44ee8208-c1e7-2d88-975a-35148d762a47</uuid>
    <cpu>
      <arch>x86_64</arch>
      <model>core2duo</model>
      <topology sockets='1' cores='2' threads='1'/>
      <feature name='lahf_lm'/>
      <feature name='xtpr'/>
      <feature name='cx16'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
    </cpu>
......
# cat cpu.xml 
    <cpu>
      <arch>x86_64</arch>
      <model>core2duo</model>
      <topology sockets='1' cores='2' threads='1'/>
      <feature name='lahf_lm'/>
      <feature name='xtpr'/>
      <feature name='cx16'/>
      <feature name='tm2'/>
      <feature name='est'/>
      <feature name='vmx'/>
      <feature name='ds_cpl'/>
      <feature name='pbe'/>
      <feature name='tm'/>
      <feature name='ht'/>
      <feature name='ss'/>
      <feature name='acpi'/>
      <feature name='ds'/>
    </cpu>

# virsh cpu-compare cpu.xml 
CPU described in cpu.xml is identical to host CPU

# grep 'pbe' /proc/cpuinfo;echo $?
1

Expected results:
fix it

Additional info:

# cat /proc/cpuinfo | grep flags | head -1
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 lm constant_tsc pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm

# cat /usr/share/libvirt/cpu_map.xml
<cpus>
  <arch name='x86'>
    <!-- standard features, EDX -->
    ......
    <feature name='pbe'> <!-- CPUID_PBE -->
      <cpuid function='0x00000001' edx='0x80000000'/>
    </feature>
    ......
Comment 1 Jiri Denemark 2010-10-27 06:38:02 EDT
cpu-compare works as expected. The host CPU it compares cpu.xml with is the one from virsh capabilities. So if you take <cpu> element from capabilities and cpu-compare it, the result must be they are identical.

So what you are reporting instead is that virsh capabilities mentions 'pbe' flag while you don't see that in /proc/cpuinfo. I'm pretty confident that's because RHEL-5 kernel doesn't advertise it for some reason. But I won't close this bz as NOTABUG yet. I'll first check if I'm really right.
Comment 4 Jiri Denemark 2010-10-27 09:00:54 EDT
Tested on my machine...
/proc/cpuinfo: 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 lm constant_tsc pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm

x86info: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflsh ds acpi mmx fxsr sse sse2 ss ht tm pbe sse3 monitor ds-cpl vmx est tm2 ssse3 cx16 xTPR dca
Comment 7 Andrew Jones 2011-01-21 09:01:10 EST
I just found this bug. It appears to be kvm, not xen, so I'm sending it over there for those guys to resolve the mismatch of cpu flag visibility.
Comment 9 Shaolong Hu 2011-01-30 01:42:43 EST
Host:RHEL5.6-x86-64
     kernel-2.6.18-237.el5
     kvm-83-224.el5
     libvirt-0.8.2-15.el5

Steps to reproduce:

1. # cat /proc/cpuinfo | grep pbe
     output:nothing
2. # virsh capabilities | grep pbe
     output:<feature name='pbe'/>
3. # x86info | grep pbe
     output: ... sse2 ss ht tm pbe sse3 monitor ds-cpl vmx ...

PS: There is pbe in /proc/cpuinfo with RHEL6.0-x86-64/kernel-2.6.32-94.el6.x86_64 on the same pc.
Comment 12 john cooper 2011-03-21 19:07:56 EDT
Closing as not a bug as I don't find justification to expose this flag
to a guest.  If a case can be made otherwise, feel free to reopen.

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