Merge "doc: correct the information of 'cpu_map'"

This commit is contained in:
Zuul 2019-08-02 17:38:36 +00:00 committed by Gerrit Code Review
commit 600ecf3d9a
3 changed files with 17 additions and 12 deletions

View File

@ -274,10 +274,11 @@ to KVM virtual machines. Use cases include:
In libvirt, the CPU is specified by providing a base CPU model name (which is a
shorthand for a set of feature flags), a set of additional feature flags, and
the topology (sockets/cores/threads). The libvirt KVM driver provides a number
of standard CPU model names. These models are defined in the
``/usr/share/libvirt/cpu_map.xml`` file. Check this file to determine which
models are supported by your local installation.
the topology (sockets/cores/threads). The libvirt KVM driver provides a number
of standard CPU model names. These models are defined in the
``/usr/share/libvirt/cpu_map.xml`` file for libvirt prior to version 4.7.0 or
``/usr/share/libvirt/cpu_map/*.xml`` files thereafter. Make a check to
determine which models are supported by your local installation.
Two Compute configuration options in the :oslo.config:group:`libvirt` group
of ``nova.conf`` define which type of CPU model is exposed to the hypervisor
@ -296,10 +297,11 @@ Host model (default for KVM & QEMU)
-----------------------------------
If your ``nova.conf`` file contains ``cpu_mode=host-model``, libvirt identifies
the CPU model in ``/usr/share/libvirt/cpu_map.xml`` file that most closely
matches the host, and requests additional CPU flags to complete the match. This
configuration provides the maximum functionality and performance and maintains
good reliability.
the CPU model in ``/usr/share/libvirt/cpu_map.xml`` for version prior to 4.7.0
or ``/usr/share/libvirt/cpu_map/*.xml`` for version 4.7.0 and higher that most
closely matches the host, and requests additional CPU flags to complete the
match. This configuration provides the maximum functionality and performance
and maintains good reliability.
With regard to enabling and facilitating live migration between
compute nodes, you should assess whether ``host-model`` is suitable

View File

@ -551,7 +551,9 @@ Set the name of the libvirt CPU model the instance should use.
Possible values:
* The named CPU models listed in ``/usr/share/libvirt/cpu_map.xml``
* The named CPU models listed in ``/usr/share/libvirt/cpu_map.xml`` for
libvirt prior to version 4.7.0 or ``/usr/share/libvirt/cpu_map/*.xml``
for version 4.7.0 and higher.
Related options:
@ -600,8 +602,9 @@ expose that CPU flag to the Nova instance, the you need to explicitly
ask for it.
The possible values for ``cpu_model_extra_flags`` depends on the CPU
model in use. Refer to ``/usr/share/libvirt/cpu_map.xml`` possible CPU
feature flags for a given CPU model.
model in use. Refer to ``/usr/share/libvirt/cpu_map.xml`` for libvirt
prior to version 4.7.0 or ``/usr/share/libvirt/cpu_map/*.xml`` thereafter
for possible CPU feature flags for a given CPU model.
Note that when using this config attribute to set the 'PCID' CPU flag
with the ``custom`` CPU mode, not all virtual (i.e. libvirt / QEMU) CPU

View File

@ -45,7 +45,7 @@ LOG = logging.getLogger(__name__)
RESIZE_SNAPSHOT_NAME = 'nova-resize'
# Mapping used to convert libvirt cpu features to traits, for more details, see
# https://github.com/libvirt/libvirt/blob/master/src/cpu/cpu_map.xml.
# https://github.com/libvirt/libvirt/blob/master/src/cpu_map/
CPU_TRAITS_MAPPING = {
'3dnow': os_traits.HW_CPU_X86_3DNOW,
'abm': os_traits.HW_CPU_X86_ABM,