Bug 611401 - cpuCompareXML reports pentium host is incompatible with a core2duo host
Summary: cpuCompareXML reports pentium host is incompatible with a core2duo host
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt   
(Show other bugs)
Version: 6.0
Hardware: All Linux
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
Depends On:
Blocks: 581275 613760 630615
TreeView+ depends on / blocked
Reported: 2010-07-05 06:29 UTC by Dan Kenigsberg
Modified: 2010-11-11 14:50 UTC (History)
9 users (show)

Fixed In Version: libvirt-0_8_1-14_el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 613760 630615 (view as bug list)
Last Closed: 2010-11-11 14:50:15 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Dan Kenigsberg 2010-07-05 06:29:51 UTC
Description of problem:
On a host that happily runs pentium guests, cpuCompareXML fails.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
host cpu:
      <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'/>

guest cpu:
<cpu match="minimum">

Actual results:
# virsh cpu-compare /tmp/pentium.xml
CPU described in /tmp/pentium.xml is incompatible with host CPU

Expected results:
CPU is compatible

Additional info:
02:29:22.157: debug : virConnectCompareCPU:11869 : conn=0x7fee9009ec80, xmlDesc=<cpu match='minimum'><arch>i686</arch><model>pentium</model></cpu>
, flags=36151920
02:29:22.157: debug : cpuCompareXML:77 : host=0x2543dd0, xml=<cpu match='minimum'><arch>i686</arch><model>pentium</model></cpu>

02:29:22.157: debug : cpuCompare:110 : host=0x2543dd0, cpu=0x7fee88002400
02:29:22.161: debug : x86Compute:968 : Host CPU provides forbidden features in CPUID function 0x1

Comment 2 Jiri Denemark 2010-07-07 12:33:43 UTC
You need to specify guest cpu without the <arch> element. Specifying arch is only allowed for host CPUs. However, I admit that the error is pretty confusing so it needs to be fixed.

Comment 3 Daniel Berrange 2010-07-07 12:59:35 UTC
Shouldn't it be treating 'i686' guest arch as compatible with 'x86_64' host arch ?

Comment 4 Jiri Denemark 2010-07-12 18:36:35 UTC
It turns out there are two things involved:

1) as suggested in comment 2 is that libvirts does not print an error when both 'match' attribute and 'arch' element are used in one 'cpu' element and just ignores the match attribute in that case and treats the XML as host CPU definition

2) comparing host CPUs is wrong, which is the cause for "Host CPU provides forbidden features in CPUID function 0x1" message

The second issue is fixed upstream by http://libvirt.org/git/?p=libvirt.git;a=commit;h=ac3daf0899cced61faeeed3c6e14806d9e846174

I'll clone this bz for the first issue.

Comment 8 Dave Allan 2010-07-14 06:21:58 UTC
libvirt-0_8_1-14_el6 has been built in RHEL-6-candidate with the fix.


Comment 10 wangyimiao 2010-08-02 09:45:39 UTC
Verified this bug PASS with:

Comment 11 Nan Zhang 2010-09-07 08:02:15 UTC
Verified with libvirt-0.8.1-27.el6.x86_64.

# cat cpu-pentium.xml 
<cpu match="minimum">

# virsh cpu-compare cpu-pentium.xml
Host CPU is a superset of CPU described in cpu-pentium.xml

Comment 12 releng-rhel@redhat.com 2010-11-11 14:50:15 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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