Bug 1686895
| Summary: | Enhance detection of host CPU model to avoid guesses based on fea.ture list length | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 8 | Reporter: | Jiri Denemark <jdenemar> | |
| Component: | libvirt | Assignee: | Jiri Denemark <jdenemar> | |
| Status: | CLOSED ERRATA | QA Contact: | jiyan <jiyan> | |
| Severity: | high | Docs Contact: | ||
| Priority: | high | |||
| Version: | 8.0 | CC: | atheurer, chayang, dshaks, dyuan, ehabkost, gveitmic, hfukumot, jdenemar, jinzhao, jiyan, juzhang, knoel, marjones, mkalinin, mvanderw, pbonzini, qzhang, rbalakri, rsibley, srao, virt-maint, xuzhang, yalzhang, zhguo | |
| Target Milestone: | rc | Flags: | pm-rhel:
mirror+
|
|
| Target Release: | 8.1 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | libvirt-4.5.0-29.el8 | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | ||
| Clone Of: | 1558558 | |||
| : | 1686898 (view as bug list) | Environment: | ||
| Last Closed: | 2019-11-05 20:48:05 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: | ||||
| Bug Depends On: | 1558558 | |||
| Bug Blocks: | 1686898 | |||
|
Description
Jiri Denemark
2019-03-08 15:51:11 UTC
Reproduced this bug on libvirt-4.5.0-28.module+el8.1.0+3531+2918145b.x86_64.
Version:
libvirt-4.5.0-28.module+el8.1.0+3531+2918145b.x86_64
qemu-kvm-2.12.0-80.module+el8.1.0+3572+48154135.x86_64
kernel-4.18.0-109.el8.x86_64
Steps:
1. Check the output of "virsh capabilities" and "virsh domcapabilities".
# virsh capabilities
<capabilities>
<host>
<uuid>4f11c612-e27d-11e7-9a7d-0894ef59df54</uuid>
<cpu>
<arch>x86_64</arch>
<model>Broadwell</model> *****************
# virsh domcapabilities
<domainCapabilities>
...
<cpu>
<mode name='host-passthrough' supported='yes'/>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>Skylake-Client</model> *******************
<vendor>Intel</vendor>
<feature policy='require' name='ss'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='invtsc'/>
<feature policy='disable' name='mpx'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='xgetbv1'/>
</mode>
2. Prepare a shutdown VM with the following conf, start VM and check the related parameters.
# virsh domstate vm1
shut off
# virsh dumpxml vm1 --inactive |grep "<cpu" -A3
<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>
# virsh start vm1
Domain vm1 started
# virsh dumpxml vm1 |grep "<cpu" -A17
<cpu mode='custom' match='exact' check='full'>
<model fallback='forbid'>Skylake-Client</model>
<vendor>Intel</vendor>
<feature policy='require' name='ss'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='disable' name='mpx'/>
<feature policy='disable' name='xsavec'/>
<feature policy='disable' name='xgetbv1'/>
</cpu>
# ps -ef |grep vm1
...
-cpu Skylake-Client,ss=on,vmx=on,hypervisor=on,tsc_adjust=on,umip=on,pdpe1gb=on,mpx=off,xsavec=off,xgetbv1=off
Verified this bug on libvirt-4.5.0-29.module+el8.1.0+3567+07fd3313.x86_64.
Version:
libvirt-4.5.0-29.module+el8.1.0+3567+07fd3313.x86_64
qemu-kvm-2.12.0-80.module+el8.1.0+3572+48154135.x86_64
kernel-4.18.0-109.el8.x86_64
Steps:
1. Check the output of "virsh capabilities" and "virsh domcapabilities".
# virsh capabilities
<capabilities>
<host>
<uuid>4f11c612-e27d-11e7-9a7d-0894ef59df54</uuid>
<cpu>
<arch>x86_64</arch>
<model>Broadwell</model> *******************
# virsh domcapabilities
<domainCapabilities>
...
<cpu>
<mode name='host-passthrough' supported='yes'/>
<mode name='host-model' supported='yes'>
<model fallback='forbid'>Broadwell</model> *******************
<vendor>Intel</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='f16c'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='arch-capabilities'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='abm'/>
<feature policy='require' name='invtsc'/>
</mode>
2. Prepare a shutdown VM with the following conf, start VM and check the related parameters.
# virsh domstate vm1
shut off
# virsh dumpxml vm1 --inactive |grep "<cpu" -A3
<cpu mode='host-model' check='partial'>
<model fallback='allow'/>
</cpu>
# virsh start vm1
Domain vm1 started
# virsh dumpxml vm1 |grep "<cpu" -A17
<cpu mode='custom' match='exact' check='full'>
<model fallback='forbid'>Broadwell</model>
<vendor>Intel</vendor>
<feature policy='require' name='vme'/>
<feature policy='require' name='ss'/>
<feature policy='require' name='vmx'/>
<feature policy='require' name='f16c'/>
<feature policy='require' name='rdrand'/>
<feature policy='require' name='hypervisor'/>
<feature policy='require' name='arat'/>
<feature policy='require' name='tsc_adjust'/>
<feature policy='require' name='umip'/>
<feature policy='require' name='arch-capabilities'/>
<feature policy='require' name='xsaveopt'/>
<feature policy='require' name='pdpe1gb'/>
<feature policy='require' name='abm'/>
</cpu>
# ps -ef |grep vm1
...
-cpu Broadwell,vme=on,ss=on,vmx=on,f16c=on,rdrand=on,hypervisor=on,arat=on,tsc_adjust=on,umip=on,arch-capabilities=on,xsaveopt=on,pdpe1gb=on,abm=on,rtm=on,hle=on
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/RHSA-2019:3345 |