Commit Graph

26 Commits

Author SHA1 Message Date
Takashi Kajinami 83e83b705d Update spec reference links
Use specs.openstack.org consistently and use implemented, not approved,
to show the latest amended spec after actual implementation is done.

Change-Id: Iac3df73568ffbd979dbc012ad75dafc39fd3fd9c
2024-02-13 07:48:56 +00:00
Jonathan Race fce0902443 Adds Pick guest CPU architecture based on host arch in libvirt driver support
Implement new image meta property that allows for the selection of the
correct QEMU binary, cpu architecture, and machine type for a guest
architecture that is different than the host architecture; An x86_64
guest running on an AArch64 host, and vice versa.

Specifically the required OS traits have been added to ensure that the
hw_architecture and hw_emulation_architecture fields recieve the
correct allowed values.

exapnded hw_architecture os_traits to match all specified in nova object
fields.

Depends-On: https://review.opendev.org/c/openstack/nova-specs/+/824044
Implements: blueprint pick-guest-arch-based-on-host-arch-in-libvirt-driver
Closes-Bug: 1863728
Signed-off-by: Jonathan Race <jrace@augusta.edu>
Change-Id: I891cd43b2b97b3774ff923e3487a153a5ba237ef
2022-01-11 19:16:16 +00:00
Stephen Finucane c6a0ff2ac0 List traits in documentation
We're going to have to switch to something other than a list of strings
or use Sphinx-style inline documentation if we want to provide anything
more useful.

Change-Id: I45c29fe2bdd3fdcb3c69e07f5e9e5be36de9b797
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-09-23 12:05:41 +01:00
Lin Yang 066a2a972d CPU: add traits for new AVX512 support
Add several standard traits for the support of new CPU AVX512
instructions, which includes AVX512VBMI [1], AVX512IFMA [2],
AVX512VBMI2 [3], AVX512BITALG [4], AVX512VAES [5], AVX512GFNI [6],
AVX512VPCLMULQDQ [7], AVX512VPOPCNTDQ [4].

[1] https://en.wikipedia.org/wiki/AVX-512#BW,_DQ_and_VBMI
[2] https://en.wikipedia.org/wiki/AVX-512#IFMA
[3] https://en.wikipedia.org/wiki/AVX-512#VBMI2
[4] https://en.wikipedia.org/wiki/AVX-512#VPOPCNTDQ_and_BITALG
[5] https://en.wikipedia.org/wiki/AVX-512#VAES
[6] https://en.wikipedia.org/wiki/AVX-512#GFNI
[7] https://en.wikipedia.org/wiki/AVX-512#VPCLMULQDQ

Change-Id: I58cba02f204d2e19a1a838852c628694edd47d73
2020-05-15 14:15:06 -07:00
Zuul f47d88f085 Merge "Add support for ppc64le platforms" 2019-09-23 11:02:08 +00:00
Michael Davies 6bc0eae3ec Add support for ppc64le platforms
Add support for HW_CPU_PPC64LE_POWER8 and HW_CPU_PPC64LE_POWER9
so that trait-based, multi-architecture scheduling can occur.

Change-Id: Iacf23524434b2b9fb7d02d565618e515e77a1baa
2019-09-06 15:40:20 +09:30
Wang Huaqiang 77c39a1037 CPU: add a trait for AVX512-VNNI support
Add a new standard trait HW_CPU_X86_AVX512VNNI for the support
of CPU AVX512-VNNI instructions.

AVX512-VNNI is the vector network instruction set which is described in
https://en.wikipedia.org/wiki/AVX-512#New_instructions_in_AVX-512_VNNI.

Change-Id: Id12ed38c1648b006c20cf5875a9b2ffe1690ecd6
2019-07-26 14:59:29 +08:00
Eric Fried af871d1ed5 Create trait for NUMA subtree affinity
Introduce trait HW_NUMA_ROOT. This is to be used with the 'resourceless
RP' and 'same_subtree' placement features [1] when requesting NUMA
affinity (e.g. multiple devices affined to the same NUMA node)
especially when not requesting resources from the subtree root provider
itself.

[1] https://review.opendev.org/#/c/662191/
Change-Id: If5478e797b7bec2d8ebe78dd959dcf179a2834f4
Story: #2005575
Task: #30908
2019-06-03 12:40:49 -05:00
Kashyap Chamarthy 93d2ff782f hw: cpu: Rework the directory layout; add missing traits
The main motivation for this change is to: (a) add missing CPU flags
(including those flags that provide mitigation for the recent CVE flaws)
as 'traits'; and (b) adjust and clean up the layout of the 'hw/cpu/'
directory.

To that end, the following are the set of changes in this patch.

