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 01/10] tools/vmtb: Update QEMU parameters
Date: Tue, 10 Mar 2026 11:22:42 +0100 [thread overview]
Message-ID: <fd3379a5-487d-4707-96c5-13f72dc746e8@linux.intel.com> (raw)
In-Reply-To: <20260224075027.2409675-2-adam.miszczak@linux.intel.com>
On 2/24/2026 8:50 AM, Adam Miszczak wrote:
> 1. Enable SSH access to VM/Guest OS
>
> Add QEMU options to open guest SSH connection:
> - enable default emulated NIC
> - redirect host's TCP port 10000+N connections to
> guest's SSH server on port 22
> (where N is booted VM number, starting from 0)
>
> For example, login to VM0 (from host) as:
> $ ssh -p 10000 gta@localhost
>
> 2. Enable migration based on VFIO driver
>
> Set 'enable-migration' option introducing QEMU VF migration support.
>
> VF migration is supported by a vendor specific VFIO driver (xe-vfio-pci).
> In case of regular 'vfio-pci', QEMU command option 'enable-migration'
> should not be explicitly enabled to prevent VM start failure:
> 'vfio 0000:00:02.1: VFIO migration is not supported in kernel'
>
> 3. Disable QEMU emulated VGA card
>
> Disable standard emulated VGA on QEMU VMs to avoid issues
> emerging from a bochs DRM driver.
> Standard VGA is enumerated as PCI device BDF 00:02.0
> on minor 0 (drm/card0) - this causes troubles with VirtualMachine class
> reserving card0 for passed VF.
> Also, bochs driver obscures guest dmesg with verbose debug logs.
>
> Signed-off-by: Adam Miszczak <adam.miszczak@linux.intel.com>
> ---
> tools/vmtb/bench/machines/virtual/vm.py | 14 ++++++++++----
> tools/vmtb/vmm_flows/conftest.py | 25 +++++++++++++++----------
> 2 files changed, 25 insertions(+), 14 deletions(-)
>
> diff --git a/tools/vmtb/bench/machines/virtual/vm.py b/tools/vmtb/bench/machines/virtual/vm.py
> index e75de590d..9f4ca1de7 100644
> --- a/tools/vmtb/bench/machines/virtual/vm.py
> +++ b/tools/vmtb/bench/machines/virtual/vm.py
> @@ -1,5 +1,5 @@
> # SPDX-License-Identifier: MIT
> -# Copyright © 2024 Intel Corporation
> +# Copyright © 2024-2026 Intel Corporation
>
> import base64
> import json
> @@ -58,7 +58,8 @@ class VirtualMachine(MachineInterface):
>
> return timeout_wrapper
>
> - def __init__(self, vm_number: int, backing_image: str, driver: str, igt_config: VmtbIgtConfig) -> None:
> + def __init__(self, vm_number: int, backing_image: str, driver: str,
> + igt_config: VmtbIgtConfig, vf_migration_support: bool) -> None:
> self.vf_bdf: typing.Optional[str] = None
> self.process: typing.Optional[subprocess.Popen] = None
> self.vmnum: int = vm_number
> @@ -68,6 +69,7 @@ class VirtualMachine(MachineInterface):
> self.qmp_sockpath = posixpath.join('/tmp', f'mon{self.vmnum}.sock')
> self.drm_driver_name: str = driver
> self.igt_config: VmtbIgtConfig = igt_config
> + self.vf_migration: bool = vf_migration_support
>
> if not posixpath.exists(backing_image):
> logger.error('No image for VM%s', self.vmnum)
> @@ -153,6 +155,9 @@ class VirtualMachine(MachineInterface):
> '-vnc', f':{self.vmnum}',
> '-serial', 'stdio',
> '-m', '4096',
> + '-vga', 'none',
> + '-net', 'nic',
> + '-net', f'user,hostfwd=tcp::{10000 + self.vmnum}-:22',
> '-drive', f'file={self.image if not self.migrate_destination_vm else self.migrate_source_image}',
> '-chardev', f'socket,path={self.questagent_sockpath},server=on,wait=off,id=qga{self.vmnum}',
> '-device', 'virtio-serial',
> @@ -161,8 +166,9 @@ class VirtualMachine(MachineInterface):
> '-mon', f'chardev=mon{self.vmnum},mode=control']
>
> if self.vf_bdf:
> - command.extend(['-enable-kvm', '-cpu', 'host'])
> - command.extend(['-device', f'vfio-pci,host={self.vf_bdf},enable-migration=on'])
> + command.extend(['-enable-kvm', '-cpu', 'host', '-device', f'vfio-pci,host={self.vf_bdf}'])
> + if self.vf_migration:
> + command[-1] += ',enable-migration=on'
>
> if self.migrate_destination_vm:
> # If VM is migration destination - run in stopped/prelaunch state (explicit resume required)
> diff --git a/tools/vmtb/vmm_flows/conftest.py b/tools/vmtb/vmm_flows/conftest.py
> index 7b6eacd51..675312253 100644
> --- a/tools/vmtb/vmm_flows/conftest.py
> +++ b/tools/vmtb/vmm_flows/conftest.py
> @@ -1,26 +1,25 @@
> # SPDX-License-Identifier: MIT
> -# Copyright © 2024 Intel Corporation
> +# Copyright © 2024-2026 Intel Corporation
>
> import json
> import logging
> import re
> import typing
> -
> from dataclasses import dataclass
> from pathlib import Path
>
> import pytest
>
> from bench import exceptions
> -from bench.helpers.helpers import (modprobe_driver, modprobe_driver_check)
> -from bench.helpers.log import HOST_DMESG_FILE
> -from bench.configurators.vgpu_profile_config import VgpuProfileConfigurator, VfSchedulingMode
> from bench.configurators.vgpu_profile import VgpuProfile
> +from bench.configurators.vgpu_profile_config import (VfSchedulingMode,
> + VgpuProfileConfigurator)
> from bench.configurators.vmtb_config import VmtbConfigurator
> -from bench.machines.host import Host, Device
> +from bench.helpers.helpers import modprobe_driver, modprobe_driver_check
> +from bench.helpers.log import HOST_DMESG_FILE
> +from bench.machines.host import Device, Host
> from bench.machines.virtual.vm import VirtualMachine
>
> -
> logger = logging.getLogger('Conftest')
>
>
> @@ -89,15 +88,20 @@ class VmmTestingSetup:
> self.host.load_drivers()
> self.host.discover_devices()
>
> + # 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')
> +
> logger.info("\nDUT info:"
> "\n\tCard index: %s"
> "\n\tPCI BDF: %s "
> "\n\tDevice ID: %s (%s)"
> - "\n\tHost DRM driver: %s",
> + "\n\tHost DRM driver: %s"
> + "\n\tVF migration support: %s",
> self.host.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.get_dut().driver.get_name(),
> + vf_migration_support)
>
> self.vgpu_profile: VgpuProfile = self.get_vgpu_profile()
>
> @@ -105,7 +109,8 @@ class VmmTestingSetup:
> self.vms: typing.List[VirtualMachine] = [
> VirtualMachine(vm_idx, self.guest_os_image,
> vmtb_config.get_guest_config().driver,
> - vmtb_config.get_guest_config().igt_config)
> + vmtb_config.get_guest_config().igt_config,
> + vf_migration_support)
> for vm_idx in range(min(self.vgpu_profile.num_vfs, self.testing_config.max_num_vms))]
LGTM,
Reviewed-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
>
> def get_vgpu_profile(self) -> VgpuProfile:
next prev parent reply other threads:[~2026-03-10 10:23 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 [this message]
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
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=fd3379a5-487d-4707-96c5-13f72dc746e8@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