Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1515677 - cpu fea-ture policy do not work as expected with cpu mode=passthrough
Summary: cpu fea-ture policy do not work as expected with cpu mode=passthrough
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Jiri Denemark
QA Contact: jiyan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-21 08:41 UTC by yalzhang@redhat.com
Modified: 2018-11-02 02:14 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description yalzhang@redhat.com 2017-11-21 08:41:15 UTC
Description of problem:
cpu feature policy do not work as expected with cpu mode=passthrough

Version-Release number of selected component (if applicable):
libvirt-3.9.0-2.el7.x86_64
qemu-kvm-rhev-2.9.0-16.el7_4.12.x86_64

How reproducible:
100%

Steps to Reproduce:

forbid
1. On host support avx
2. Edit the vm's xml  with below section
# virsh edit rhel7
  <cpu mode='host-passthrough' check='full'>
    <feature policy='forbid' name='avx'/>
  </cpu>

3. vm can start successfully
# virsh start rhel7
Domain rhel7 started

# ps aux | grep rhel7
...-machine pc-i440fx-rhel7.4.0,accel=kvm,usb=off,vmport=off,dump-guest-core=off -cpu host,avx=off...


require
1. on intel host do not support cr8legacy
# cat /proc/cpuinfo | grep cr8legacy ===> no output

2. # virsh dumpxml rhel7 | grep /cpu -B2
  <cpu mode='host-passthrough' check='full'>
    <feature policy='require' name='cr8legacy'/>
  </cpu>

3. # virsh start rhel7
Domain rhel7 started

# ps aux | grep rhel7 
...-cpu host,cr8legacy=on...


Actual results:
For forbid, the guest can start but it support avx.
For require, the guest can start but it do not support cr8legacy.

Expected results:
For forbid, the guest should not start as it support avx.
For require, the guest should not start as it do not support cr8legacy.
Or for host-passthrough do not support require and forbid? better to document somewhere.

Additional info:


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