Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 858147

Summary: when cpu mode is 'host-model' ,the vendor_id attribute isn't effective but still can be set in domain's xml.
Product: Red Hat Enterprise Linux 7 Reporter: hongming <honzhang>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: cwei, dyuan, jdenemar, lhuang, mzhan, rbalakri
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libvirt-1.2.15-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-19 05:35:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description hongming 2012-09-18 07:01:51 UTC
Description of problem:
The vendor_id attribute should be disabled  when the cpu mode is 'host-model'. If keep it , the vendor_id will be not identical between guest os and domain'xml.

Version-Release number of selected component (if applicable):
libvirt-0.10.1-2.el6.x86_64
qemu-kvm-0.12.1.2-2.307.el6.x86_64


How reproducible:
100% 

Steps to Reproduce:
1. # virsh start rhel6.2
Domain rhel6.2 started


2.Login guest .check cpu vendor id
# cat /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 42
model name    : Intel(R) Xeon(R) CPU E31225 @ 3.10GHz
stepping    : 7
...snipped...


3. # virsh dumpxml rhel6.2
<domain type='kvm' id='73'>
 ......
  <cpu mode='host-model'>
    <model fallback='forbid' vendor_id='AuthenticAMD'/>
  </cpu>
......
</domain>
  

Actual results:
The vendor_id attribute isn't disabled.

Expected results:
The vendor_id attribute should be disabled. 

Additional info:

Comment 2 hongming 2012-09-18 07:35:59 UTC
According to the following patch,there is one important scenario -  Migrating guest from one host to another with different cpu vendors is a problem. Using a windows 7 or 8 image on different cpus could for example require a (re-)activation. The vendor_id can solve it.

  
http://www.redhat.com/archives/libvir-list/2012-July/msg00439.html

Maybe the vendor_id attribute should be effective when the cpu mode is 'host-model'. So please ignore the above expected results .

Comment 3 Dave Allan 2012-09-18 12:49:44 UTC
I believe this is behavior by design, so I am closing as NOTABUG, but feel free to comment/reopen if you disagree.

Comment 4 Jiri Denemark 2012-09-18 20:08:50 UTC
I don't think it's by design. We should either fail to define such domain or obey vendor_id. We shouldn't just silently ignore it.

Comment 5 Dave Allan 2012-09-18 20:26:04 UTC
(In reply to comment #4)
> I don't think it's by design. We should either fail to define such domain or
> obey vendor_id. We shouldn't just silently ignore it.

Ok, that wasn't clear to me.

Comment 10 Jiri Denemark 2014-04-04 21:36:44 UTC
This bug was not selected to be addressed in Red Hat Enterprise Linux 6. We will look at it again within the Red Hat Enterprise Linux 7 product.

Comment 13 Jiri Denemark 2015-04-30 09:58:04 UTC
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2015-April/msg01540.html

Comment 14 Jiri Denemark 2015-04-30 13:38:14 UTC
Pushed upstream as v1.2.15-rc1-31-g01ecee2:

commit 01ecee247a4b172d89c90e13c433e47d89bb2283
Author: Jiri Denemark <jdenemar>
Date:   Thu Apr 30 11:10:16 2015 +0200

    cpu: Honor vendor_id override in host-model
    
    https://bugzilla.redhat.com/show_bug.cgi?id=858147
    
    Signed-off-by: Jiri Denemark <jdenemar>

Comment 17 Luyao Huang 2015-07-07 06:44:00 UTC
I can reproduce this issue with libvirt-1.2.14-1.el7.x86_64:

1. prepare a vm have xml like this:

  <cpu mode='host-model'>
    <model fallback='forbid' vendor_id='GenuineIntel'/>
    <numa>
      <cell id='0' cpus='0' memory='512000' unit='KiB'/>
      <cell id='1' cpus='1' memory='512000' unit='KiB'/>
    </numa>
  </cpu>


2. check qemu command line there is no vendor_id and login guest check the cpu vendor is not changed:

#ps aux|grep qemu
-cpu Opteron_G5,+bmi1,+perfctr_nb,+perfctr_core,+topoext,+nodeid_msr,+tce,+lwp,+wdt,+skinit,+ibs,+osvw,+cr8legacy,+extapic,+cmp_legacy,+fxsr_opt,+mmxext,+osxsave,+monitor,+ht,+vme


And verify this bug with libvirt-1.2.16-1.el7.x86_64:


1. prepare a vm have xml like this:

  <cpu mode='host-model'>
    <model fallback='forbid' vendor_id='GenuineIntel'/>
    <numa>
      <cell id='0' cpus='0' memory='512000' unit='KiB'/>
      <cell id='1' cpus='1' memory='512000' unit='KiB'/>
    </numa>
  </cpu>


2. check qemu command line and login guest check the cpu vendor_id:

# ps aux|grep qemu

-cpu Opteron_G5,vendor=GenuineIntel,+bmi1,+perfctr_nb,+perfctr_core,+topoext,+nodeid_msr,+tce,+lwp,+wdt,+skinit,+ibs,+osvw,+cr8legacy,+extapic,+cmp_legacy,+fxsr_opt,+mmxext,+osxsave,+monitor,+ht,+vme

Comment 19 errata-xmlrpc 2015-11-19 05:35:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2202.html