Bug 858147 - when cpu mode is 'host-model' ,the vendor_id attribute isn't effective but still can be set in domain's xml.
when cpu mode is 'host-model' ,the vendor_id attribute isn't effective but st...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Jiri Denemark
Virtualization Bugs
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-18 03:01 EDT by hongming
Modified: 2016-04-26 09:43 EDT (History)
6 users (show)

See Also:
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 00:35:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 03:17:58 EST

  None (edit)
Description hongming 2012-09-18 03:01:51 EDT
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 03:35:59 EDT
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 08:49:44 EDT
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 16:08:50 EDT
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 16:26:04 EDT
(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 17:36:44 EDT
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 05:58:04 EDT
Patch sent upstream for review: https://www.redhat.com/archives/libvir-list/2015-April/msg01540.html
Comment 14 Jiri Denemark 2015-04-30 09:38:14 EDT
Pushed upstream as v1.2.15-rc1-31-g01ecee2:

commit 01ecee247a4b172d89c90e13c433e47d89bb2283
Author: Jiri Denemark <jdenemar@redhat.com>
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@redhat.com>
Comment 17 Luyao Huang 2015-07-07 02:44:00 EDT
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 00:35:53 EST
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

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