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 611401 - cpuCompareXML reports pentium host is incompatible with a core2duo host
Summary: cpuCompareXML reports pentium host is incompatible with a core2duo host
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Virtualization Bugs
URL:
Whiteboard:
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:
Clone Of:
: 613760 630615 (view as bug list)
Environment:
Last Closed: 2010-11-11 14:50:15 UTC
Target Upstream Version:
Embargoed:


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):
libvirt-0.8.1-12.el6.x86_64

How reproducible:
100%

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

guest cpu:
<cpu match="minimum">
  <arch>i686</arch>
  <model>pentium</model>
</cpu>

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 Berrangé 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.

Dave

Comment 10 wangyimiao 2010-08-02 09:45:39 UTC
Verified this bug PASS with:
libvirt-0.8.1-20.el6.x86_64
qemu-img-0.12.1.2-2.106.el6.x86_64
qemu-kvm-0.12.1.2-2.106.el6.x86_64
kernel-2.6.32-55.el6.x86_64

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">
  <model>pentium</model>
</cpu>

# 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.