Bug 1171484
| Summary: | virsh cpu-baseline includes "invtsc" cpu feature | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | tbsky <tbskyd> |
| Component: | libvirt | Assignee: | Ján Tomko <jtomko> |
| Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 7.1 | CC: | dyuan, lhuang, lmiksik, mzhan, rbalakri, zpeng |
| Target Milestone: | rc | ||
| Target Release: | 7.2 | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | libvirt-1.2.14-1.el7 | Doc Type: | Bug Fix |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-11-19 05:57:19 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
tbsky
2014-12-07 16:40:51 UTC
virConnectBaselineCPU is documented as: Computes the most feature-rich CPU which is compatible with all given host CPUs. http://libvirt.org/html/libvirt-libvirt-host.html#virConnectBaselineCPU If "invtsc" is specified on the input, it should be in the output too - it is compatible with all the hosts CPUs, it just isn't migratable. We could add a --migratable flag to cpu-baseline that would filter them out, but that is not RHEL-6 material, moving to RHEL-7. Proposed upstream patches implementing the flag: https://www.redhat.com/archives/libvir-list/2015-February/msg00158.html Now pushed upstream:
commit c7b9f206667af82381e932095dc5bde9386a366d
Author: Ján Tomko <jtomko>
CommitDate: 2015-03-02 07:59:12 +0100
Add --migratable support to virsh cpu-baseline
Wire up VIR_CONNECT_BASELINE_CPU_MIGRATABLE to this
command line option.
commit 000b21da838151fdff4b18429bae934571c8edb1
Author: Ján Tomko <jtomko>
CommitDate: 2015-03-02 07:59:12 +0100
Trivially implement VIR_CONNECT_BASELINE_CPU_MIGRATABLE for non-x86 cpus
Assume no features block migration.
commit 496156807b62bd0b8a27b1fbfd6449db10595cec
Author: Ján Tomko <jtomko>
CommitDate: 2015-03-02 07:59:12 +0100
Implement VIR_CONNECT_BASELINE_CPU_MIGRATABLE in the x86 cpu driver
Filter out non-migratable features if
VIR_CONNECT_BASELINE_CPU_MIGRATABLE was specified.
commit 02c8b66d6a0cab527a6158c2ebad663897cb0d84
Author: Ján Tomko <jtomko>
CommitDate: 2015-03-02 07:59:12 +0100
Add VIR_CONNECT_BASELINE_CPU_MIGRATABLE flag
This flag for virConnectBaselineCPU will allow filtering out
CPU features that block migration from the result.
https://bugzilla.redhat.com/show_bug.cgi?id=1171484
git describe: v1.2.13-9-gc7b9f20
Verify this bug with libvirt-1.2.17-2.el7.x86_64:
1. use a machine support invtsc
# cpuid -1|grep TscInvariant
TscInvariant = true
2. get capabilities:
# virsh capabilities > capabilities.xml
# cat capabilities.xml|grep invtsc
<feature name='invtsc'/>
3.
# virsh cpu-baseline capabilities.xml
<cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G5</model>
<vendor>AMD</vendor>
<feature policy='require' name='invtsc'/> <----- here
<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>
4. test with --migratable
# virsh cpu-baseline capabilities.xml --migratable
<cpu mode='custom' match='exact'>
<model fallback='forbid'>Opteron_G5</model>
<vendor>AMD</vendor>
<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>
5. check the man page:
cpu-baseline FILE [--features] [--migratable]
Compute baseline CPU which will be supported by all host CPUs given in <file>. The list of host CPUs is built by extracting all <cpu> elements from the <file>. Thus, the <file> can contain
either a set of <cpu> elements separated by new lines or even a set of complete <capabilities> elements printed by capabilities command. If --features is specified then the resulting XML
description will explicitly include all features that make up the CPU, without this option features that are part of the CPU model will not be listed in the XML description. If --migratable is
specified, features that block migration will not be included in the resulting CPU.
6. check the cpu-baseline output:
# virsh cpu-baseline --help
NAME
cpu-baseline - compute baseline CPU
SYNOPSIS
cpu-baseline <file> [--features] [--migratable]
DESCRIPTION
Compute baseline CPU for a set of given CPUs.
OPTIONS
[--file] <string> file containing XML CPU descriptions
--features Show features that are part of the CPU model type
--migratable Do not include features that block migration
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 |