(*) Introduce a new cpu/x86 directory; and vendor-specific files: amd.py
    and intel.py; with __init__.py containing the *common* stuff:

    - hw/cpu/x86/amd.py  -- AMD-only traits.

    - hw/cpu/x86/intel.py -- Intel-only traits.

    - hw/cpu/x86/__init__.py -- Common traits for both AMD and Intel.

    - hw/cpu/x86.py -- Two things: (a) move the contents of this file
      into x86/__init__.py, which is its new location; this move
      preserves the integrity of the string trait names and Python
      paths, as they were before; and (b) given point (a), remove the
      now no longer needed hw/cpu/x86.py.  (Justification: We are
      removing this file to maintain consistency with the way it's done
      througout the 'os-traits' repository.)

    - hw/cpu/amd.py -- Deprecate the contents of this file with a
      comment; and copy them into hw/cpu/x86/amd.py, which is its new
      location.

    Comparison between the old and the new layouts of os_traits/hw/cpu/:

      Old Layout                     New Layout
      ----------                     ----------

        cpu/                           cpu/
        ├── aarch64.py                  ├── aarch64.py
        ├── amd.py                      ├── amd.py [DEPRECATED]
        ├── __init__.py                 ├── __init__.py
        └── x86.py                      └── x86/
                                           ├── amd.py
                                           ├── __init__.py
                                           └── intel.py

(*) Add various missing CPU flags to x86/intel.py, x86/amd.py and to
    x86/__intel__.py.

(*) Copy, and deprecate with a comment, flags from cpu/x86.py, i.e..
    "VMX" (Intel) and "SVM" (AMD), into corresponding vendor-specific
    files.

References
----------

[1] Thread start:
    http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006281.html
    -- On reporting CPU flags that provide mitiation (to CVE flaws) as
    Nova 'traits'

[2] Thread conclusion:
    http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006364.html

Closes-Bug: #1830948
Change-Id: I1c9a72d19ef9dadfb931efa3894867099974bcc7
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
2019-05-31 18:01:09 +02:00
Adam Spiers 7f43b7e9a9 Add HW_CPU_AMD_SEV trait
Add a trait reflecting a compute host's capability to offer AMD's
on-chip Secure Encrypted Virtualization functionality:

https://en.wikipedia.org/wiki/Zen_(microarchitecture)#Enhanced_security_and_virtualization_support
https://developer.amd.com/sev/

This will facilitate booting of security-sensitive VMs only on hosts
which offer additional security via SEV.  More details available here:

https://specs.openstack.org/openstack/nova-specs/specs/stein/approved/amd-sev-libvirt-support.html

Change-Id: I8ebfeac3cabbb64a7913f0b8193010a1b712382b
blueprint: amd-sev-libvirt-support
2019-02-08 00:47:57 +00:00
Jay Pipes 189fa9f027 clean up CUDA traits
There was a misunderstanding of what the CUDA traits really stood for.
This wasn't helped by the fact that the NVIDIA CUDA documentation and
versioning system is so awkward.

Basically, there's the CUDA Compute Capability version, which represents
the hardware GPU instruction set extensions supported by various NVIDIA
GPUs. And there is the CUDA SDK version which represents a window of
CUDA Compute Capability versions that the library is able to work with.

This patch adds a new os_traits.hw.gpu.cuda module with these new
traits. It removes the old os_traits.hw.gpu.api.CUDA* traits since those
were misleading and inaccurate.

It also adds a new utility function that maps CUDA SDK version to
supported CUDA Compute Capability versions that the SDK supports. This
support matrix information was taken from the CUDA wikipedia article
which lists the supported version information.

Change-Id: Id4adb6874615ad5f9f8aff780a83119e10a38c35
2018-09-19 10:03:54 -04:00
Konstantinos Samaras-Tsakiris 94bf51ec7a Add CUDA versions 8 and 9
Change-Id: Idc531adf9c859d4de0d18775d6adca87660d2de9
2018-08-28 14:09:48 +00:00
dineshbhor 46ed096e9a Adds HW_CPU_HYPERTHREADING standard trait
This patch adds a new standard trait: HW_CPU_HYPERTHREADING.

The resource provider decorated with this trait indicates that
the hyperthreading is enabled on the provider.

Partially Implements: blueprint cpu-resources

Change-Id: I762a7f11bd10f93855850d09751415d35e5b38e1
2018-06-12 00:10:34 -07:00
Zuul 16e87f2ea0 Merge "GPU: define traits for maximum display heads" 2018-04-19 20:45:30 +00:00
Jianghua Wang 86661e36e5 GPU: define traits for maximum display heads
Some virtual GPUs support specific maximum display heads (or called as
display outputs). This commit is to define traits for display heads, so
that it's able to associate the supported maximum display heads to vGPU
resource providers and it can schedule resource providers based on the
allowed maximum number of display heads.

