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

Conversation

meinaLi
Copy link
Contributor

@meinaLi meinaLi commented Oct 11, 2024

Automate new dma_translation attribute for vIOMMU:
VIRT-294818 - [vIOMMU] Hotplug or coldplug iommu device to guest
VIRT-294818 - [vIOMMU] Start vm with iommu device

Automate new dma_translation attribute for vIOMMU:
VIRT-294818 - [vIOMMU] Hotplug or coldplug iommu device to guest
VIRT-294818 - [vIOMMU] Start vm with iommu device

Signed-off-by: Meina Li <[email protected]>
@meinaLi
Copy link
Contributor Author

meinaLi commented Oct 11, 2024

# avocado run --vt-type libvirt --test-runner=runner --vt-machine-type q35 vIOMMU.iommu_device_settings..intel
JOB ID     : 758b6911ec2381a2f01846ed9ab84c0bae470a4f
JOB LOG    : /var/log/avocado/job-results/job-2024-10-10T22.41-758b691/job.log
 (01/16) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_settings.e1000e.virtio:PASS (40.62 s)
 (02/16) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_settings.e1000e.intel: PASS (165.87 s)
 (03/16) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_settings.rtl8139.virtio: PASS (41.68 s)
......
 (16/16) type_specific.io-github-autotest-libvirt.vIOMMU.iommu_device_settings.pcie_root_port_from_expander_bus.intel: PASS (276.34 s)
Not opening readers, lock_server_running not locked
Not opening readers, lock_server_running not locked
RESULTS    : PASS 16 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2024-10-10T22.41-758b691/results.html
JOB TIME   : 1900.18 s

# avocado run --vt-type libvirt --test-runner=runner --vt-machine-type q35 vIOMMU.attach_iommu_device..intel
JOB ID     : bb1c851cd27ddcfecb9357d64bf30ba07b033cb3
JOB LOG    : /var/log/avocado/job-results/job-2024-10-10T23.28-bb1c851/job.log
 (1/4) type_specific.io-github-autotest-libvirt.vIOMMU.attach_iommu_device.cold_plug.virtio: PASS (8.14 s)
 (2/4) type_specific.io-github-autotest-libvirt.vIOMMU.attach_iommu_device.cold_plug.intel: PASS (8.45 s)
 (3/4) type_specific.io-github-autotest-libvirt.vIOMMU.attach_iommu_device.hot_plug.virtio: PASS (28.88 s)
 (4/4) type_specific.io-github-autotest-libvirt.vIOMMU.attach_iommu_device.hot_plug.intel: PASS (37.56 s)
RESULTS    : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB HTML   : /var/log/avocado/job-results/job-2024-10-10T23.28-bb1c851/results.html
JOB TIME   : 84.85 s

@@ -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.

Copy link
Contributor

@chunfuwen chunfuwen left a comment

Choose a reason for hiding this comment

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

lgtm

@meinaLi
Copy link
Contributor Author

meinaLi commented Oct 23, 2024

@Yingshun Could you help review this PR? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants