Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRIOV: add new test scenarios for vIOMMU #5937

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions libvirt/tests/src/sriov/vIOMMU/attach_iommu_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ def run(test, params, env):
vmxml.features = features
vmxml.sync()
err_msg = ''
if libvirt_version.version_compare(10, 7, 0) and iommu_dict['model'] == 'intel':
iommu_dict['driver']['dma_translation'] = 'on'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dma_translation is new feature, so maybe create separate case under intel variant of ./libvirt/tests/cfg/sriov/vIOMMU/attach_iommu_device.cfg , otherwise it is easy to ignore this feature if still under previous test case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've considered whether we need to add a new case. But after the evaluation I gave up because:

  1. Keep the same attributes strategy as before in plan.
  2. This new attribute is not so important because before it was enabled default.
    Certainly it can also reduce our debug workloads.


libvirt_vmxml.remove_vm_devices_by_type(vm, 'iommu')
iommu_dev = libvirt_vmxml.create_vm_device_by_type('iommu', iommu_dict)
Expand Down
3 changes: 3 additions & 0 deletions libvirt/tests/src/sriov/vIOMMU/iommu_device_settings.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from virttest import libvirt_version
from virttest import utils_disk
from virttest import utils_net

Expand Down Expand Up @@ -30,6 +31,8 @@ def run(test, params, env):
sroiv_test_obj = sriov_base.SRIOVTest(vm, test, params)

try:
if libvirt_version.version_compare(10, 7, 0) and iommu_dict['model'] == 'intel':
iommu_dict['driver']['dma_translation'] = 'on'
test_obj.setup_iommu_test(iommu_dict=iommu_dict, cleanup_ifaces=cleanup_ifaces)
test_obj.prepare_controller()

Expand Down
Loading