Skip to content

vmtb: Introduce SR-IOV VM-level testing tool

Adam Miszczak igt-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 2 repliesIn review
  2. v34 patches 3 repliesSuperseded
  3. v11 patch 2 repliesSuperseded

Changes in v4 from the cover letter

- fix checkpatch issues: typos, whitespaces (Kamil)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4tools/vmtb: VM Test Bench coretools/vmtb/MANIFEST.in tools/vmtb/README.md tools/vmtb/bench/__init__.py +34 more+3150 -00 replies
2/4tools/vmtb: Basic SR-IOV teststools/vmtb/vmm_flows/__init__.py tools/vmtb/vmm_flows/conftest.py tools/vmtb/vmm_flows/test_basic.py+467 -00 replies
3/4tools/vmtb: Test resources - vGPU profilestools/vmtb/vmm_flows/resources/vgpu_profiles/Flex170.json+113 -00 replies
4/4tools/vmtb: Install VMTB with IGT build systemmeson.build meson_options.txt tools/meson.build+11 -00 replies

Reviews trailers per patch

All 4 patches have a Reviewed-by or Acked-by.

PatchMarcin Bernatowicz
1/4R-b
2/4R-b
3/4R-b
4/4R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH i-g-t v4 0/4] vmtb: Introduce SR-IOV VM-level testing tool

VM Test Bench (VMTB) is a tool for testing virtualization (SR-IOV) supported by the xe driver.
It allows to enable and provision VFs (Virtual Functions) and facilitates manipulation of VMs (Virtual Machines) running virtual GPUs.

Initially only basic test scenarios are provided:
- enable VFs, pass it to VMs and boot guest OS
- submit basic workloads on a guest with virtualized GPU
- exercise VF driver probe and remove

Proposed location for the new tool is the root IGT directory:
igt-gpu-tools/vmtb
but some other options can be also considered, for example:
tools/vmtb
tests/vmtb

v2:
- improve device detection function:
instead of parsing lspci output with regex, iterate over sysfs driver directory to get bound devices' BDFs (Marcin)
- remove obsolete fixtures and other unused code (Marcin)

v3:
- integrate VMTB with IGT meson build/install system (Kamil)
- move the tool from IGT's root to tools/vmtb subdir (Kamil)
- split VMTB core implementation, tests, resources and meson config into separate patches (Kamil)
- update readme description for build, install and dependencies

v4:
- fix checkpatch issues: typos, whitespaces (Kamil)

Cc Marcin Bernatowicz <[email protected]>
Cc Kamil Konieczny <[email protected]>
Cc Michał Wajdeczko <[email protected]>
Cc Paweł Sikora <[email protected]>

Adam Miszczak (4):
tools/vmtb: VM Test Bench core
tools/vmtb: Basic SR-IOV tests
tools/vmtb: Test resources - vGPU profiles tools/vmtb: Install VMTB with IGT build system

 meson.build                                   |   2 +
 meson_options.txt                             |   5 +
 tools/meson.build                             |   4 +
 tools/vmtb/MANIFEST.in                        |   3 +
 tools/vmtb/README.md                          | 106 +++
 tools/vmtb/bench/__init__.py                  |  43 ++
 tools/vmtb/bench/configurators/__init__.py    |   0
 tools/vmtb/bench/configurators/pci.py         |  48 ++
 .../vmtb/bench/configurators/vgpu_profile.py  | 264 ++++++++
 .../configurators/vgpu_profile_config.py      | 148 +++++
 tools/vmtb/bench/configurators/vmtb_config.py | 110 ++++
 tools/vmtb/bench/drivers/__init__.py          |   0
 tools/vmtb/bench/drivers/driver_interface.py  | 198 ++++++
 tools/vmtb/bench/drivers/xe.py                | 307 +++++++++
 tools/vmtb/bench/exceptions.py                |  40 ++
 tools/vmtb/bench/executors/__init__.py        |   0
 .../bench/executors/executor_interface.py     |  22 +
 tools/vmtb/bench/executors/gem_wsim.py        |  70 ++
 tools/vmtb/bench/executors/igt.py             | 117 ++++
 tools/vmtb/bench/executors/shell.py           |  30 +
 tools/vmtb/bench/helpers/__init__.py          |   0
 tools/vmtb/bench/helpers/helpers.py           |  77 +++
 tools/vmtb/bench/helpers/log.py               |  75 +++
 tools/vmtb/bench/machines/__init__.py         |   0
 tools/vmtb/bench/machines/device_interface.py |  23 +
 tools/vmtb/bench/machines/host.py             | 196 ++++++
 .../vmtb/bench/machines/machine_interface.py  |  65 ++
 .../vmtb/bench/machines/physical/__init__.py  |   0
 tools/vmtb/bench/machines/physical/device.py  | 240 +++++++
 tools/vmtb/bench/machines/virtual/__init__.py |   0
 .../machines/virtual/backends/__init__.py     |   0
 .../virtual/backends/backend_interface.py     |  40 ++
 .../machines/virtual/backends/guestagent.py   |  99 +++
 .../machines/virtual/backends/qmp_monitor.py  | 161 +++++
 tools/vmtb/bench/machines/virtual/vm.py       | 604 ++++++++++++++++++
 tools/vmtb/dev-requirements.txt               |   6 +
 tools/vmtb/pyproject.toml                     |  25 +
 tools/vmtb/pytest.ini                         |   0
 tools/vmtb/requirements.txt                   |   2 +
 tools/vmtb/vmm_flows/__init__.py              |   0
 tools/vmtb/vmm_flows/conftest.py              | 307 +++++++++
 .../resources/vgpu_profiles/Flex170.json      | 113 ++++
 tools/vmtb/vmm_flows/test_basic.py            | 160 +++++
 tools/vmtb/vmtb_config.json                   |  31 +
 44 files changed, 3741 insertions(+)
 create mode 100644 tools/vmtb/MANIFEST.in
 create mode 100644 tools/vmtb/README.md
 create mode 100644 tools/vmtb/bench/__init__.py
 create mode 100644 tools/vmtb/bench/configurators/__init__.py
 create mode 100644 tools/vmtb/bench/configurators/pci.py
 create mode 100644 tools/vmtb/bench/configurators/vgpu_profile.py
 create mode 100644 tools/vmtb/bench/configurators/vgpu_profile_config.py
 create mode 100644 tools/vmtb/bench/configurators/vmtb_config.py
 create mode 100644 tools/vmtb/bench/drivers/__init__.py
 create mode 100644 tools/vmtb/bench/drivers/driver_interface.py
 create mode 100644 tools/vmtb/bench/drivers/xe.py
 create mode 100644 tools/vmtb/bench/exceptions.py
 create mode 100644 tools/vmtb/bench/executors/__init__.py
 create mode 100644 tools/vmtb/bench/executors/executor_interface.py
 create mode 100644 tools/vmtb/bench/executors/gem_wsim.py
 create mode 100644 tools/vmtb/bench/executors/igt.py
 create mode 100644 tools/vmtb/bench/executors/shell.py
 create mode 100644 tools/vmtb/bench/helpers/__init__.py
 create mode 100644 tools/vmtb/bench/helpers/helpers.py
 create mode 100644 tools/vmtb/bench/helpers/log.py
 create mode 100644 tools/vmtb/bench/machines/__init__.py
 create mode 100644 tools/vmtb/bench/machines/device_interface.py
 create mode 100644 tools/vmtb/bench/machines/host.py
 create mode 100644 tools/vmtb/bench/machines/machine_interface.py
 create mode 100644 tools/vmtb/bench/machines/physical/__init__.py
 create mode 100644 tools/vmtb/bench/machines/physical/device.py
 create mode 100644 tools/vmtb/bench/machines/virtual/__init__.py
 create mode 100644 tools/vmtb/bench/machines/virtual/backends/__init__.py
 create mode 100644 tools/vmtb/bench/machines/virtual/backends/backend_interface.py
 create mode 100644 tools/vmtb/bench/machines/virtual/backends/guestagent.py
 create mode 100644 tools/vmtb/bench/machines/virtual/backends/qmp_monitor.py
 create mode 100644 tools/vmtb/bench/machines/virtual/vm.py
 create mode 100644 tools/vmtb/dev-requirements.txt
 create mode 100644 tools/vmtb/pyproject.toml
 create mode 100644 tools/vmtb/pytest.ini
 create mode 100644 tools/vmtb/requirements.txt
 create mode 100644 tools/vmtb/vmm_flows/__init__.py
 create mode 100644 tools/vmtb/vmm_flows/conftest.py
 create mode 100644 tools/vmtb/vmm_flows/resources/vgpu_profiles/Flex170.json
 create mode 100644 tools/vmtb/vmm_flows/test_basic.py
 create mode 100644 tools/vmtb/vmtb_config.json
Signature · 1 line
2.39.1