Change-Id: Ie2b2aca4c00f7b7e01de2eb0455cb180f5e42e3b
Reference: http://docs.nvidia.com/grid/5.0/pdf/grid-vgpu-user-guide.pdf
2018-03-15 15:22:38 +00:00
Jay Pipes 59baa503d0 Add HW_NIC_SRIOV_TRUSTED trait
Adds a new trait to indicate whether all VFs on a PF or a single VF on a
PF is "trusted" and therefore able to operate in promiscuous mode.

Change-Id: If9d4af6ae7158ff8bcab6cdcd979145af307ce84
2018-03-08 10:30:27 -05:00
Zuul a4d56beae1 Merge "Add CPU features for AArch64" 2018-01-19 17:03:22 +00:00
Kevin Zhao bbcc772a01 Add CPU features for AArch64
All features has the reference from Linux kernel

Change-Id: I2b3160202a334018755f345b79afa22b1698f477
Signed-off-by: Kevin Zhao <kevin.zhao@arm.com>
2018-01-18 15:04:47 +08:00
Edan David 827f267b1e Add NIC Switchdev feature
Switchdev enables offloading rules from the datapath directly to
the NIC.
Libvirt support quering the NIC for Switchdev capability:
https://www.redhat.com/archives/libvir-list/2017-September/msg00482.html
More information regarding Switchdev can be found here:
https://review.openstack.org/#/c/435954/11

Change-Id: I4220e795d744fbf76ce9f2deeceaa6ad3b9494ce
2017-10-02 03:42:31 -04:00
Rodolfo Alonso Hernandez c091deb9b5 Add NIC offload features
Adds a set of new traits representing features that hardware networking
interface controllers expose. A number of source documents were used to
come up with these traits:

https://www.kernel.org/doc/Documentation/networking/checksum-offloads.txt
https://www.kernel.org/doc/Documentation/networking/netdev-features.txt

Change-Id: Ic1cd7f4bffd1808967ca418ae77fc741770c57a4
2017-07-03 10:25:55 +01:00
jianghua wang 71e35dee0a GPU: add os traits for GPU - resolution
Different GPUs (or vGPUs) may support different resolutions.
This commit is to define traits for differentiate the resolution
for GPUs (or vGPUs).

Change-Id: I41c0bf6e17c2a2b832f251b95b5f2be7b3d5e8e9
2017-06-26 15:19:36 +01:00
jianghua wang 1db10152fb GPU: add os traits for GPU - API
Some GPUs (and vGPUs on them) support different APIs or features.
This commit is to define os traits for APIs so that the resource
providers for GPUs or vGPUs can be characterised and can be
scheduled basing on different API traits.

Change-Id: I27b80ad3fba04ef02ce9619111353702de450600
2017-06-26 11:40:32 +01:00
Jay Pipes b169eb4a8e Adds a validation test for trait names
Standard trait names should follow the regex "^[A-Z][A-Z0-9]*$". One of the
traits (HW_CPU_X86_AES-NI) erroneously contained a hyphen, so we correct that
and add a test to ensure no future traits wander from the standard trait name
regex.

Luckily, nothing yet is consuming os-traits and so the AES-NI slipup is yet to
have any impact.

Change-Id: I0603bcb4a1038289d2a3b6ce18aa823c7fac0829
2017-05-04 19:47:04 -04:00
EdLeafe 2eb278ce1b Automate the import of traits
The previous patch broke apart the single monolithic declaration of
traits into a branching directory structure. That was great, but it
added a lot of repetitive code to get the subpackages and submodules
into the proper namespace. This patch automates that for any file in the
tree that contains a 'TRAITS' property.

Change-Id: I904789cbec76d83a14e213ce6bb474c9967d588b
2017-04-25 17:51:26 +00:00
Jay Pipes 842a43b515 Add NIC namespace and features
Adds a set of traits representing features that hardware networking interface
controllers expose. A number of source documents were used to come up with
these traits:

https://review.openstack.org/#/c/341341/4/specs/newton/approved/standardize-network-capabilities.rst
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Performance_Tuning_Guide/network-nic-offloads.html
https://www.kernel.org/doc/Documentation/networking/scaling.txt
https://www.kernel.org/doc/Documentation/networking/multiqueue.txt

Change-Id: If8a9f08b8b45ebcac53ea9a406c210605b163516
2017-04-24 11:53:21 -04:00
Jay Pipes 23d81d4451 organize os_traits for the future
Sean Mooney had a good idea that for future-proofing the os-traits library and
ensuring that we don't have to deal with one giant const.py file, that we break
the library into various modules corresponding to the higher-level namespaces.

This patch adds some symbol-registration foo into a utils module and allows the
os_traits module and "leaf modules" to be called in the following way:

 import os_traits
 from os_traits.hw.cpu import x86

 assert os_traits.HW_CPU_X86_SSE42 == x86.SSE42
 assert x86.SSE42 == 'HW_CPU_X86_SSE42'

Change-Id: I0e8f50822ab67cb3be85ed3b935dd6cdb4436dbf
2017-04-05 16:01:33 +00:00