From: "Bernatowicz, Marcin" <marcin.bernatowicz@linux.intel.com>
To: Adam Miszczak <adam.miszczak@linux.intel.com>,
igt-dev@lists.freedesktop.org
Cc: kamil.konieczny@linux.intel.com
Subject: Re: [PATCH i-g-t 09/10] tools/vmtb: Support max VFs configuration
Date: Tue, 10 Mar 2026 11:52:03 +0100 [thread overview]
Message-ID: <a95129bc-6cb5-4ebb-aa60-438cda7bf961@linux.intel.com> (raw)
In-Reply-To: <20260224075027.2409675-10-adam.miszczak@linux.intel.com>
On 2/24/2026 8:50 AM, Adam Miszczak wrote:
> Enable maximum VFs test configuration variant, for both:
> auto-provisioning and vGPU profiles.
> Max VFs is device-specific value read via sysfs.
> For auto-provisioning, max VFs always equals sysfs/sriov_totalvfs,
> but the highest supported number of VFs defined by vGPU profiles
> may differ from the hardware max value.
>
> Max VFs test config variant can be requested by passing MAX_VFS label
> to VmmTestingConfig structure (num_vfs) or convenience tuple, for example:
> test_variants = [(MAX_VFS, VfProvisioningMode.AUTO, VfSchedulingMode.INFINITE),
> (MAX_VFS, VfProvisioningMode.VGPU_PROFILE, VfSchedulingMode.DEFAULT_PROFILE)]
>
> Signed-off-by: Adam Miszczak <adam.miszczak@linux.intel.com>
> ---
> tools/vmtb/vmm_flows/conftest.py | 29 ++++++++++++++++++++++++++---
> 1 file changed, 26 insertions(+), 3 deletions(-)
>
> diff --git a/tools/vmtb/vmm_flows/conftest.py b/tools/vmtb/vmm_flows/conftest.py
> index ae149d652..02c297f93 100644
> --- a/tools/vmtb/vmm_flows/conftest.py
> +++ b/tools/vmtb/vmm_flows/conftest.py
> @@ -32,6 +32,10 @@ def pytest_addoption(parser):
> help='Device card index for test execution')
>
>
> +# Label indicating Max VFs configurarion variant, intended for pass to VmmTestingConfig.
> +MAX_VFS = "Max"
> +
> +
> @dataclass
> class VmmTestingConfig:
> """Structure represents test configuration used by a setup fixture.
> @@ -54,16 +58,23 @@ class VmmTestingConfig:
> auto_poweron_vm: bool = True
> auto_probe_vm_driver: bool = True
> unload_host_drivers_on_teardown: bool = False
> + enable_max_vfs: bool = False
> # Temporary W/A: reduce size of LMEM assigned to VFs to speed up a VF state save-restore process
> wa_reduce_vf_lmem: bool = False
>
> + def __post_init__(self):
> + if self.num_vfs is MAX_VFS:
> + self.enable_max_vfs = True
> + self.num_vfs = 0 # Actual value set in VmmTestingSetup
> +
> def __str__(self) -> str:
> - test_config_id = f'{self.num_vfs}VF-(P:{self.provisioning_mode.name} S:{self.scheduling_mode.name})'
> + test_config_id = (f'{self.num_vfs if not self.enable_max_vfs else "Max"}VF'
> + + f'-(P:{self.provisioning_mode.name} S:{self.scheduling_mode.name})')
> return test_config_id
>
> def __repr__(self) -> str:
> return (f'\nVmmTestingConfig:'
> - f'\nNum VFs = {self.num_vfs} / max num VMs = {self.max_num_vms}'
> + f'\nNum VFs = {self.num_vfs if not self.enable_max_vfs else "Max"} / max num VMs = {self.max_num_vms}'
> f'\nVF provisioning mode = {self.provisioning_mode.name}'
> f'\nVF scheduling mode = {self.scheduling_mode.name}'
> f'\nSetup flags:'
> @@ -89,6 +100,7 @@ class VmmTestingSetup:
> self.host.load_drivers()
> self.host.discover_devices()
> self.dut: Device = self.host.get_device(self.dut_index)
> + self.total_vfs: int = self.get_dut().driver.get_totalvfs()
>
> # VF migration requires vendor specific VFIO driver (e.g. xe-vfio-pci)
> vf_migration_support: bool = self.host.is_driver_loaded(f'{self.host.drm_driver_name}-vfio-pci')
> @@ -98,11 +110,13 @@ class VmmTestingSetup:
> "\n\tPCI BDF: %s "
> "\n\tDevice ID: %s (%s)"
> "\n\tHost DRM driver: %s"
> - "\n\tVF migration support: %s",
> + "\n\tMax VFs supported: %s"
> + "\n\tVF migration supported: %s",
> self.dut_index,
> self.get_dut().pci_info.bdf,
> self.get_dut().pci_info.devid, self.get_dut().gpu_model,
> self.get_dut().driver.get_name(),
> + self.total_vfs,
> vf_migration_support)
>
> vmtb_root_path = vmtb_config.vmtb_config_file.parent
> @@ -115,6 +129,9 @@ class VmmTestingSetup:
> or self.testing_config.scheduling_mode is not VfSchedulingMode.INFINITE):
> self.vgpu_profile: VgpuProfile = self.get_vgpu_profile()
>
> + if self.testing_config.provisioning_mode is VfProvisioningMode.AUTO and self.testing_config.enable_max_vfs:
> + self.testing_config.num_vfs = self.total_vfs
> +
> # Start maximum requested number of VMs, but not more than VFs supported by the given vGPU profile
> self.vms: typing.List[VirtualMachine] = [
> VirtualMachine(vm_idx, self.guest_os_image,
> @@ -125,6 +142,12 @@ class VmmTestingSetup:
>
> def get_vgpu_profile(self) -> VgpuProfile:
> configurator = VgpuProfileConfigurator(self.vgpu_profiles_dir, self.get_dut().gpu_model)
> + if self.testing_config.enable_max_vfs:
> + # Get a vGPU profile with the most VFs (not necessarily equal to sysfs/sriov_totalvfs)
> + self.testing_config.num_vfs = max(configurator.supported_vgpu_profiles.vf_resources,
> + key=lambda profile: profile.vf_count).vf_count
> + logger.debug("Max VFs supported by vGPU profiles: %s", self.testing_config.num_vfs)
> +
LGTM,
Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
> try:
> vgpu_profile = configurator.get_vgpu_profile(self.testing_config.num_vfs,
> self.testing_config.scheduling_mode)
next prev parent reply other threads:[~2026-03-10 10:52 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 7:50 [PATCH i-g-t 00/10] vmtb: Modernize SR-IOV VM Test Bench core Adam Miszczak
2026-02-24 7:50 ` [PATCH i-g-t 01/10] tools/vmtb: Update QEMU parameters Adam Miszczak
2026-03-10 10:22 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 02/10] tools/vmtb: Fix DUT selection based on card index Adam Miszczak
2026-03-10 10:26 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 03/10] tools/vmtb: Fix VM snapshot query handling Adam Miszczak
2026-03-10 10:29 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 04/10] tools/vmtb: Extend IGT and WSIM abstractions Adam Miszczak
2026-03-10 10:36 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 05/10] tools/vmtb: VF auto/fair provisioning support Adam Miszczak
2026-03-10 10:38 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 06/10] tools/vmtb: Refactor driver interfaces Adam Miszczak
2026-03-10 10:43 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 07/10] tools/vmtb: Introduce VirtualDevice class Adam Miszczak
2026-03-10 10:45 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 08/10] tools/vmtb: Redesign VirtualMachine class Adam Miszczak
2026-03-10 10:47 ` Bernatowicz, Marcin
2026-02-24 7:50 ` [PATCH i-g-t 09/10] tools/vmtb: Support max VFs configuration Adam Miszczak
2026-03-10 10:52 ` Bernatowicz, Marcin [this message]
2026-02-24 7:50 ` [PATCH i-g-t 10/10] tools/vmtb: Platform enabling: PTL and BMG support Adam Miszczak
2026-03-10 10:52 ` Bernatowicz, Marcin
2026-02-24 11:49 ` ✓ Xe.CI.BAT: success for vmtb: Modernize SR-IOV VM Test Bench core Patchwork
2026-02-24 12:43 ` ✓ i915.CI.BAT: " Patchwork
2026-02-24 16:27 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-24 20:21 ` ✗ Xe.CI.FULL: " Patchwork
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=a95129bc-6cb5-4ebb-aa60-438cda7bf961@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=adam.miszczak@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.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