Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Miszczak <adam.miszczak@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: kamil.konieczny@linux.intel.com,
	marcin.bernatowicz@linux.intel.com, michal.wajdeczko@intel.com,
	pawel.sikora@intel.com
Subject: [PATCH i-g-t v4 0/4] vmtb: Introduce SR-IOV VM-level testing tool
Date: Mon,  9 Dec 2024 15:24:19 +0100	[thread overview]
Message-ID: <20241209142423.2718734-1-adam.miszczak@linux.intel.com> (raw)

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)

Signed-off-by: Adam Miszczak <adam.miszczak@linux.intel.com>
Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: Michał Wajdeczko <michal.wajdeczko@intel.com>
Cc: Paweł Sikora <pawel.sikora@intel.com>

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

-- 
2.39.1


             reply	other threads:[~2024-12-09 14:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09 14:24 Adam Miszczak [this message]
2024-12-09 14:24 ` [PATCH i-g-t v4 1/4] tools/vmtb: VM Test Bench core Adam Miszczak
2024-12-09 14:24 ` [PATCH i-g-t v4 2/4] tools/vmtb: Basic SR-IOV tests Adam Miszczak
2024-12-09 14:24 ` [PATCH i-g-t v4 3/4] tools/vmtb: Test resources - vGPU profiles Adam Miszczak
2024-12-09 14:24 ` [PATCH i-g-t v4 4/4] tools/vmtb: Install VMTB with IGT build system Adam Miszczak
2024-12-09 21:53 ` ✗ GitLab.Pipeline: warning for vmtb: Introduce SR-IOV VM-level testing tool (rev4) Patchwork
2024-12-09 22:19 ` ✓ Xe.CI.BAT: success " Patchwork
2024-12-09 22:22 ` ✗ i915.CI.BAT: failure " Patchwork
2024-12-10  6:01   ` Adam Miszczak
2024-12-09 23:32 ` ✗ Xe.CI.Full: " Patchwork
2024-12-10  6:01   ` Adam Miszczak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241209142423.2718734-1-adam.miszczak@linux.intel.com \
    --to=adam.miszczak@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=marcin.bernatowicz@linux.intel.com \
    --cc=michal.wajdeczko@intel.com \
    --cc=pawel.sikora@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox