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 1207095 - host-passthrough model cpu with feature policy will be covered by host cpu after migrate/restore
Summary: host-passthrough model cpu with feature policy will be covered by host cpu a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.2
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: Jingjing Shao
URL:
Whiteboard:
Depends On:
Blocks: libvirtCPUconfig 1288337
TreeView+ depends on / blocked
 
Reported: 2015-03-30 08:37 UTC by Luyao Huang
Modified: 2017-08-02 01:25 UTC (History)
5 users (show)

Fixed In Version: libvirt-2.5.0-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 17:06:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1846 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2017-08-01 18:02:50 UTC

Description Luyao Huang 2015-03-30 08:37:45 UTC
description of problem:
host-passthrough model cpu with feature policy will disappear after migrate/save and restore

Version-Release number of selected component (if applicable):
libvirt-1.2.13-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
 
1.edit a vm like this:
# virsh edit test3
  <cpu mode='host-passthrough'>
    <feature policy='disable' name='bmi1'/>
  </cpu>


2.start it and check running vm xml:
# virsh start test3

# virsh dumpxml test3
  <cpu mode='host-passthrough'>
    <feature policy='disable' name='bmi1'/>
  </cpu>


3. managedsave and restore

# virsh managedsave test3

Domain test3 state saved by libvirt

# virsh start test3
Domain test3 started

# virsh dumpxml
...
  <cpu mode='host-passthrough'>
    <feature policy='require' name='bmi1'/>
    <feature policy='require' name='perfctr_nb'/>
    <feature policy='require' name='perfctr_core'/>
    <feature policy='require' name='topoext'/>
    <feature policy='require' name='nodeid_msr'/>
    <feature policy='require' name='tce'/>
    <feature policy='require' name='lwp'/>
    <feature policy='require' name='wdt'/>
    <feature policy='require' name='skinit'/>
    <feature policy='require' name='ibs'/>
    <feature policy='require' name='osvw'/>
    <feature policy='require' name='cr8legacy'/>
    <feature policy='require' name='extapic'/>
    <feature policy='require' name='cmp_legacy'/>
    <feature policy='require' name='fxsr_opt'/>
    <feature policy='require' name='mmxext'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='vme'/>
  </cpu>
...

Actual results:
host-passthrough model cpu with feature policy will disappear after migrate/save and restore

Expected results:
still can find them after restore/migrate

Additional info:

Also we should check if user will try to set invtsc flags then migrate

Comment 1 Luyao Huang 2015-03-30 09:19:23 UTC
Just send a patch to upstream:

http://www.redhat.com/archives/libvir-list/2015-March/msg01520.html

Comment 2 Luyao Huang 2015-06-17 14:27:22 UTC
Resend a new one:

https://www.redhat.com/archives/libvir-list/2015-June/msg00871.html

Comment 5 Jiri Denemark 2016-09-22 13:57:17 UTC
This should be fixed upstream as of

commit 7ce711a30eaf882ccd0217b2528362b563b6d670
Refs: v2.2.0-199-g7ce711a
Author:     Jiri Denemark <jdenemar>
AuthorDate: Wed Jun 22 15:53:48 2016 +0200
Commit:     Jiri Denemark <jdenemar>
CommitDate: Thu Sep 22 15:40:09 2016 +0200

    qemu: Update guest CPU def in live XML

    Storing the updated CPU definition in the live domain definition saves
    us from having to update it over and over when we need it. Not to
    mention that we will soon further update the CPU definition according to
    QEMU once it's started.

    A highly wanted side effect of this patch, libvirt will pass all CPU
    features explicitly specified in domain XML to QEMU, even those that are
    already included in the host model.

    This patch should fix the following bugs:
        https://bugzilla.redhat.com/show_bug.cgi?id=1207095
        https://bugzilla.redhat.com/show_bug.cgi?id=1339680
        https://bugzilla.redhat.com/show_bug.cgi?id=1371039
        https://bugzilla.redhat.com/show_bug.cgi?id=1373849
        https://bugzilla.redhat.com/show_bug.cgi?id=1375524
        https://bugzilla.redhat.com/show_bug.cgi?id=1377913

    Signed-off-by: Jiri Denemark <jdenemar>

Comment 7 Jingjing Shao 2016-12-27 09:42:00 UTC
Verified this bug as below

# rpm -q libvirt
libvirt-2.5.0-1.el7.x86_64

# virsh start rhel7.3
Domain rhel7.3 started

# virsh dumpxml rhel7.3 | grep cpu  -A3
...
 <cpu mode='host-passthrough'>
    <feature policy='disable' name='bmi1'/>
  </cpu>
...

# virsh managedsave rhel7.3
Domain rhel7.3 state saved by libvirt

# virsh restore  /var/lib/libvirt/qemu/save/rhel7.3.save
Domain restored from /var/lib/libvirt/qemu/save/rhel7.3.save


# virsh dumpxml rhel7.3 | grep cpu -A3
...
  <cpu mode='host-passthrough'>
    <feature policy='disable' name='bmi1'/>
  </cpu>
...

Comment 8 errata-xmlrpc 2017-08-01 17:06:41 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://access.redhat.com/errata/RHEA-2017:1846

Comment 9 errata-xmlrpc 2017-08-01 23:48:45 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://access.redhat.com/errata/RHEA-2017:1846

Comment 10 errata-xmlrpc 2017-08-02 01:25:04 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://access.redhat.com/errata/RHEA-2017:1846


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